RESOLVED FIXED 164746
Update SubtleCrypto::wrapKey to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=164746
Summary Update SubtleCrypto::wrapKey to match the latest spec
Jiewen Tan
Reported 2016-11-14 15:59:26 PST
Update SubtleCrypto::wrapKey to match the latest spec.
Attachments
Patch (56.69 KB, patch)
2016-11-29 13:13 PST, Jiewen Tan
no flags
Radar WebKit Bug Importer
Comment 1 2016-11-14 16:52:50 PST
Jiewen Tan
Comment 2 2016-11-29 13:13:51 PST
WebKit Commit Bot
Comment 3 2016-11-29 13:15:36 PST
Attachment 295626 [details] did not pass style-queue: ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_KW.cpp:161: CryptoAlgorithmAES_KW::wrapKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp:36: CryptoAlgorithmAES_KW::platformWrapKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_KWMac.cpp:39: wrapKeyAES_KW is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_KWMac.cpp:50: CryptoAlgorithmAES_KW::platformWrapKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 4 in 33 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brent Fulgham
Comment 4 2016-11-29 13:28:23 PST
Comment on attachment 295626 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295626&action=review r=me > Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp:651 > + supportExportKeyThrow(state, key->algorithmIdentifier()); Is it okay that we are changing from this promise rejection to a DOM exception? Is that per the new specification? > LayoutTests/imported/w3c/WebCryptoAPI/idlharness-expected.txt:67 > +PASS SubtleCrypto interface: calling wrapKey(KeyFormat,CryptoKey,CryptoKey,AlgorithmIdentifier) on crypto.subtle with too few arguments must throw TypeError Ever closer! I hope to see 'unwrapKey' soon! :-)
Jiewen Tan
Comment 5 2016-11-29 13:58:53 PST
Comment on attachment 295626 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295626&action=review Thanks Brent for r+ my patch. >> Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp:651 >> + supportExportKeyThrow(state, key->algorithmIdentifier()); > > Is it okay that we are changing from this promise rejection to a DOM exception? Is that per the new specification? Don't worry. There is a catcher in callPromiseFunction to convert any thrown exceptions to rejected promises.
WebKit Commit Bot
Comment 6 2016-11-30 14:26:31 PST
Comment on attachment 295626 [details] Patch Clearing flags on attachment: 295626 Committed r209155: <http://trac.webkit.org/changeset/209155>
WebKit Commit Bot
Comment 7 2016-11-30 14:26:35 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.