Bug 124442

Summary: Support exporting symmetric keys as JWK
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: WebCore Misc.Assignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, commit-queue, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 122679    
Attachments:
Description Flags
proposed patch sam: review+

Description Alexey Proskuryakov 2013-11-15 16:41:21 PST
Support exporting HMAC and AES keys as JWK.
Comment 1 Alexey Proskuryakov 2013-11-15 16:55:24 PST
Created attachment 217103 [details]
proposed patch
Comment 2 WebKit Commit Bot 2013-11-15 16:56:55 PST
Attachment 217103 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/crypto/subtle/aes-export-key-expected.txt', u'LayoutTests/crypto/subtle/aes-export-key.html', u'LayoutTests/crypto/subtle/hmac-export-key-expected.txt', u'LayoutTests/crypto/subtle/hmac-export-key.html', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/runtime/JSONObject.h', u'Source/WTF/ChangeLog', u'Source/WTF/wtf/text/Base64.cpp', u'Source/WTF/wtf/text/Base64.h', u'Source/WebCore/ChangeLog', u'Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.cpp', u'Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.h', u'Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp', u'Source/WebCore/crypto/CryptoKey.h', u'Source/WebCore/crypto/keys/CryptoKeyHMAC.h', u'Source/WebCore/crypto/keys/CryptoKeySerializationRaw.cpp', u'Source/WebCore/crypto/keys/CryptoKeySerializationRaw.h']" exit_code: 1
Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.h:56:  The parameter name "exec" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.h:68:  The parameter name "exec" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.h:69:  The parameter name "exec" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.h:69:  The parameter name "key" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.h:70:  The parameter name "exec" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.h:71:  The parameter name "exec" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.h:72:  The parameter name "exec" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.cpp:37:  Alphabetical sorting problem.  [build/include_order] [4]
Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.cpp:443:  A case label should not be indented, but line up with its switch statement.  [whitespace/indent] [4]
Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.cpp:495:  Extra space between case and CryptoKeyUsageSign  [whitespace/declaration] [3]
Total errors found: 10 in 18 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Sam Weinig 2013-11-15 16:57:55 PST
Comment on attachment 217103 [details]
proposed patch

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

> Source/WebCore/ChangeLog:8
> +        Some error handling behaviors are not super sensible

This sentence feels odd.
Comment 4 Alexey Proskuryakov 2013-11-15 23:08:36 PST
Committed <http://trac.webkit.org/r159377>.