Bug 123669

Summary: Implement generateKey for HMAC and AES-CBC
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: WebCore Misc.Assignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, cdumez, commit-queue, esprehn+autocc, kondapallykalyan, sam, syoichi
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 123744    
Bug Blocks: 122679    
Attachments:
Description Flags
proposed patch
mitz: review+
patch for landing
none
patch for re-landing commit-queue: commit-queue-

Description Alexey Proskuryakov 2013-11-02 10:38:22 PDT
Implement generateKey for HMAC and AES-CBC.
Comment 1 Alexey Proskuryakov 2013-11-02 10:49:50 PDT
Created attachment 215815 [details]
proposed patch
Comment 2 WebKit Commit Bot 2013-11-02 10:50:36 PDT
Attachment 215815 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/crypto/subtle/aes-cbc-generate-key-expected.txt', u'LayoutTests/crypto/subtle/aes-cbc-generate-key.html', u'LayoutTests/crypto/subtle/hmac-generate-key-expected.txt', u'LayoutTests/crypto/subtle/hmac-generate-key.html', u'LayoutTests/crypto/subtle/sha-1-expected.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/bindings/js/JSCryptoAlgorithmDictionary.cpp', u'Source/WebCore/bindings/js/JSDOMBinding.cpp', u'Source/WebCore/bindings/js/JSDOMBinding.h', u'Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp', u'Source/WebCore/crypto/CryptoAlgorithmAesKeyGenParams.h', u'Source/WebCore/crypto/CryptoKey.cpp', u'Source/WebCore/crypto/CryptoKey.h', u'Source/WebCore/crypto/CryptoKeyAES.cpp', u'Source/WebCore/crypto/CryptoKeyAES.h', u'Source/WebCore/crypto/CryptoKeyMac.cpp', u'Source/WebCore/crypto/SubtleCrypto.idl', u'Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp', u'Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.cpp', u'Source/WebCore/crypto/keys/CryptoKeyHMAC.cpp', u'Source/WebCore/crypto/keys/CryptoKeyHMAC.h', u'Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp', u'Source/WebCore/crypto/mac/CryptoAlgorithmHMACMac.cpp']" exit_code: 1
Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:58:  CryptoAlgorithmAES_CBC::generateKey is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebCore/crypto/CryptoKeyMac.cpp:32:  Missing spaces around /  [whitespace/operators] [3]
Total errors found: 2 in 23 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 mitz 2013-11-02 23:13:01 PDT
Comment on attachment 215815 [details]
proposed patch

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

> Source/WebCore/crypto/keys/CryptoKeyHMAC.h:44
> +    // If lengthBytes is 0, recommended length is used, which is the size of the associated hash function's block size.

Needs an article before “recommended”.
Comment 4 Alexey Proskuryakov 2013-11-02 23:25:58 PDT
Created attachment 215846 [details]
patch for landing
Comment 5 WebKit Commit Bot 2013-11-02 23:57:02 PDT
Comment on attachment 215846 [details]
patch for landing

Clearing flags on attachment: 215846

Committed r158526: <http://trac.webkit.org/changeset/158526>
Comment 6 WebKit Commit Bot 2013-11-02 23:57:05 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 WebKit Commit Bot 2013-11-04 09:30:23 PST
Re-opened since this is blocked by bug 123744
Comment 8 Alexey Proskuryakov 2013-11-04 10:11:23 PST
Created attachment 215928 [details]
patch for re-landing
Comment 9 WebKit Commit Bot 2013-11-04 10:12:14 PST
Comment on attachment 215928 [details]
patch for re-landing

Rejecting attachment 215928 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-03', 'apply-attachment', '--no-update', '--non-interactive', 215928, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
pply', '--force']" exit_code: 29 cwd: /Volumes/Data/EWS/WebKit

Parsed 24 diffs from patch file(s).
cp: Source/WebCore/crypto/CryptoAlgorithmAesKeyGenParams.h: No such file or directory
Failed to copy Source/WebCore/crypto/CryptoAlgorithmAesKeyGenParams.h Source/WebCore/crypto/CryptoAlgorithmAesKeyGenParams.h. at /Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply line 436.

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 29 cwd: /Volumes/Data/EWS/WebKit

Full output: http://webkit-queues.appspot.com/results/19648792
Comment 10 Alexey Proskuryakov 2013-11-04 10:23:05 PST
Sigh. Filed bug 123747 for commit queue failure, will re-land manually.
Comment 11 Alexey Proskuryakov 2013-11-04 10:43:36 PST
Re-landed in <http://trac.webkit.org/r158582>.