Bug 164741 - Update SubtleCrypto::verify to match the latest spec
Summary: Update SubtleCrypto::verify to match the latest spec
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jiewen Tan
URL:
Keywords: InRadar
Depends on:
Blocks: 160883
  Show dependency treegraph
 
Reported: 2016-11-14 15:53 PST by Jiewen Tan
Modified: 2016-11-30 13:19 PST (History)
8 users (show)

See Also:


Attachments
Patch (78.15 KB, patch)
2016-11-29 17:07 PST, Jiewen Tan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiewen Tan 2016-11-14 15:53:41 PST
Update SubtleCrypto::verify to match the latest spec.
Comment 1 Radar WebKit Bug Importer 2016-11-14 16:44:57 PST
<rdar://problem/29257935>
Comment 2 Jiewen Tan 2016-11-29 17:07:55 PST
Created attachment 295675 [details]
Patch
Comment 3 WebKit Commit Bot 2016-11-29 17:09:32 PST
Attachment 295675 [details] did not pass style-queue:


ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:80:  CryptoAlgorithmRSASSA_PKCS1_v1_5::verify is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:87:  verifyRSASSA_PKCS1_v1_5 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:133:  CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp:43:  CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 4 in 57 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Brent Fulgham 2016-11-30 09:15:06 PST
Comment on attachment 295675 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=295675&action=review

Nice job!

> Source/WebCore/crypto/mac/CryptoAlgorithmHMACMac.cpp:113
> +void CryptoAlgorithmHMAC::platformVerify(Ref<CryptoKey>&& key, Vector<uint8_t>&& signature, Vector<uint8_t>&& data, BoolCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext& context, WorkQueue& workQueue)

We should probably rename this directory from "mac" to "cocoa" or "apple" or something, since it is used on all Apple platforms.

> LayoutTests/imported/w3c/WebCryptoAPI/idlharness-expected.txt:53
> +PASS SubtleCrypto interface: calling verify(AlgorithmIdentifier,CryptoKey,BufferSource,BufferSource) on crypto.subtle with too few arguments must throw TypeError 

Yay!
Comment 5 Jiewen Tan 2016-11-30 12:19:29 PST
Comment on attachment 295675 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=295675&action=review

Thanks Brent for r+ my patch.

>> Source/WebCore/crypto/mac/CryptoAlgorithmHMACMac.cpp:113
>> +void CryptoAlgorithmHMAC::platformVerify(Ref<CryptoKey>&& key, Vector<uint8_t>&& signature, Vector<uint8_t>&& data, BoolCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext& context, WorkQueue& workQueue)
> 
> We should probably rename this directory from "mac" to "cocoa" or "apple" or something, since it is used on all Apple platforms.

That actually confuses me as well. We have a lot files having suffix Mac but not only being used in Mac. I mean besides crypto.
Comment 6 WebKit Commit Bot 2016-11-30 13:19:41 PST
Comment on attachment 295675 [details]
Patch

Clearing flags on attachment: 295675

Committed r209150: <http://trac.webkit.org/changeset/209150>
Comment 7 WebKit Commit Bot 2016-11-30 13:19:45 PST
All reviewed patches have been landed.  Closing bug.