Bug 123474 - Add a crypto algorithm abstraction
Summary: Add a crypto algorithm abstraction
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks: 122679
  Show dependency treegraph
 
Reported: 2013-10-29 14:43 PDT by Alexey Proskuryakov
Modified: 2013-10-31 10:12 PDT (History)
4 users (show)

See Also:


Attachments
proposed patch (33.58 KB, patch)
2013-10-29 15:00 PDT, Alexey Proskuryakov
sam: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2013-10-29 14:43:58 PDT
Add a base interface that individual algorithms could implement.
Comment 1 Alexey Proskuryakov 2013-10-29 15:00:38 PDT
Created attachment 215432 [details]
proposed patch
Comment 2 WebKit Commit Bot 2013-10-29 15:02:25 PDT
Attachment 215432 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/crypto/CryptoAlgorithm.cpp', u'Source/WebCore/crypto/CryptoAlgorithm.h', u'Source/WebCore/crypto/CryptoAlgorithmParameters.h', u'Source/WebCore/crypto/CryptoAlgorithmRegistry.cpp', u'Source/WebCore/crypto/CryptoAlgorithmRegistry.h', u'Source/WebCore/crypto/mac/CryptoAlgorithmRegistryMac.cpp']" exit_code: 1
Source/WebCore/crypto/mac/CryptoAlgorithmRegistryMac.cpp:31:  Should have a space between // and comment  [whitespace/comments] [4]
Source/WebCore/crypto/mac/CryptoAlgorithmRegistryMac.cpp:32:  Should have a space between // and comment  [whitespace/comments] [4]
Source/WebCore/crypto/CryptoAlgorithmRegistry.h:32:  Alphabetical sorting problem.  [build/include_order] [4]
Source/WebCore/crypto/CryptoAlgorithm.h:29:  Alphabetical sorting problem.  [build/include_order] [4]
Source/WebCore/crypto/CryptoAlgorithm.h:57:  The parameter name "data" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 5 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Build Bot 2013-10-29 15:08:11 PDT
Comment on attachment 215432 [details]
proposed patch

Attachment 215432 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/17508002
Comment 4 Alexey Proskuryakov 2013-10-29 15:31:39 PDT
The build failure is OK, this just depends on one of the previous patches.
Comment 5 Build Bot 2013-10-29 15:44:22 PDT
Comment on attachment 215432 [details]
proposed patch

Attachment 215432 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/17158150
Comment 6 Sam Weinig 2013-10-31 09:52:57 PDT
Comment on attachment 215432 [details]
proposed patch

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

> Source/WebCore/crypto/CryptoAlgorithm.h:32
> +#include <wtf/Vector.h>
> +#include "CryptoAlgorithmIdentifier.h"
> +#include "CryptoKeyFormat.h"
> +#include "CryptoKeyUsage.h"

Sort please.

> Source/WebCore/crypto/mac/CryptoAlgorithmRegistryMac.cpp:39
> +//    registerAlgorithm(CryptoAlgorithmHMAC::m_name, CryptoAlgorithmHMAC::m_identifier, CryptoAlgorithmHMAC::create);
> +//    registerAlgorithm(CryptoAlgorithmSHA1::m_name, CryptoAlgorithmSHA1::m_identifier, CryptoAlgorithmSHA1::create);

We don't usually check in commented out code.
Comment 7 Alexey Proskuryakov 2013-10-31 10:12:22 PDT
Committed <http://trac.webkit.org/r158363>.