Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 82 users
Status: Fixed
Owner:
Last visit 19 days ago
Closed: Jun 2014
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug

Blocked on:
issue 256506
issue 262383
issue 267888
issue 357673
issue 357723
issue 368814
issue 368821

Blocking:
issue 159629
issue 355610



Sign in to add a comment
Implement WebCrypto
Project Member Reported by eroman@chromium.org, May 29 2013 Back to list
http://www.w3.org/TR/WebCryptoAPI/
 
Blockedon: chromium:243345
(The latest draft of the spec makes use of Futures)
Project Member Comment 2 by bugdroid1@chromium.org, Jun 12 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=152261

------------------------------------------------------------------------
r152261 | eroman@chromium.org | 2013-06-12T04:17:23.240484Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/page/DOMWindow.cpp?r1=152261&r2=152260&pathrev=152261
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Crypto.h?r1=152261&r2=152260&pathrev=152261
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/page/DOMWindow.h?r1=152261&r2=152260&pathrev=152261
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/page/Crypto.cpp?r1=152261&r2=152260&pathrev=152261
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/DOMWindowCrypto.idl?r1=152261&r2=152260&pathrev=152261
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/page/Crypto.h?r1=152261&r2=152260&pathrev=152261
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/custom/V8CryptoCustom.cpp?r1=152261&r2=152260&pathrev=152261
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Crypto.idl?r1=152261&r2=152260&pathrev=152261
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/DOMWindowCrypto.cpp?r1=152261&r2=152260&pathrev=152261
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/page/DOMWindow.idl?r1=152261&r2=152260&pathrev=152261
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/DOMWindowCrypto.h?r1=152261&r2=152260&pathrev=152261
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/core.gypi?r1=152261&r2=152260&pathrev=152261
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=152261&r2=152260&pathrev=152261
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto?r1=152261&r2=152260&pathrev=152261
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Crypto.cpp?r1=152261&r2=152260&pathrev=152261
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/page/Crypto.idl?r1=152261&r2=152260&pathrev=152261

Move window.crypto to modules/crypto.

BUG=245025
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/15901021
------------------------------------------------------------------------
Project Member Comment 3 by bugdroid1@chromium.org, Jun 12 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=152288

------------------------------------------------------------------------
r152288 | eroman@chromium.org | 2013-06-12T16:57:55.947208Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/page/RuntimeEnabledFeatures.in?r1=152288&r2=152287&pathrev=152288
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=152288&r2=152287&pathrev=152288
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=152288&r2=152287&pathrev=152288
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Crypto.cpp?r1=152288&r2=152287&pathrev=152288
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.h?r1=152288&r2=152287&pathrev=152288
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Crypto.h?r1=152288&r2=152287&pathrev=152288
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.idl?r1=152288&r2=152287&pathrev=152288
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Crypto.idl?r1=152288&r2=152287&pathrev=152288

Add window.crypto.subtle behind a runtime feature flag ("Crypto")

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/15897025
------------------------------------------------------------------------
Project Member Comment 4 by bugdroid1@chromium.org, Jun 12 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=152308

------------------------------------------------------------------------
r152308 | eroman@chromium.org | 2013-06-12T22:35:57.920068Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/crypto-random-values-limits-expected.txt?r1=152308&r2=152307&pathrev=152308
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/security/crypto-random-values-types.html?r1=152308&r2=152307&pathrev=152308
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/crypto-random-values-expected.txt?r1=152308&r2=152307&pathrev=152308
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/crypto-random-values-types-expected.txt?r1=152308&r2=152307&pathrev=152308
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/crypto-random-values-limits.html?r1=152308&r2=152307&pathrev=152308
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/crypto-random-values.html?r1=152308&r2=152307&pathrev=152308
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/security/crypto-random-values-limits-expected.txt?r1=152308&r2=152307&pathrev=152308
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/security/crypto-random-values-expected.txt?r1=152308&r2=152307&pathrev=152308
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto?r1=152308&r2=152307&pathrev=152308
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/crypto-random-values-types.html?r1=152308&r2=152307&pathrev=152308
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/security/crypto-random-values-types-expected.txt?r1=152308&r2=152307&pathrev=152308
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/security/crypto-random-values-limits.html?r1=152308&r2=152307&pathrev=152308
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/security/crypto-random-values.html?r1=152308&r2=152307&pathrev=152308

Create LayoutTests/crypto for WebCrypto tests.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/16280013
------------------------------------------------------------------------
Project Member Comment 5 by bugdroid1@chromium.org, Jun 13 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=152389

------------------------------------------------------------------------
r152389 | eroman@chromium.org | 2013-06-13T23:17:13.623781Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/WorkerContextCrypto.h?r1=152389&r2=152388&pathrev=152389
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Crypto.h?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/random-values-limits.html?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/random-values.html?r1=152389&r2=152388&pathrev=152389
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/bindings.gypi?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/worker-random-values-concurrent-expected.txt?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/random-values-types.html?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/random-values-concurrent.js?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/worker-random-values.html?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/worker-random-values-types.html?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/WorkerCrypto.idl?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/WorkerContextCrypto.idl?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/worker-random-values-limits-expected.txt?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/random-values-limits.js?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/random-values.js?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/WorkerCrypto.cpp?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/random-values-types.js?r1=152389&r2=152388&pathrev=152389
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/crypto-random-values-limits-expected.txt?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/worker-random-values-concurrent.html?r1=152389&r2=152388&pathrev=152389
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/crypto-random-values-expected.txt?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/WorkerContextCrypto.cpp?r1=152389&r2=152388&pathrev=152389
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Crypto.cpp?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources?r1=152389&r2=152388&pathrev=152389
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/crypto-random-values-types-expected.txt?r1=152389&r2=152388&pathrev=152389
   M http://src.chromium.org/viewvc/blink/trunk/Source/wtf/CryptographicallyRandomNumber.h?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/worker-random-values-limits.html?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/custom/V8WorkerCryptoCustom.cpp?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/random-values-limits-expected.txt?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/random-values-expected.txt?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/random-values-types-expected.txt?r1=152389&r2=152388&pathrev=152389
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/crypto-random-values-limits.html?r1=152389&r2=152388&pathrev=152389
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/custom/V8CryptoCustom.cpp?r1=152389&r2=152388&pathrev=152389
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/crypto-random-values.html?r1=152389&r2=152388&pathrev=152389
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/crypto-random-values-types.html?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/worker-random-values-expected.txt?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/worker-random-values-types-expected.txt?r1=152389&r2=152388&pathrev=152389
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=152389&r2=152388&pathrev=152389
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/WorkerCrypto.h?r1=152389&r2=152388&pathrev=152389

Expose crypto.getRandomValues() to workers.

It is only available to workers when the "Crypto" runtime feature is on.

-----------------------
Testing details
-----------------------

  * Duplicated all existing tests for crypto.getRandomValues(). In addition to the original flavor, there is now a version of the test that runs on a worker.

  * Removed the 'crypto-' prefix from existing tests. This was redundant, as the path already includes 'crypto/'.

  * Added a completely new test: 'worker-random-values-concurrent.html'. This makes sure that calling getRandomValues() concurrently on workers isn't a problem.

BUG=245025,142173

Review URL: https://chromiumcodereview.appspot.com/16820007
------------------------------------------------------------------------
Project Member Comment 6 by bugdroid1@chromium.org, Jul 2 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=153450

------------------------------------------------------------------------
r153450 | eroman@chromium.org | 2013-07-02T21:56:51.318354Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/core.gypi?r1=153450&r2=153449&pathrev=153450
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesKeyGenParams.cpp?r1=153450&r2=153449&pathrev=153450
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebVector.h?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesKeyGenParams.h?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesCbcParams.cpp?r1=153450&r2=153449&pathrev=153450
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.idl?r1=153450&r2=153449&pathrev=153450
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/WorkerGlobalScopeCrypto.cpp?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Algorithm.cpp?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.idl?r1=153450&r2=153449&pathrev=153450
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/bindings.gypi?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesCbcParams.h?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Algorithm.h?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/normalize-algorithm.html?r1=153450&r2=153449&pathrev=153450
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.cpp?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=153450&r2=153449&pathrev=153450
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.h?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesKeyGenParams.idl?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.h?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=153450&r2=153449&pathrev=153450
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/Dictionary.cpp?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithmParams.h?r1=153450&r2=153449&pathrev=153450
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/DOMWindowCrypto.cpp?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/normalize-algorithm-expected.txt?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesCbcParams.idl?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/custom/V8AlgorithmCustom.cpp?r1=153450&r2=153449&pathrev=153450
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/Dictionary.h?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Algorithm.idl?r1=153450&r2=153449&pathrev=153450
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.h?r1=153450&r2=153449&pathrev=153450

WebCrypto: Add framework for AlgorithmIdentifier normalization.

In this changelist, the "normalizeAlgorithm()" function corresponds with https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#algorithm-normalizing-rules

A threadsafe and copiable representation of the normalized algorithm has been added to the WebKit API as WebCryptoAlgorithm. This is how WebCore will inform the embedder of the cryptographic operation to perform and its parameters.

WebCryptoAlgorithm is also used by WebCore to pass around normalized "algorithm identifiers".

There is a lot of boiler plate to achieve both parsing of algorithm parameters from a dictionary, as well as reflecting back the normalized results to javascript.

The parsing is done manually as it needs to extract from a Dictionary. The reflection back to javascript is done using IDL and some glue to WebCryptoAlgorithm.

This changelist only adds a small number of algorithm parameters. (Enough to be minimally testable). The rest will follow in later changes.

BUG=245025
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/18475002
------------------------------------------------------------------------
Project Member Comment 7 by bugdroid1@chromium.org, Jul 8 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=153657

------------------------------------------------------------------------
r153657 | eroman@chromium.org | 2013-07-08T01:47:47.146437Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Algorithm.cpp?r1=153657&r2=153656&pathrev=153657
   A http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKey.h?r1=153657&r2=153656&pathrev=153657
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.cpp?r1=153657&r2=153656&pathrev=153657
   A http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCryptoKey.cpp?r1=153657&r2=153656&pathrev=153657
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Algorithm.h?r1=153657&r2=153656&pathrev=153657
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.h?r1=153657&r2=153656&pathrev=153657
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/core.gypi?r1=153657&r2=153656&pathrev=153657
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.idl?r1=153657&r2=153656&pathrev=153657
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=153657&r2=153656&pathrev=153657
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/WorkerCrypto.h?r1=153657&r2=153656&pathrev=153657
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.cpp?r1=153657&r2=153656&pathrev=153657
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=153657&r2=153656&pathrev=153657

WebCrypto: Add WebKit API structure for keys.

This corresponds to the "Key interface" in the spec:
https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#key-interface

This changelist introduces "WebCryptoKey" as a reference-counted wrapper to an opaque key handle.
This opaque key handle is a pointer created by the embedder, which derives from WebCryptoKeyHandle.

Testing: This change does not have any accompanying tests, as there isn't a way to create key objects from Javascript yet. These interfaces will get test coverage once key generation is hooked up.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/18033004
------------------------------------------------------------------------
Project Member Comment 8 by bugdroid1@chromium.org, Jul 9 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=153809

------------------------------------------------------------------------
r153809 | eroman@chromium.org | 2013-07-09T20:05:15.859242Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKey.h?r1=153809&r2=153808&pathrev=153809
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.cpp?r1=153809&r2=153808&pathrev=153809
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCryptoKey.cpp?r1=153809&r2=153808&pathrev=153809
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.h?r1=153809&r2=153808&pathrev=153809
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.idl?r1=153809&r2=153808&pathrev=153809

WebCrypto: Update the key usage names to reflect recent changes to the spec.

keyUsage --> usages
"derive" --> "deriveKey"
"wrap" --> "wrapKey"
"unwrap" --> "unwrapKey"

This corresponds with:
  https://dvcs.w3.org/hg/webcrypto-api/rev/f5734f8b2e6a
  https://dvcs.w3.org/hg/webcrypto-api/rev/ec111797d17a
  https://dvcs.w3.org/hg/webcrypto-api/rev/37f65665a51b

BUG=245025
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/18801015
------------------------------------------------------------------------
Project Member Comment 9 by bugdroid1@chromium.org, Jul 9 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=153820

------------------------------------------------------------------------
r153820 | eroman@chromium.org | 2013-07-09T22:18:46.212185Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=153820&r2=153819&pathrev=153820
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Algorithm.cpp?r1=153820&r2=153819&pathrev=153820
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp?r1=153820&r2=153819&pathrev=153820

WebCrypto: [Cleanup] Remove a redundant "algorithm" prefix.

BUG=245025
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/18937003
------------------------------------------------------------------------
Project Member Comment 10 by bugdroid1@chromium.org, Jul 16 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=154310

------------------------------------------------------------------------
r154310 | eroman@chromium.org | 2013-07-16T17:36:26.898638Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/public/platform/WebArrayBuffer.h?r1=154310&r2=154309&pathrev=154310
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.idl?r1=154310&r2=154309&pathrev=154310
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/web.gypi?r1=154310&r2=154309&pathrev=154310
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest.html?r1=154310&r2=154309&pathrev=154310
   A http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebArrayBuffer.cpp?r1=154310&r2=154309&pathrev=154310
   D http://src.chromium.org/viewvc/blink/trunk/Source/web/WebArrayBuffer.cpp?r1=154310&r2=154309&pathrev=154310
   A http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=154310&r2=154309&pathrev=154310
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/WebSocketImpl.cpp?r1=154310&r2=154309&pathrev=154310
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=154310&r2=154309&pathrev=154310
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.cpp?r1=154310&r2=154309&pathrev=154310
   M http://src.chromium.org/viewvc/blink/trunk/public/README?r1=154310&r2=154309&pathrev=154310
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-expected.txt?r1=154310&r2=154309&pathrev=154310
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/Platform.h?r1=154310&r2=154309&pathrev=154310
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.h?r1=154310&r2=154309&pathrev=154310
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=154310&r2=154309&pathrev=154310
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/ScriptValue.h?r1=154310&r2=154309&pathrev=154310
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/core.gypi?r1=154310&r2=154309&pathrev=154310
   M http://src.chromium.org/viewvc/blink/trunk/public/web/WebArrayBuffer.h?r1=154310&r2=154309&pathrev=154310
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/WebBindings.cpp?r1=154310&r2=154309&pathrev=154310

WebCrypto: Add SHA-1 support to crypto.subtle.digest().

This change sets up more WebKit API interfaces for embedders to implement CryptoOperation, and connects them together using SHA-1 as an end-to-end test.

The SHA-1 support is implemented on the blink side as a proof of concept, since it is just a few lines of extra code. However this will be moved over to the chromium side once more plumbing is in place.

Not that this change does not make CryptoOperation inherit from Promise. Instead it directly returns a Promise from finish() and abort(). This was done to avoid potential cycles and memory leaks. Will follow up with the working group to resolve the spec's behavior.

BUG=245025
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/19082002
------------------------------------------------------------------------
Project Member Comment 11 by bugdroid1@chromium.org, Jul 16 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=154318

------------------------------------------------------------------------
r154318 | eroman@chromium.org | 2013-07-16T20:35:33.701087Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/Source/web/WebArrayBuffer.cpp?r1=154318&r2=154317&pathrev=154318
   D http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=154318&r2=154317&pathrev=154318
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/WebSocketImpl.cpp?r1=154318&r2=154317&pathrev=154318
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=154318&r2=154317&pathrev=154318
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.cpp?r1=154318&r2=154317&pathrev=154318
   M http://src.chromium.org/viewvc/blink/trunk/public/README?r1=154318&r2=154317&pathrev=154318
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/Platform.h?r1=154318&r2=154317&pathrev=154318
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-expected.txt?r1=154318&r2=154317&pathrev=154318
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.h?r1=154318&r2=154317&pathrev=154318
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=154318&r2=154317&pathrev=154318
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/ScriptValue.h?r1=154318&r2=154317&pathrev=154318
   M http://src.chromium.org/viewvc/blink/trunk/public/web/WebArrayBuffer.h?r1=154318&r2=154317&pathrev=154318
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/core.gypi?r1=154318&r2=154317&pathrev=154318
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/WebBindings.cpp?r1=154318&r2=154317&pathrev=154318
   D http://src.chromium.org/viewvc/blink/trunk/public/platform/WebArrayBuffer.h?r1=154318&r2=154317&pathrev=154318
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.idl?r1=154318&r2=154317&pathrev=154318
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/web.gypi?r1=154318&r2=154317&pathrev=154318
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest.html?r1=154318&r2=154317&pathrev=154318
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebArrayBuffer.cpp?r1=154318&r2=154317&pathrev=154318

Revert "WebCrypto: Add SHA-1 support to crypto.subtle.digest()."

This reverts r154310 to see if it was responsible for layout test flake on buildbots.

BUG=245025

Review URL: https://codereview.chromium.org/19401003
------------------------------------------------------------------------
Blockedon: -chromium:243345
Summary: Implement WebCrypto (was: Implement WebCrypto in blink)
Design document:

https://docs.google.com/a/chromium.org/document/d/184AgXzLAoUjQjrtNdbimceyXVYzrn3tGpf3xQGCN10g/edit
Project Member Comment 13 by bugdroid1@chromium.org, Jul 17 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=154344

------------------------------------------------------------------------
r154344 | eroman@chromium.org | 2013-07-17T01:16:32.354010Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/README?r1=154344&r2=154343&pathrev=154344
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/Platform.h?r1=154344&r2=154343&pathrev=154344
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-expected.txt?r1=154344&r2=154343&pathrev=154344
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.h?r1=154344&r2=154343&pathrev=154344
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=154344&r2=154343&pathrev=154344
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/ScriptValue.h?r1=154344&r2=154343&pathrev=154344
   M http://src.chromium.org/viewvc/blink/trunk/public/web/WebArrayBuffer.h?r1=154344&r2=154343&pathrev=154344
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/core.gypi?r1=154344&r2=154343&pathrev=154344
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/WebBindings.cpp?r1=154344&r2=154343&pathrev=154344
   A http://src.chromium.org/viewvc/blink/trunk/public/platform/WebArrayBuffer.h?r1=154344&r2=154343&pathrev=154344
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.idl?r1=154344&r2=154343&pathrev=154344
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/web.gypi?r1=154344&r2=154343&pathrev=154344
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest.html?r1=154344&r2=154343&pathrev=154344
   A http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebArrayBuffer.cpp?r1=154344&r2=154343&pathrev=154344
   D http://src.chromium.org/viewvc/blink/trunk/Source/web/WebArrayBuffer.cpp?r1=154344&r2=154343&pathrev=154344
   A http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=154344&r2=154343&pathrev=154344
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/WebSocketImpl.cpp?r1=154344&r2=154343&pathrev=154344
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=154344&r2=154343&pathrev=154344
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.cpp?r1=154344&r2=154343&pathrev=154344

WebCrypto: Add SHA-1 support to crypto.subtle.digest().

This change sets up more WebKit API interfaces for embedders to implement CryptoOperation, and connects them together using SHA-1 as an end-to-end test.

The SHA-1 support is implemented on the blink side as a proof of concept, since it is just a few lines of extra code. However this will be moved over to the chromium side once more plumbing is in place.

Not that this change does not make CryptoOperation inherit from Promise. Instead it directly returns a Promise from finish() and abort(). This was done to avoid potential cycles and memory leaks. Will follow up with the working group to resolve the spec's behavior.

BUG=245025
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/19082002
------------------------------------------------------------------------
Project Member Comment 14 by bugdroid1@chromium.org, Jul 17 2013
------------------------------------------------------------------------
r212128 | eroman@chromium.org | 2013-07-17T21:18:32.123487Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/pepper/pepper_websocket_host.cc?r1=212128&r2=212127&pathrev=212128
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/skia_benchmarking_extension.cc?r1=212128&r2=212127&pathrev=212128
   M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/plugins/ppapi/v8_var_converter.cc?r1=212128&r2=212127&pathrev=212128
   M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/plugins/ppapi/host_array_buffer_var.h?r1=212128&r2=212127&pathrev=212128
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/v8_value_converter_impl.cc?r1=212128&r2=212127&pathrev=212128

Update the include path for WebArrayBuffer.h

BUG=245025
R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/19349002
------------------------------------------------------------------------
Project Member Comment 15 by bugdroid1@chromium.org, Jul 17 2013
------------------------------------------------------------------------
r212134 | eroman@chromium.org | 2013-07-17T21:23:16.053161Z

Changed paths:
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl.h?r1=212134&r2=212133&pathrev=212134
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_renderer.gypi?r1=212134&r2=212133&pathrev=212134
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/renderer_webkitplatformsupport_impl.cc?r1=212134&r2=212133&pathrev=212134
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl.cc?r1=212134&r2=212133&pathrev=212134
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/renderer_webkitplatformsupport_impl.h?r1=212134&r2=212133&pathrev=212134

Add chromium side implementation of WebKit::WebCrypto.

This adds the skeleton for the new files, however doesn't fill in any of the details yet.

BUG=245025
R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/19355002
------------------------------------------------------------------------
Project Member Comment 16 by bugdroid1@chromium.org, Jul 17 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=154437

------------------------------------------------------------------------
r154437 | eroman@chromium.org | 2013-07-17T22:16:46.771462Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.h?r1=154437&r2=154436&pathrev=154437
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.idl?r1=154437&r2=154436&pathrev=154437
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Crypto.idl?r1=154437&r2=154436&pathrev=154437
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/WindowCrypto.idl?r1=154437&r2=154436&pathrev=154437
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=154437&r2=154436&pathrev=154437

Cleanup: Normalize liscence headers in modules/crypto/*.

Before there were 4 different styles of headers:
  (style A): 25
  (style B): 4
  (style C): 2
  (style D): 1

After this change, there are only 2 styles of headers:
  (style A): 29
  (style B): 3 (Crypto.idl, Crypto.h, Crypto.cpp)

All of the files using (style A) are ones which I added while working on WebCrypto, so there shouldn't be any issues with changing them.

The files using (style B) are ones which predated my work so I decided to left them untouched.

BUG=245025
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/19589004
------------------------------------------------------------------------
Project Member Comment 17 by bugdroid1@chromium.org, Jul 17 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=154442

------------------------------------------------------------------------
r154442 | eroman@chromium.org | 2013-07-17T22:44:18.357700Z

Changed paths:
   D http://src.chromium.org/viewvc/blink/trunk/public/web/WebArrayBuffer.h?r1=154442&r2=154441&pathrev=154442

Delete deprecated header file.

It was moved to platform/WebArrayBuffer.h and all references are now gone.

BUG=245025
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/19490003
------------------------------------------------------------------------
Project Member Comment 18 by bugdroid1@chromium.org, Jul 19 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=154563

------------------------------------------------------------------------
r154563 | eroman@chromium.org | 2013-07-19T09:19:42.080904Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest.html?r1=154563&r2=154562&pathrev=154563
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=154563&r2=154562&pathrev=154563
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=154563&r2=154562&pathrev=154563
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.cpp?r1=154563&r2=154562&pathrev=154563
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-expected.txt?r1=154563&r2=154562&pathrev=154563
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.h?r1=154563&r2=154562&pathrev=154563

WebCrypto: Refactor the WebCryptoOperation interface to support errors.

This allows the embedder to:

  (1) Throw an error during initialization of the CryptoOperation (which will result in throwing an exception to Javascript)

  (2) Terminate the CryptoOperation with an error at any point after successful initialization. This error will be delivered via the Promise's reject handler.

The previous interface only allowed completing with an error during finish(), so any errors encountered during process() would have to be buffered until the end.

BUG=245025
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/19776013
------------------------------------------------------------------------
Project Member Comment 19 by bugdroid1@chromium.org, Jul 19 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=154581

------------------------------------------------------------------------
r154581 | eroman@chromium.org | 2013-07-19T20:13:44.168972Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=154581&r2=154580&pathrev=154581
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=154581&r2=154580&pathrev=154581

Rename WebCrypto::digest2 --> WebCrypto::digest

(part of a three-sided patch)

BUG=245025
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/19384009
------------------------------------------------------------------------
Blockedon: chromium:256506 chromium:262383
Project Member Comment 21 by bugdroid1@chromium.org, Jul 24 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=154860

------------------------------------------------------------------------
r154860 | eroman@chromium.org | 2013-07-24T23:36:17.526882Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.idl?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.cpp?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/public/testing/WebTestInterfaces.h?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=154860&r2=154859&pathrev=154860
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.h?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=154860&r2=154859&pathrev=154860
   A http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCrypto.cpp?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.cpp?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.h?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKey.h?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.h?r1=154860&r2=154859&pathrev=154860
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-expected.txt?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=154860&r2=154859&pathrev=154860
   A http://src.chromium.org/viewvc/blink/trunk/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/Tools/DumpRenderTree/DumpRenderTree.gypi?r1=154860&r2=154859&pathrev=154860
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyOperation.cpp?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.h?r1=154860&r2=154859&pathrev=154860
   A http://src.chromium.org/viewvc/blink/trunk/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.h?r1=154860&r2=154859&pathrev=154860
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyOperation.h?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.idl?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/core.gypi?r1=154860&r2=154859&pathrev=154860
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=154860&r2=154859&pathrev=154860

WebCrypto: Add interfaces for importKey().

Adds WebKit API interfaces importKey(). Also refactors CryptoOperation to match.

The key operations support both synchronous and asynchronous completions, as well as a separate synchronous initialization failure. The asynchronous operation is abortable (however nothing aborts it yet)

In order to test this, added a mock implementation of the interfaces which hardcodes some actions based on the bytes of the key. This allows for layout tests that verify the parsing and reflection of parameters.

BUG=245025
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/19885002
------------------------------------------------------------------------
Project Member Comment 22 by bugdroid1@chromium.org, Jul 25 2013
------------------------------------------------------------------------
r213680 | eroman@chromium.org | 2013-07-25T20:05:56.715430Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/renderer/content_renderer_client.cc?r1=213680&r2=213679&pathrev=213680
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/shell/renderer/shell_content_renderer_client.cc?r1=213680&r2=213679&pathrev=213680
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/renderer/content_renderer_client.h?r1=213680&r2=213679&pathrev=213680
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/renderer_webkitplatformsupport_impl.cc?r1=213680&r2=213679&pathrev=213680
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/shell/renderer/shell_content_renderer_client.h?r1=213680&r2=213679&pathrev=213680

Use a mock implementation of Platform::crypto() for layout tests.

BUG=245025
R=darin@chromium.org, jochen@chromium.org

Review URL: https://codereview.chromium.org/19594005
------------------------------------------------------------------------
Project Member Comment 23 by bugdroid1@chromium.org, Jul 25 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=154936

------------------------------------------------------------------------
r154936 | eroman@chromium.org | 2013-07-25T20:50:35.304915Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=154936&r2=154935&pathrev=154936

Re-enable the WebCrypto LayoutTests.

They were temporarily disabled while landing a 2-sided patch.

BUG=245025
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/20464002
------------------------------------------------------------------------
Project Member Comment 24 by bugdroid1@chromium.org, Jul 26 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=154963

------------------------------------------------------------------------
r154963 | eroman@chromium.org | 2013-07-26T02:32:46.438831Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Algorithm.cpp?r1=154963&r2=154962&pathrev=154963
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=154963&r2=154962&pathrev=154963
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/normalize-algorithm-expected.txt?r1=154963&r2=154962&pathrev=154963
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp?r1=154963&r2=154962&pathrev=154963
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithmParams.h?r1=154963&r2=154962&pathrev=154963
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/custom/V8AlgorithmCustom.cpp?r1=154963&r2=154962&pathrev=154963
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacParams.cpp?r1=154963&r2=154962&pathrev=154963
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.h?r1=154963&r2=154962&pathrev=154963
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/normalize-algorithm.html?r1=154963&r2=154962&pathrev=154963
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=154963&r2=154962&pathrev=154963
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacParams.h?r1=154963&r2=154962&pathrev=154963
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacParams.idl?r1=154963&r2=154962&pathrev=154963
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=154963&r2=154962&pathrev=154963

WebCrypto: Add parameter normalization for HMAC.
BUG=245025

Review URL: https://chromiumcodereview.appspot.com/20496002
------------------------------------------------------------------------
Project Member Comment 25 by bugdroid1@chromium.org, Jul 26 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=154965

------------------------------------------------------------------------
r154965 | eroman@chromium.org | 2013-07-26T02:46:47.836611Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-expected.txt?r1=154965&r2=154964&pathrev=154965
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=154965&r2=154964&pathrev=154965
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=154965&r2=154964&pathrev=154965

WebCrypto: Fix a crash when passing invalid ArrayBufferView to importKey.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/20582003
------------------------------------------------------------------------
Project Member Comment 26 by bugdroid1@chromium.org, Jul 26 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=154973

------------------------------------------------------------------------
r154973 | eroman@chromium.org | 2013-07-26T03:47:26.845241Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest.html?r1=154973&r2=154972&pathrev=154973
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-expected.txt?r1=154973&r2=154972&pathrev=154973
   M http://src.chromium.org/viewvc/blink/trunk/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp?r1=154973&r2=154972&pathrev=154973

WebCrypto: Test error delivery during process().

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/20421002
------------------------------------------------------------------------
Project Member Comment 27 by bugdroid1@chromium.org, Jul 26 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=155013

------------------------------------------------------------------------
r155013 | eroman@chromium.org | 2013-07-26T21:23:50.582851Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/normalize-algorithm.html?r1=155013&r2=155012&pathrev=155013
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=155013&r2=155012&pathrev=155013
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.h?r1=155013&r2=155012&pathrev=155013
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.idl?r1=155013&r2=155012&pathrev=155013

WebCrypto: Add the Key parameter to a number of operations.

This updates the IDL files and the normalize test, but otherwise doesn't use the Key yet.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/20571002
------------------------------------------------------------------------
Note that r155013 "WebCrypto: Add the Key parameter to a number of operations" was reverted due to a timeout on windows bot in r155056.

-----------
Revert "WebCrypto: Add the Key parameter to a number of operations." (r155013).

normalize-algorithm.html started timing out on Win Debug: http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win7%20%28dbg%29%281%29/builds/6092.

TBR=eroman
BUG=

Review URL: https://codereview.chromium.org/20914002
-----------
Project Member Comment 29 by bugdroid1@chromium.org, Jul 30 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=155150

------------------------------------------------------------------------
r155150 | eroman@chromium.org | 2013-07-30T08:54:41.331270Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp?r1=155150&r2=155149&pathrev=155150
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=155150&r2=155149&pathrev=155150

WebCrypto: Fix an un-initialized value in the mock implementation of importKey()

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/21044004
------------------------------------------------------------------------
Project Member Comment 30 by bugdroid1@chromium.org, Jul 30 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=155168

------------------------------------------------------------------------
r155168 | eroman@chromium.org | 2013-07-30T15:38:08.128297Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.h?r1=155168&r2=155167&pathrev=155168
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.idl?r1=155168&r2=155167&pathrev=155168
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/normalize-algorithm.html?r1=155168&r2=155167&pathrev=155168
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=155168&r2=155167&pathrev=155168

WebCrypto: Add the Key parameter to a number of operations.

This updates the IDL files and the normalize test, but otherwise doesn't use the Key yet.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/20571002
------------------------------------------------------------------------
Project Member Comment 31 by bugdroid1@chromium.org, Jul 31 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=155223

------------------------------------------------------------------------
r155223 | eroman@chromium.org | 2013-07-31T05:30:56.668267Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=155223&r2=155222&pathrev=155223
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp?r1=155223&r2=155222&pathrev=155223

Expose a constructor for WebCryptoAlgorithm.

This allows unittests on the chromium-side to construct it.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/21185005
------------------------------------------------------------------------
Project Member Comment 32 by bugdroid1@chromium.org, Jul 31 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=155224

------------------------------------------------------------------------
r155224 | eroman@chromium.org | 2013-07-31T05:44:59.827890Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp?r1=155224&r2=155223&pathrev=155224
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.h?r1=155224&r2=155223&pathrev=155224
   M http://src.chromium.org/viewvc/blink/trunk/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.h?r1=155224&r2=155223&pathrev=155224
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=155224&r2=155223&pathrev=155224
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=155224&r2=155223&pathrev=155224

WebCrypto: Add more operations to the platform API.

Adds methods for encrypt(), decrypt() and sign()

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/21016005
------------------------------------------------------------------------
Project Member Comment 33 by bugdroid1@chromium.org, Aug 1 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=155297

------------------------------------------------------------------------
r155297 | eroman@chromium.org | 2013-08-01T03:55:54.441005Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-expected.txt?r1=155297&r2=155296&pathrev=155297
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=155297&r2=155296&pathrev=155297
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.h?r1=155297&r2=155296&pathrev=155297
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=155297&r2=155296&pathrev=155297
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/normalize-algorithm.html?r1=155297&r2=155296&pathrev=155297
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=155297&r2=155296&pathrev=155297

WebCrypto: Properly normalize algorithm for importKey().

HMAC should retain the "hash" parameters after normalization.

This corresponds with the spec update: https://dvcs.w3.org/hg/webcrypto-api/rev/5cf8db70af2e


BUG=245025

Review URL: https://chromiumcodereview.appspot.com/20475004
------------------------------------------------------------------------
Project Member Comment 34 by bugdroid1@chromium.org, Aug 1 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=155322

------------------------------------------------------------------------
r155322 | eroman@chromium.org | 2013-08-01T09:26:47.397385Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/normalize-algorithm-expected.txt?r1=155322&r2=155321&pathrev=155322
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/normalize-algorithm.html?r1=155322&r2=155321&pathrev=155322
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=155322&r2=155321&pathrev=155322

WebCrypto: Check that the key can be used for given operation.

 * key.usages must allow the operation
 * key.algorithm must match the specified operation

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/20843008
------------------------------------------------------------------------
Project Member Comment 35 by bugdroid1@chromium.org, Aug 2 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=155395

------------------------------------------------------------------------
r155395 | eroman@chromium.org | 2013-08-02T05:07:04.358908Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=155395&r2=155394&pathrev=155395
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCrypto.cpp?r1=155395&r2=155394&pathrev=155395
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.cpp?r1=155395&r2=155394&pathrev=155395
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.h?r1=155395&r2=155394&pathrev=155395
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.h?r1=155395&r2=155394&pathrev=155395
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/ScriptValue.h?r1=155395&r2=155394&pathrev=155395
   M http://src.chromium.org/viewvc/blink/trunk/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp?r1=155395&r2=155394&pathrev=155395
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify.html?r1=155395&r2=155394&pathrev=155395
   M http://src.chromium.org/viewvc/blink/trunk/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.h?r1=155395&r2=155394&pathrev=155395
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=155395&r2=155394&pathrev=155395
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.idl?r1=155395&r2=155394&pathrev=155395
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=155395&r2=155394&pathrev=155395
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest.html?r1=155395&r2=155394&pathrev=155395
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=155395&r2=155394&pathrev=155395
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=155395&r2=155394&pathrev=155395
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/normalize-algorithm.html?r1=155395&r2=155394&pathrev=155395

WebCrypto: Add crypto.subtle.verify() to the platform interfaces.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/21561004
------------------------------------------------------------------------
Project Member Comment 36 by bugdroid1@chromium.org, Aug 2 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=155451

------------------------------------------------------------------------
r155451 | eroman@chromium.org | 2013-08-02T19:20:17.793912Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.h?r1=155451&r2=155450&pathrev=155451
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.idl?r1=155451&r2=155450&pathrev=155451
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey-expected.txt?r1=155451&r2=155450&pathrev=155451
   M http://src.chromium.org/viewvc/blink/trunk/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp?r1=155451&r2=155450&pathrev=155451
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey.html?r1=155451&r2=155450&pathrev=155451
   M http://src.chromium.org/viewvc/blink/trunk/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.h?r1=155451&r2=155450&pathrev=155451
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=155451&r2=155450&pathrev=155451
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=155451&r2=155450&pathrev=155451

WebCrypto: add interface for crypto.subtle.generateKey().

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/21705002
------------------------------------------------------------------------
Project Member Comment 37 by bugdroid1@chromium.org, Aug 3 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=155458

------------------------------------------------------------------------
r155458 | eroman@chromium.org | 2013-08-03T00:16:51.572559Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaKeyGenParams.cpp?r1=155458&r2=155457&pathrev=155458
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/normalize-algorithm.html?r1=155458&r2=155457&pathrev=155458
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaSsaParams.cpp?r1=155458&r2=155457&pathrev=155458
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaKeyGenParams.h?r1=155458&r2=155457&pathrev=155458
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=155458&r2=155457&pathrev=155458
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaSsaParams.h?r1=155458&r2=155457&pathrev=155458
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=155458&r2=155457&pathrev=155458
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp?r1=155458&r2=155457&pathrev=155458
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/normalize-algorithm-expected.txt?r1=155458&r2=155457&pathrev=155458
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithmParams.h?r1=155458&r2=155457&pathrev=155458
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/custom/V8AlgorithmCustom.cpp?r1=155458&r2=155457&pathrev=155458
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacParams.cpp?r1=155458&r2=155457&pathrev=155458
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=155458&r2=155457&pathrev=155458
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesKeyGenParams.cpp?r1=155458&r2=155457&pathrev=155458
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaKeyGenParams.idl?r1=155458&r2=155457&pathrev=155458
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesCbcParams.cpp?r1=155458&r2=155457&pathrev=155458
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Algorithm.cpp?r1=155458&r2=155457&pathrev=155458
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaSsaParams.idl?r1=155458&r2=155457&pathrev=155458

WebCrypto: Add algorithm normalization rules for RSASSA-PKCS1-v1_5.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/21759002
------------------------------------------------------------------------
Blockedon: chromium:267888
Project Member Comment 39 by bugdroid1@chromium.org, Aug 9 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=155870

------------------------------------------------------------------------
r155870 | eroman@chromium.org | 2013-08-09T20:57:32.658939Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=155870&r2=155869&pathrev=155870

Remove references to specific WebCrypto section number in code comments.

The numbering has changed in the latest version of the draft, so best not to hardcode it.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/22727002
------------------------------------------------------------------------
Project Member Comment 40 by bugdroid1@chromium.org, Aug 19 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=156338

------------------------------------------------------------------------
r156338 | eroman@chromium.org | 2013-08-19T21:48:58.029802Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=156338&r2=156337&pathrev=156338
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=156338&r2=156337&pathrev=156338
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/normalize-algorithm.html?r1=156338&r2=156337&pathrev=156338
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=156338&r2=156337&pathrev=156338
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.cpp?r1=156338&r2=156337&pathrev=156338
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCrypto.cpp?r1=156338&r2=156337&pathrev=156338
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-expected.txt?r1=156338&r2=156337&pathrev=156338
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.h?r1=156338&r2=156337&pathrev=156338
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.h?r1=156338&r2=156337&pathrev=156338
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-expected.txt?r1=156338&r2=156337&pathrev=156338
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/normalize-algorithm-expected.txt?r1=156338&r2=156337&pathrev=156338
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyOperation.cpp?r1=156338&r2=156337&pathrev=156338
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify.html?r1=156338&r2=156337&pathrev=156338
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=156338&r2=156337&pathrev=156338
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyOperation.h?r1=156338&r2=156337&pathrev=156338
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.idl?r1=156338&r2=156337&pathrev=156338
   M http://src.chromium.org/viewvc/blink/trunk/Source/testing/runner/MockWebCrypto.cpp?r1=156338&r2=156337&pathrev=156338
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=156338&r2=156337&pathrev=156338
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoOperation.idl?r1=156338&r2=156337&pathrev=156338
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest.html?r1=156338&r2=156337&pathrev=156338
   M http://src.chromium.org/viewvc/blink/trunk/Source/testing/runner/MockWebCrypto.h?r1=156338&r2=156337&pathrev=156338

WebCrypto: Remove support for multi-part operations.

This matches the recent change to the standard:
https://dvcs.w3.org/hg/webcrypto-api/rev/a0dce4c0a74d

In particular, CryptoOperation does not exist anymore (i.e. no CryptoOperation.process(), CryptoOperation.abort(), CryptoOperation.finish(), CryptoOperation.algorithm).

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/23164012
------------------------------------------------------------------------
Project Member Comment 41 by bugdroid1@chromium.org, Aug 20 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=156343

------------------------------------------------------------------------
r156343 | eroman@chromium.org | 2013-08-19T23:59:03.862733Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Algorithm.cpp?r1=156343&r2=156342&pathrev=156343
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey-expected.txt?r1=156343&r2=156342&pathrev=156343
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=156343&r2=156342&pathrev=156343
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp?r1=156343&r2=156342&pathrev=156343
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithmParams.h?r1=156343&r2=156342&pathrev=156343
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacKeyParams.h?r1=156343&r2=156342&pathrev=156343
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/custom/V8AlgorithmCustom.cpp?r1=156343&r2=156342&pathrev=156343
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacKeyParams.idl?r1=156343&r2=156342&pathrev=156343
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey.html?r1=156343&r2=156342&pathrev=156343
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=156343&r2=156342&pathrev=156343
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=156343&r2=156342&pathrev=156343
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=156343&r2=156342&pathrev=156343
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacKeyParams.cpp?r1=156343&r2=156342&pathrev=156343

WebCrypto: Add length parameter for HMAC key generation.

This corresponds with the spec change that adds HmacKeyParams:
https://dvcs.w3.org/hg/webcrypto-api/rev/a7155b0c720d

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/23129011
------------------------------------------------------------------------
Project Member Comment 42 by bugdroid1@chromium.org, Aug 21 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=156487

------------------------------------------------------------------------
r156487 | eroman@chromium.org | 2013-08-21T19:09:36.685402Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify.html?r1=156487&r2=156486&pathrev=156487
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey.html?r1=156487&r2=156486&pathrev=156487
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=156487&r2=156486&pathrev=156487
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt-expected.txt?r1=156487&r2=156486&pathrev=156487
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-expected.txt?r1=156487&r2=156486&pathrev=156487
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=156487&r2=156486&pathrev=156487
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt.html?r1=156487&r2=156486&pathrev=156487
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=156487&r2=156486&pathrev=156487
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey-expected.txt?r1=156487&r2=156486&pathrev=156487
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-expected.txt?r1=156487&r2=156486&pathrev=156487
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest.html?r1=156487&r2=156486&pathrev=156487

WebCrypto: the refactor layout tests.

Cleans up the layout tests to use a more idiomatic pattern for Promises. Before it was using a wrapper to serialize a set of async tests, whereas now it is creating a chain of Promises.

This change also adds some additional tests for algorithm normalization.

BUG=245025
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/23126008
------------------------------------------------------------------------
Project Member Comment 43 by bugdroid1@chromium.org, Aug 21 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=156498

------------------------------------------------------------------------
r156498 | eroman@chromium.org | 2013-08-21T20:38:03.721445Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=156498&r2=156497&pathrev=156498
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.cpp?r1=156498&r2=156497&pathrev=156498
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify.html?r1=156498&r2=156497&pathrev=156498
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.h?r1=156498&r2=156497&pathrev=156498
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=156498&r2=156497&pathrev=156498
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt-expected.txt?r1=156498&r2=156497&pathrev=156498

WebCrypto: Check for HmacKeyParams when seeing if a Key can be used for an Algorithm.

The testing of HMAC equivalance was broken by r156343, since keys made by generateKey() would have a different parameter type.

This change:
  (1) Fixes the above bug
  (2) Refactors the code to live in Key.cpp rather than SubtleCrypto.cpp (since the latter is already large).
  (3) Adds a more descriptive message to the exception thrown when keys don't match.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/22849026
------------------------------------------------------------------------
Project Member Comment 44 by bugdroid1@chromium.org, Aug 22 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=156533

------------------------------------------------------------------------
r156533 | eroman@chromium.org | 2013-08-22T03:06:26.181170Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt-expected.txt?r1=156533&r2=156532&pathrev=156533
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-expected.txt?r1=156533&r2=156532&pathrev=156533
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=156533&r2=156532&pathrev=156533
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey-expected.txt?r1=156533&r2=156532&pathrev=156533
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-expected.txt?r1=156533&r2=156532&pathrev=156533
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=156533&r2=156532&pathrev=156533

WebCrypto: Add exception messages for algorithm normalization failures.

----------
Overview
----------

There are many problems that can occur during algorithm normalization, and they all have the same exception type (TypeError).

Without a good exception description, it is difficult for users of the API to know what went wrong (I have been experiencing this very problem while writing layout tests)

This change additionally enforces the range on numeric parameters (i.e. [EnforceRange]), which was previously a FIXME. This behavior isn't part of the WebCrypto spec yet, however it will be in a future update (https://www.w3.org/Bugs/Public/show_bug.cgi?id=23017).

----------
Examples
----------

Here are some examples of the new exception messages:

(1) "Algorithm: AES-CBC: AesCbcParams: iv: Missing or not a ArrayBufferView"

(Meaning: Didn't specify the iv parameter for AES-CBC. Users can see what is expected by looking at the "AesCbcParams" dictionary in the specification)

(2) "Algorithm: HMAC: HmacParams: hash: Missing or not a dictionary."

(Meaning: Didn't specify the hash attribute for an HMAC Algorithm. Users can see what is expected by looking at the HmacParams dictionary in the specification)

(3) "Algorithm: HMAC: HmacParams: hash: Algorithm: name: Missing or not a string."

(Meaning: Didn't specify "hash.name" for an HMAC Algorithm)

(4) "Algorithm: HMAC: HmacParams: hash: Algorithm: Unrecognized algorithm name."

(Meaning: specified hash.name, however it didn't identify a registered algorithm).

(5) "Algorithm: HMAC: HmacParams: hash: Algorithm: AES-CBC: Unsupported operation."

(Meaning: the "hash" specified for HMAC was AES-CBC, which is NOT a valid digest. This error message would be better if it said: "Does not support digest". I will re-visit that in a follow-up CL, since it requires some extra work)

----------
Implementation
----------

The implementation works by keeping a stack of string literals which describe the context of the error. A stack works better than an individual string, since algorithm identifiers can be nested and property names alone are ambiguous.

There is very little overhead to keeping track of the context while parsing algorithm identifiers, since string literals are cheap to push into a stack (no extra allocations). A final string is constructed only on failure by joining all the literals in the stack with ": ".

BUG=245025
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/22992006
------------------------------------------------------------------------
Project Member Comment 45 by bugdroid1@chromium.org, Aug 22 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=156549

------------------------------------------------------------------------
r156549 | eroman@chromium.org | 2013-08-22T06:51:34.465109Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.cpp?r1=156549&r2=156548&pathrev=156549
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=156549&r2=156548&pathrev=156549
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.h?r1=156549&r2=156548&pathrev=156549
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=156549&r2=156548&pathrev=156549
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt-expected.txt?r1=156549&r2=156548&pathrev=156549
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-expected.txt?r1=156549&r2=156548&pathrev=156549
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt.html?r1=156549&r2=156548&pathrev=156549
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=156549&r2=156548&pathrev=156549
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey-expected.txt?r1=156549&r2=156548&pathrev=156549
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-expected.txt?r1=156549&r2=156548&pathrev=156549

WebCrypto: Add more exception messages.

* Use message names to differentiate TypeErrors for various arguments: key, keyUsages, keyFormat, keyData, signature
* If both the keyFormat AND keyUsage are invalid, the exception thrown should be for the bad keyFormat (in order to match the spec, since now the two exceptions are differentiatable)
* If the Key argument is missing AND the algorithm cannot be normalized, the exception thrown should be for the missing Key.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/22980026
------------------------------------------------------------------------
Cc: ellyjo...@chromium.org
Project Member Comment 47 by bugdroid1@chromium.org, Aug 22 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=156578

------------------------------------------------------------------------
r156578 | eroman@chromium.org | 2013-08-22T21:06:24.085463Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCrypto.cpp?r1=156578&r2=156577&pathrev=156578

WebCrypto: assert that WebArrayBuffers are not null.

This is a defensive check in case the platform layer passes in a bogus WebArrayBuffer. It is possible to create a null WebArrayBuffer by making its byte size exceed 2^32. For instance "WebArrayBuffer::create(0xFFFFFFFF, 8)"

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/23003021
------------------------------------------------------------------------
Project Member Comment 48 by bugdroid1@chromium.org, Aug 24 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=156675

------------------------------------------------------------------------
r156675 | eroman@chromium.org | 2013-08-24T20:40:16.503128Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/Dictionary.h?r1=156675&r2=156674&pathrev=156675
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey.html?r1=156675&r2=156674&pathrev=156675
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey-expected.txt?r1=156675&r2=156674&pathrev=156675
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/Dictionary.cpp?r1=156675&r2=156674&pathrev=156675
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=156675&r2=156674&pathrev=156675

WebCrypto: properly normalize optional numeric parameters.

This addresses a FIXME, and also improves an exception message.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/23361019
------------------------------------------------------------------------
Project Member Comment 49 by bugdroid1@chromium.org, Aug 28 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=156810

------------------------------------------------------------------------
r156810 | eroman@chromium.org | 2013-08-28T03:18:25.827635Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=156810&r2=156809&pathrev=156810
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=156810&r2=156809&pathrev=156810
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoResult.cpp?r1=156810&r2=156809&pathrev=156810
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=156810&r2=156809&pathrev=156810
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCrypto.cpp?r1=156810&r2=156809&pathrev=156810
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoResult.h?r1=156810&r2=156809&pathrev=156810

Cleanup: remove WebCryptoResultPrivate from blink API.

The interface had originally been exposed for chromium-side unit-tests, but jamesr suggests using a different approach.

This change also moves CryptoResult to a standalone file.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/23338006
------------------------------------------------------------------------
Project Member Comment 50 by bugdroid1@chromium.org, Aug 28 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=156824

------------------------------------------------------------------------
r156824 | eroman@chromium.org | 2013-08-28T06:36:19.431993Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyPair.h?r1=156824&r2=156823&pathrev=156824
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyPair.idl?r1=156824&r2=156823&pathrev=156824
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey.html?r1=156824&r2=156823&pathrev=156824
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=156824&r2=156823&pathrev=156824
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=156824&r2=156823&pathrev=156824
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoResult.cpp?r1=156824&r2=156823&pathrev=156824
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCrypto.cpp?r1=156824&r2=156823&pathrev=156824
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoResult.h?r1=156824&r2=156823&pathrev=156824
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyPair.cpp?r1=156824&r2=156823&pathrev=156824
   M http://src.chromium.org/viewvc/blink/trunk/Source/testing/runner/MockWebCrypto.cpp?r1=156824&r2=156823&pathrev=156824
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey-expected.txt?r1=156824&r2=156823&pathrev=156824

WebCrypto: Add the KeyPair interface.

Spec: https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#keypair

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/23617006
------------------------------------------------------------------------
Project Member Comment 51 by bugdroid1@chromium.org, Aug 30 2013
------------------------------------------------------------------------
r220470 | bryaneyler@google.com | 2013-08-30T01:32:54.667118Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_tests.gypi?r1=220470&r2=220469&pathrev=220470
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_renderer.gypi?r1=220470&r2=220469&pathrev=220470
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_unittest.cc?r1=220470&r2=220469&pathrev=220470
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl.cc?r1=220470&r2=220469&pathrev=220470
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl.h?r1=220470&r2=220469&pathrev=220470
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_nss.cc?r1=220470&r2=220469&pathrev=220470
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_openssl.cc?r1=220470&r2=220469&pathrev=220470

WebCrypto: Implement digest() using NSS

BUG=245025
R=eroman@chromium.org

Review URL: https://chromiumcodereview.appspot.com/19757011
------------------------------------------------------------------------
Project Member Comment 52 by bugdroid1@chromium.org, Aug 30 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=156972

------------------------------------------------------------------------
r156972 | eroman@chromium.org | 2013-08-30T08:44:53.899275Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacKeyParams.cpp?r1=156972&r2=156971&pathrev=156972
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithmParams.h?r1=156972&r2=156971&pathrev=156972

Refactor how the "length" parameter is obtained for HmacKeyParams.

This makes it more clear to the caller that the length parameter is optional and may not be present. Being more defensive is desirable, since I saw a code review which tried to use the value without checking if it was present.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/23455017
------------------------------------------------------------------------
Project Member Comment 53 by bugdroid1@chromium.org, Aug 30 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=156974

------------------------------------------------------------------------
r156974 | eroman@chromium.org | 2013-08-30T08:56:42.490541Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=156974&r2=156973&pathrev=156974

Cleanup: Remove deprecated method.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/23503013
------------------------------------------------------------------------
Project Member Comment 54 by bugdroid1@chromium.org, Aug 30 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=156976

------------------------------------------------------------------------
r156976 | eroman@chromium.org | 2013-08-30T09:21:46.323525Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/Platform.h?r1=156976&r2=156975&pathrev=156976
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=156976&r2=156975&pathrev=156976

Cleanup: Make Platform::crypto() required.

The feature can be turned off via a runtime flag, so not much to be gained by allowing NULL when it is on.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/23798002
------------------------------------------------------------------------
Project Member Comment 55 by bugdroid1@chromium.org, Aug 30 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=157014

------------------------------------------------------------------------
r157014 | eroman@chromium.org | 2013-08-30T20:17:22.430941Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey.html?r1=157014&r2=157013&pathrev=157014
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=157014&r2=157013&pathrev=157014
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.h?r1=157014&r2=157013&pathrev=157014
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.idl?r1=157014&r2=157013&pathrev=157014
   M http://src.chromium.org/viewvc/blink/trunk/Source/testing/runner/MockWebCrypto.cpp?r1=157014&r2=157013&pathrev=157014
   M http://src.chromium.org/viewvc/blink/trunk/Source/testing/runner/MockWebCrypto.h?r1=157014&r2=157013&pathrev=157014
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=157014&r2=157013&pathrev=157014
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-expected.txt?r1=157014&r2=157013&pathrev=157014
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=157014&r2=157013&pathrev=157014

WebCrypto: Add interface for exportKey().

The spec defines it on SubtleCrypto (http://www.w3.org/TR/WebCryptoAPI/#subtlecrypto-interface) but doesn't give any other details. (The behavior with regard to extractability is inferred by this change)

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/23592023
------------------------------------------------------------------------
Project Member Comment 56 by bugdroid1@chromium.org, Aug 30 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=157016

------------------------------------------------------------------------
r157016 | eroman@chromium.org | 2013-08-30T20:22:40.766916Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=157016&r2=157015&pathrev=157016
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Algorithm.cpp?r1=157016&r2=157015&pathrev=157016
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=157016&r2=157015&pathrev=157016
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp?r1=157016&r2=157015&pathrev=157016
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.h?r1=157016&r2=157015&pathrev=157016

Cleanup: Remove the WebCryptoAlgorithm::name() attribute.

This wasn't needed on the embedder's side so may as well remove it from the public API and save a word. (it was also awkward having to pass this in when constructing a WebCryptoAlgorithm)

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/23503016
------------------------------------------------------------------------
Project Member Comment 57 by bugdroid1@chromium.org, Sep 3 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=157133

------------------------------------------------------------------------
r157133 | eroman@chromium.org | 2013-09-03T17:18:28.873880Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify.html?r1=157133&r2=157132&pathrev=157133
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey.html?r1=157133&r2=157132&pathrev=157133
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=157133&r2=157132&pathrev=157133
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=157133&r2=157132&pathrev=157133
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey-expected.txt?r1=157133&r2=157132&pathrev=157133
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=157133&r2=157132&pathrev=157133

WebCrypto: Add algorithm normalization rules for RSAES-PKCS1-v1_5.

As defined by:
https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#rsaes-pkcs1

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/23441021
------------------------------------------------------------------------
Project Member Comment 58 by bugdroid1@chromium.org, Sep 10 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=157532

------------------------------------------------------------------------
r157532 | eroman@chromium.org | 2013-09-10T18:10:54.757267Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/testing/runner/MockWebCrypto.cpp?r1=157532&r2=157531&pathrev=157532
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithmParams.h?r1=157532&r2=157531&pathrev=157532
   M http://src.chromium.org/viewvc/blink/trunk/Source/testing/runner/MockWebCrypto.h?r1=157532&r2=157531&pathrev=157532
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=157532&r2=157531&pathrev=157532
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=157532&r2=157531&pathrev=157532
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCrypto.cpp?r1=157532&r2=157531&pathrev=157532

WebCrypto: [refactor] Use "unsigned" rather than "size_t" for buffer sizes in the public API.

Justification:

I have noticed some instances where the Chromium-side implementation is directly passing this "size_t" as the buffer length to NSS.

NSS however expects buffer lengths as "unsigned int", and the C++ compiler implicitly converts the "size_t" to an "unsigned int". This conversion is dangerous, since theoretically it could result in truncation of the buffer length given to NSS. (Under LP64 datamodel for instance).

Chromium's compilation settings don't warn about such issues.

In practice this isn't a problem, and likely never will be, since in Blink ArrayBuffers are limited to lengths of 2^32-1.

It is therefore a good idea to pass a narrower datatype in the API to make this obvious. Embedder shouldn't have to worry about dealing with buffer sizes in the full range of size_t.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/23537027
------------------------------------------------------------------------
Project Member Comment 59 by bugdroid1@chromium.org, Sep 13 2013
------------------------------------------------------------------------
r223139 | eroman@chromium.org | 2013-09-13T22:11:09.758949Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/nss/nss/exports_win.def?r1=223139&r2=223138&pathrev=223139

Add NSS export for PK11_ImportSymKeyWithFlags.

Will be used for WebCrypto.
It is already in the upstream NSS exports.

BUG=245025
R=rsleevi@chromium.org

Review URL: https://codereview.appspot.com/13474047
------------------------------------------------------------------------
Project Member Comment 60 by bugdroid1@chromium.org, Sep 14 2013
------------------------------------------------------------------------
r223258 | eroman@chromium.org | 2013-09-14T21:27:47.190776Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/DEPS?r1=223258&r2=223257&pathrev=223258

Update nss to r223139.

The only change is to exports_win.def which adds PK11_ImportSymKeyWithFlags.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/23475047
------------------------------------------------------------------------
Project Member Comment 61 by bugdroid1@chromium.org, Sep 17 2013
------------------------------------------------------------------------
r223506 | bryaneyler@google.com | 2013-09-17T01:45:02.505696Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_unittest.cc?r1=223506&r2=223505&pathrev=223506
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl.cc?r1=223506&r2=223505&pathrev=223506
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl.h?r1=223506&r2=223505&pathrev=223506
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_nss.cc?r1=223506&r2=223505&pathrev=223506
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_openssl.cc?r1=223506&r2=223505&pathrev=223506

WebCrypto: Implement importKey() and sign() for HMAC in NSS

BUG=245025
R=eroman@chromium.org,ellyjones@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23569007
------------------------------------------------------------------------
Project Member Comment 62 by bugdroid1@chromium.org, Sep 17 2013
------------------------------------------------------------------------
r223612 | finnur@chromium.org | 2013-09-17T14:29:42.092300Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl.cc?r1=223612&r2=223611&pathrev=223612
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl.h?r1=223612&r2=223611&pathrev=223612
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_nss.cc?r1=223612&r2=223611&pathrev=223612
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_openssl.cc?r1=223612&r2=223611&pathrev=223612
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_unittest.cc?r1=223612&r2=223611&pathrev=223612

Revert 223506 "WebCrypto: Implement importKey() and sign() for H..."

Believe it caused a compile failure on Linux. See:
http://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Linux%20x64

> WebCrypto: Implement importKey() and sign() for HMAC in NSS
> 
> BUG=245025
> R=eroman@chromium.org,ellyjones@chromium.org
> 
> Review URL: https://chromiumcodereview.appspot.com/23569007

TBR=bryaneyler@google.com

Review URL: https://codereview.chromium.org/24205003
------------------------------------------------------------------------
Project Member Comment 63 by bugdroid1@chromium.org, Sep 18 2013
------------------------------------------------------------------------
r223813 | bryaneyler@google.com | 2013-09-18T07:45:32.059723Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_unittest.cc?r1=223813&r2=223812&pathrev=223813
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl.cc?r1=223813&r2=223812&pathrev=223813
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl.h?r1=223813&r2=223812&pathrev=223813
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_nss.cc?r1=223813&r2=223812&pathrev=223813
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_openssl.cc?r1=223813&r2=223812&pathrev=223813
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/installer/linux/debian/expected_deps?r1=223813&r2=223812&pathrev=223813

WebCrypto: Implement importKey() and sign() for HMAC in NSS

BUG=245025
R=eroman@chromium.org,ellyjones@chromium.org,jamesr@chromium.org,mmoss@chromium.org,phajdan.jr@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23569007
------------------------------------------------------------------------
Project Member Comment 64 by bugdroid1@chromium.org, Sep 27 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=158389

------------------------------------------------------------------------
r158389 | eroman@chromium.org | 2013-09-26T18:41:10.155045Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=158389&r2=158388&pathrev=158389

Temporarily disable WebCrypto layout tests.

This is to enable landing a sequence of patches:

(1) Disable tests (this CL), roll blink
(2) Land chromium side (https://codereview.chromium.org/24702003/)
(3) Land blink side (https://codereview.chromium.org/24467004), and re-enable the LayoutTests

TBR=abarth
BUG=245025

Review URL: https://codereview.chromium.org/24492006
------------------------------------------------------------------------
Project Member Comment 65 by bugdroid1@chromium.org, Sep 27 2013
------------------------------------------------------------------------
r225365 | eroman@chromium.org | 2013-09-26T06:47:14.863948Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_unittest.cc?r1=225365&r2=225364&pathrev=225365
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl.h?r1=225365&r2=225364&pathrev=225365

Refactor webcrypto unittests.

Extracts some helper functions which will be re-used for AES-CBC tests. Notably, importing of secret keys and comparison of arraybuffer against hex string.

BUG=245025

Review URL: https://codereview.chromium.org/24237013
------------------------------------------------------------------------
Project Member Comment 66 by bugdroid1@chromium.org, Sep 27 2013
------------------------------------------------------------------------
r225589 | bryaneyler@google.com | 2013-09-26T22:28:10.706393Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl.h?r1=225589&r2=225588&pathrev=225589
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_nss.cc?r1=225589&r2=225588&pathrev=225589
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_openssl.cc?r1=225589&r2=225588&pathrev=225589
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_unittest.cc?r1=225589&r2=225588&pathrev=225589
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl.cc?r1=225589&r2=225588&pathrev=225589

Implement verify() for HMAC using NSS

BUG=245025

Review URL: https://codereview.chromium.org/24616003
------------------------------------------------------------------------
Project Member Comment 67 by bugdroid1@chromium.org, Sep 27 2013
------------------------------------------------------------------------
r225659 | eroman@chromium.org | 2013-09-27T05:02:36.434059Z

Changed paths:
   D http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_nss.cc?r1=225659&r2=225658&pathrev=225659
   D http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_openssl.cc?r1=225659&r2=225658&pathrev=225659
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/OWNERS?r1=225659&r2=225658&pathrev=225659
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_tests.gypi?r1=225659&r2=225658&pathrev=225659
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto?r1=225659&r2=225658&pathrev=225659
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=225659&r2=225658&pathrev=225659
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_renderer.gypi?r1=225659&r2=225658&pathrev=225659
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=225659&r2=225658&pathrev=225659
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/renderer_webkitplatformsupport_impl.cc?r1=225659&r2=225658&pathrev=225659
   D http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl_unittest.cc?r1=225659&r2=225658&pathrev=225659
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.h?r1=225659&r2=225658&pathrev=225659
   D http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl.cc?r1=225659&r2=225658&pathrev=225659
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=225659&r2=225658&pathrev=225659
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=225659&r2=225658&pathrev=225659
   D http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto_impl.h?r1=225659&r2=225658&pathrev=225659

[webcrypto] Move the files to a subdirectory (content/renderer/webcrypto).

BUG=245025
R=jamesr@chromium.org, jochen@chromium.org

Review URL: https://codereview.chromium.org/24494003
------------------------------------------------------------------------
Project Member Comment 68 by bugdroid1@chromium.org, Sep 27 2013
------------------------------------------------------------------------
r225665 | eroman@chromium.org | 2013-09-27T05:16:03.162266Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/renderer/content_renderer_client.cc?r1=225665&r2=225664&pathrev=225665
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/shell/renderer/shell_content_renderer_client.cc?r1=225665&r2=225664&pathrev=225665
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/renderer/content_renderer_client.h?r1=225665&r2=225664&pathrev=225665
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/renderer_webkitplatformsupport_impl.cc?r1=225665&r2=225664&pathrev=225665
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/shell/renderer/shell_content_renderer_client.h?r1=225665&r2=225664&pathrev=225665

[webcrypto] Remove the mock implementation of WebCrypto.

Instead let the layout tests run with WebCryptoImpl.

R=jamesr@chromium.org, jochen@chromium.org
TBR=joi
BUG=245025

Review URL: https://codereview.chromium.org/24702003
------------------------------------------------------------------------
Project Member Comment 69 by bugdroid1@chromium.org, Sep 27 2013
------------------------------------------------------------------------
r225673 | eroman@chromium.org | 2013-09-27T06:46:47.518470Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.h?r1=225673&r2=225672&pathrev=225673

Fixup ifdef guards following a move.

TBR=rsleevi
BUG=245025

Review URL: https://codereview.chromium.org/24969002
------------------------------------------------------------------------
Project Member Comment 70 by bugdroid1@chromium.org, Sep 27 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=158426

------------------------------------------------------------------------
r158426 | eroman@chromium.org | 2013-09-27T07:57:41.293709Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=158426&r2=158425&pathrev=158426
   D http://src.chromium.org/viewvc/blink/trunk/Source/testing/runner/MockWebCrypto.cpp?r1=158426&r2=158425&pathrev=158426
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=158426&r2=158425&pathrev=158426
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey-expected.txt?r1=158426&r2=158425&pathrev=158426
   M http://src.chromium.org/viewvc/blink/trunk/public/testing/WebTestInterfaces.h?r1=158426&r2=158425&pathrev=158426
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest.html?r1=158426&r2=158425&pathrev=158426
   D http://src.chromium.org/viewvc/blink/trunk/Source/testing/runner/MockWebCrypto.h?r1=158426&r2=158425&pathrev=158426
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=158426&r2=158425&pathrev=158426
   M http://src.chromium.org/viewvc/blink/trunk/Source/testing/runner/runner.gypi?r1=158426&r2=158425&pathrev=158426
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=158426&r2=158425&pathrev=158426
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-expected.txt?r1=158426&r2=158425&pathrev=158426
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey.html?r1=158426&r2=158425&pathrev=158426
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-expected.txt?r1=158426&r2=158425&pathrev=158426
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify.html?r1=158426&r2=158425&pathrev=158426
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey.html?r1=158426&r2=158425&pathrev=158426
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-expected.txt?r1=158426&r2=158425&pathrev=158426
   M http://src.chromium.org/viewvc/blink/trunk/Source/testing/runner/WebTestInterfaces.cpp?r1=158426&r2=158425&pathrev=158426

[webcrypto] Remove MockWebCrypto.

After a forthcoming Chromium-side change, Blink will be using the chromium-provided WebCryptoImpl rather than MockWebCrypto.

The consequence is the layout test and expectations need to be modified a bit since (a) some features will no longer be testable, and (b) other results that were hardcoded by the mock must be updated.

There is a slight coverage hit from this change, however that will be fixed gradually as the layout tests are updated to match the bits implemented by chromium side.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/24467004
------------------------------------------------------------------------
Project Member Comment 71 by bugdroid1@chromium.org, Sep 27 2013
------------------------------------------------------------------------
r225689 | eroman@chromium.org | 2013-09-27T10:50:54.237603Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=225689&r2=225688&pathrev=225689
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=225689&r2=225688&pathrev=225689
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.h?r1=225689&r2=225688&pathrev=225689
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=225689&r2=225688&pathrev=225689
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=225689&r2=225688&pathrev=225689

[webcrypto] Implement encrypt() and importKey() for AES-CBC using NSS.

BUG=245025
R=bryaneyler@google.com, rsleevi@chromium.org

Review URL: https://codereview.chromium.org/23441078
------------------------------------------------------------------------
Project Member Comment 72 by bugdroid1@chromium.org, Sep 27 2013
------------------------------------------------------------------------
r225743 | eroman@chromium.org | 2013-09-27T18:25:24.282597Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=225743&r2=225742&pathrev=225743
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=225743&r2=225742&pathrev=225743
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.h?r1=225743&r2=225742&pathrev=225743
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=225743&r2=225742&pathrev=225743
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=225743&r2=225742&pathrev=225743

[webcrypto] Add decrypt() for AES-CBC.

BUG=245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/24656002
------------------------------------------------------------------------
Project Member Comment 73 by bugdroid1@chromium.org, Sep 27 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=158463

------------------------------------------------------------------------
r158463 | eroman@chromium.org | 2013-09-27T18:35:12.804583Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify.html?r1=158463&r2=158462&pathrev=158463
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=158463&r2=158462&pathrev=158463
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=158463&r2=158462&pathrev=158463

Reenable the webcrypto layouttests following the remove of MockWebCrypto.

Don't run the tests yet on Android, since the OpenSSL implementation is less complete.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/24993002
------------------------------------------------------------------------
Project Member Comment 74 by bugdroid1@chromium.org, Sep 27 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=158464

------------------------------------------------------------------------
r158464 | eroman@chromium.org | 2013-09-27T18:42:17.694584Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/page/RuntimeEnabledFeatures.in?r1=158464&r2=158463&pathrev=158464

Turn webcrtypo from "test" to "experimental".

So that it is available in the browser, and not just to the test runner.

BUG=245025

Review URL: https://chromiumcodereview.appspot.com/24980003
------------------------------------------------------------------------
Project Member Comment 75 by bugdroid1@chromium.org, Sep 27 2013
------------------------------------------------------------------------
r225750 | eroman@chromium.org | 2013-09-27T19:10:56.075217Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=225750&r2=225749&pathrev=225750
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=225750&r2=225749&pathrev=225750
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.h?r1=225750&r2=225749&pathrev=225750
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=225750&r2=225749&pathrev=225750
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=225750&r2=225749&pathrev=225750

Revert "[webcrypto] Add decrypt() for AES-CBC."

This reverts commit r225743

BUG=245025

Review URL: https://codereview.chromium.org/25032003
------------------------------------------------------------------------
Project Member Comment 76 by bugdroid1@chromium.org, Oct 1 2013
------------------------------------------------------------------------
r226092 | eroman@chromium.org | 2013-10-01T00:42:30.610415Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.h?r1=226092&r2=226091&pathrev=226092
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=226092&r2=226091&pathrev=226092
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=226092&r2=226091&pathrev=226092
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=226092&r2=226091&pathrev=226092
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=226092&r2=226091&pathrev=226092

[webcrypto] Add decrypt() for AES-CBC.

BUG=245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/24656002
------------------------------------------------------------------------
Tried this today. The promises for generateKey are never resolved, and there is no test for it.
Project Member Comment 78 by bugdroid1@chromium.org, Oct 15 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=159690

------------------------------------------------------------------------
r159690 | eroman@chromium.org | 2013-10-15T20:45:05.726865Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/custom/V8AlgorithmCustom.cpp?r1=159690&r2=159689&pathrev=159690
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=159690&r2=159689&pathrev=159690
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Algorithm.cpp?r1=159690&r2=159689&pathrev=159690
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=159690&r2=159689&pathrev=159690
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp?r1=159690&r2=159689&pathrev=159690
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithmParams.h?r1=159690&r2=159689&pathrev=159690

[webcrypto] Add parameters for AES-GCM and RSA-OAEP to blink API.

This adds definitions for AesGcmParams [1] RsaOaepParams [2].

I will add the parsing and reflection to an IDL interface in a follow-up changelist. This initial changelist just adds the public definitions, so that it can start to be used by the chromium side implementation.

[1] https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#aes-gcm-params
[2] https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#dfn-RsaOaepParams

BUG=245025

Review URL: https://codereview.chromium.org/26426002
------------------------------------------------------------------------
Project Member Comment 79 by bugdroid1@chromium.org, Oct 24 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=160452

------------------------------------------------------------------------
r160452 | eroman@chromium.org | 2013-10-24T15:29:23.775432Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-expected.txt?r1=160452&r2=160451&pathrev=160452
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=160452&r2=160451&pathrev=160452
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt.html?r1=160452&r2=160451&pathrev=160452
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=160452&r2=160451&pathrev=160452
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest.html?r1=160452&r2=160451&pathrev=160452
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify.html?r1=160452&r2=160451&pathrev=160452
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=160452&r2=160451&pathrev=160452

[webcypto] Add some more layouttests for digest()
BUG=245025

Review URL: https://codereview.chromium.org/39093002
------------------------------------------------------------------------
Project Member Comment 80 by bugdroid1@chromium.org, Oct 25 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=160611

------------------------------------------------------------------------
r160611 | eroman@chromium.org | 2013-10-25T19:24:30.263570Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt.html?r1=160611&r2=160610&pathrev=160611
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest.html?r1=160611&r2=160610&pathrev=160611
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt-expected.txt?r1=160611&r2=160610&pathrev=160611

[webcrypto] Add more layouttests for AES-CBC.

Adds test data for 128-bit, 192-bit, and 256-bit encryption, decryption, and key import.

Note that many of these new layouttests are duplicates of equivalent tests found in webcrypto_impl_unittest.cc: this is temporary, as I am in the process of transplanting the tests from chromium to Blink.

BUG=245025

Review URL: https://codereview.chromium.org/42743004
------------------------------------------------------------------------
Project Member Comment 81 by bugdroid1@chromium.org, Oct 26 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=160649

------------------------------------------------------------------------
r160649 | eroman@chromium.org | 2013-10-26T01:53:57.869626Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=160649&r2=160648&pathrev=160649
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=160649&r2=160648&pathrev=160649
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp?r1=160649&r2=160648&pathrev=160649
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithmParams.h?r1=160649&r2=160648&pathrev=160649
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCryptoKey.cpp?r1=160649&r2=160648&pathrev=160649

[webcrypto] Make WebCryptoAlgorithm "nullable".

This makes it simpler on the embedder side to have helper functions which either create a WebCryptoAlgorithm or fail.

It is also used for passing an optional WebCryptoAlgorithm in the WebCrypto::importKey() interface.

BUG=245025

Review URL: https://codereview.chromium.org/44993003
------------------------------------------------------------------------
Project Member Comment 82 by bugdroid1@chromium.org, Oct 31 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=160989

------------------------------------------------------------------------
r160989 | eroman@chromium.org | 2013-10-31T00:08:40.052380Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKey.h?r1=160989&r2=160988&pathrev=160989
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/exported/WebCryptoKey.cpp?r1=160989&r2=160988&pathrev=160989
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=160989&r2=160988&pathrev=160989
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCrypto.cpp?r1=160989&r2=160988&pathrev=160989

[webcrypto] Make WebCryptoKey nullable.

This is a convenience for the embedder so it is easier to use as an out-parameter like:

  WebCryptoKey key = WebCryptoKey::createNull();
  if (doSomethingThatMightFailOrCreateKey(&key)) {
    ..
  }

On the other side of the Blink API, WebCryptoKey is never expected to be null.

BUG=245025

Review URL: https://codereview.chromium.org/48753003
------------------------------------------------------------------------
Project Member Comment 83 by bugdroid1@chromium.org, Oct 31 2013
------------------------------------------------------------------------
r232003 | eroman@chromium.org | 2013-10-31T04:33:34.628613Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=232003&r2=232002&pathrev=232003
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=232003&r2=232002&pathrev=232003
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=232003&r2=232002&pathrev=232003
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=232003&r2=232002&pathrev=232003
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.h?r1=232003&r2=232002&pathrev=232003

[webcrypto] Refactor to allow for unspecified "algorithm" to importKey().

BUG=245025

Review URL: https://codereview.chromium.org/50173002
------------------------------------------------------------------------
Project Member Comment 84 by bugdroid1@chromium.org, Oct 31 2013
------------------------------------------------------------------------
r232050 | eroman@chromium.org | 2013-10-31T09:00:14.384892Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/DEPS?r1=232050&r2=232049&pathrev=232050

Roll NSS deps from r228205 --> r231937.

This picks up four patches:

r231937: Update the patch file for r231825
r231825: NSS: Typo fix for non-x86 builds in generic poly1305 code.
r231777: Expose PK11_GenerateKeyPairWithOpFlags to Windows build of NSS.
r230497: Support ChaCha20+Poly1305 cipher suites.

BUG=245025

Review URL: https://codereview.chromium.org/52113002
------------------------------------------------------------------------
Project Member Comment 85 by bugdroid1@chromium.org, Oct 31 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=161084

------------------------------------------------------------------------
r161084 | eroman@chromium.org | 2013-10-31T19:45:19.739456Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=161084&r2=161083&pathrev=161084
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=161084&r2=161083&pathrev=161084
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.idl?r1=161084&r2=161083&pathrev=161084
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-expected.txt?r1=161084&r2=161083&pathrev=161084

[webcrypto] Make algorithm nullable in crypto.subtle.importKey().

BUG=245025

Review URL: https://codereview.chromium.org/53173007
------------------------------------------------------------------------
Project Member Comment 86 by bugdroid1@chromium.org, Nov 1 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=161188

------------------------------------------------------------------------
r161188 | eroman@chromium.org | 2013-11-01T18:25:46.890716Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=161188&r2=161187&pathrev=161188
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify.html?r1=161188&r2=161187&pathrev=161188

[webcrypto] Add more LayoutTests for HMAC SHA.

BUG=245025

Review URL: https://codereview.chromium.org/54243003
------------------------------------------------------------------------
Project Member Comment 87 by bugdroid1@chromium.org, Nov 5 2013
------------------------------------------------------------------------
r232917 | eroman@chromium.org | 2013-11-05T05:32:32.423759Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=232917&r2=232916&pathrev=232917
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=232917&r2=232916&pathrev=232917
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.h?r1=232917&r2=232916&pathrev=232917

[webcrypto] Remove the TODO for NullKey().

BUG=245025

Review URL: https://codereview.chromium.org/53533004
------------------------------------------------------------------------
Project Member Comment 88 by bugdroid1@chromium.org, Nov 8 2013
------------------------------------------------------------------------
r233722 | eroman@chromium.org | 2013-11-08T00:28:04.271514Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/nss/nss/exports_win.def?r1=233722&r2=233721&pathrev=233722

Add SECKEY_GetPublicKeyType to windows exports.

BUG=245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/60803003
------------------------------------------------------------------------
Project Member Comment 89 by bugdroid1@chromium.org, Nov 8 2013
------------------------------------------------------------------------
r233810 | eroman@chromium.org | 2013-11-08T06:38:42.927130Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/DEPS?r1=233810&r2=233809&pathrev=233810

Roll NSS from 230497 --> 233722.
BUG=245025

This picks up one changelist:

Author: eroman@chromium.org <eroman@chromium.org@4ff67af0-8c30-449e-8e8b-ad334ec8d88c>
Date:   Fri Nov 8 00:28:04 2013 +0000

    Add SECKEY_GetPublicKeyType to windows exports.

    BUG=245025
    R=rsleevi@chromium.org

    Review URL: https://codereview.chromium.org/60803003

    git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/nss@233722 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Review URL: https://codereview.chromium.org/62493004
------------------------------------------------------------------------
Project Member Comment 90 by bugdroid1@chromium.org, Nov 26 2013
------------------------------------------------------------------------
r237255 | padolph@netflix.com | 2013-11-26T04:26:33.836417Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=237255&r2=237254&pathrev=237255
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=237255&r2=237254&pathrev=237255
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.h?r1=237255&r2=237254&pathrev=237255
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=237255&r2=237254&pathrev=237255
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=237255&r2=237254&pathrev=237255

[webcrypto] Add RSA public key SPKI import/export for NSS.

BUG=245025
TEST=content_unittests --gtest_filter="WebCryptoImpl*"

Review URL: https://codereview.chromium.org/62633004
------------------------------------------------------------------------
Project Member Comment 91 by bugdroid1@chromium.org, Nov 27 2013
------------------------------------------------------------------------
r237523 | padolph@netflix.com | 2013-11-27T05:43:09.249528Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=237523&r2=237522&pathrev=237523
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=237523&r2=237522&pathrev=237523

[webcrypto] Add RSA private key PKCS#8 import for NSS.

Depends on Issue 62633004.

BUG=245025
TEST=content_unittests --gtest_filter="WebCryptoImpl*"

Review URL: https://codereview.chromium.org/83483012
------------------------------------------------------------------------
Project Member Comment 92 by bugdroid1@chromium.org, Nov 28 2013
------------------------------------------------------------------------
r237746 | padolph@netflix.com | 2013-11-28T08:36:40.551346Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=237746&r2=237745&pathrev=237746
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=237746&r2=237745&pathrev=237746

[webcrypto] Add RSAES-PKCS1-v1_5 encrypt and decrypt for NSS.

BUG=245025
TEST=content_unittests --gtest_filter="WebCryptoImpl*"

Review URL: https://codereview.chromium.org/75653002
------------------------------------------------------------------------
Project Member Comment 93 by bugdroid1@chromium.org, Dec 4 2013
------------------------------------------------------------------------
r238574 | padolph@netflix.com | 2013-12-04T04:57:11.388145Z

Changed paths:
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=238574&r2=238573&pathrev=238574
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=238574&r2=238573&pathrev=238574
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_renderer.gypi?r1=238574&r2=238573&pathrev=238574
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=238574&r2=238573&pathrev=238574
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.h?r1=238574&r2=238573&pathrev=238574
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=238574&r2=238573&pathrev=238574
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=238574&r2=238573&pathrev=238574
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=238574&r2=238573&pathrev=238574

[webcrypto] Add JWK import for HMAC and AES-CBC key.

BUG=245025
TEST=content_unittests --gtest_filter="WebCryptoImpl*"

Review URL: https://codereview.chromium.org/25906002
------------------------------------------------------------------------
Project Member Comment 94 by bugdroid1@chromium.org, Dec 4 2013
------------------------------------------------------------------------
r238821 | padolph@netflix.com | 2013-12-04T23:54:32.880416Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.h?r1=238821&r2=238820&pathrev=238821
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=238821&r2=238820&pathrev=238821
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=238821&r2=238820&pathrev=238821
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=238821&r2=238820&pathrev=238821
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=238821&r2=238820&pathrev=238821
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=238821&r2=238820&pathrev=238821
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=238821&r2=238820&pathrev=238821

[webcrypto] Add JWK import of RSA public key for NSS.

This CL depends on Issue 25906002.

BUG=245025
TEST=content_unittests --gtest_filter="WebCryptoImpl*"

Review URL: https://codereview.chromium.org/76363006
------------------------------------------------------------------------
Project Member Comment 95 by bugdroid1@chromium.org, Dec 5 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=163232

------------------------------------------------------------------------
r163232 | eroman@chromium.org | 2013-12-05T08:31:05.911635Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt.html?r1=163232&r2=163231&pathrev=163232
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.cpp?r1=163232&r2=163231&pathrev=163232
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt-expected.txt?r1=163232&r2=163231&pathrev=163232

[webcrypto] order Key.usages alphabetically.

This isn't described by the WebCrypto spec, however is planned in a forthcoming update (was discussed during TPAC: https://www.w3.org/Bugs/Public/show_bug.cgi?id=22548#c1)

BUG=245025

Review URL: https://codereview.chromium.org/104653004
------------------------------------------------------------------------
Project Member Comment 96 by bugdroid1@chromium.org, Dec 5 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=163233

------------------------------------------------------------------------
r163233 | eroman@chromium.org | 2013-12-05T08:38:50.261886Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithmParams.h?r1=163233&r2=163232&pathrev=163233

[webcrypto] Mark some methods in public API as const.

BUG=245025

Review URL: https://codereview.chromium.org/105453002
------------------------------------------------------------------------
Project Member Comment 97 by bugdroid1@chromium.org, Dec 5 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=163284

------------------------------------------------------------------------
r163284 | eroman@chromium.org | 2013-12-05T20:52:57.728177Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt.html?r1=163284&r2=163283&pathrev=163284
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt-expected.txt?r1=163284&r2=163283&pathrev=163284

[webcrypto] Fix a bad test.

The test was throwing an exception due to a syntax error.

BUG=245025

Review URL: https://codereview.chromium.org/98723004
------------------------------------------------------------------------
Project Member Comment 98 by bugdroid1@chromium.org, Dec 5 2013
------------------------------------------------------------------------
r239049 | padolph@netflix.com | 2013-12-05T22:22:54.406858Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=239049&r2=239048&pathrev=239049
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=239049&r2=239048&pathrev=239049
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=239049&r2=239048&pathrev=239049
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=239049&r2=239048&pathrev=239049
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=239049&r2=239048&pathrev=239049

[webcrypto] Add symmetric key export for NSS and OpenSSL.
Also add test to check randomness of generated symmetric keys.

BUG=245025
TEST=content_unittests --gtest_filter="WebCryptoImpl*"

Review URL: https://codereview.chromium.org/100593002
------------------------------------------------------------------------
Project Member Comment 99 by bugdroid1@chromium.org, Dec 6 2013
------------------------------------------------------------------------
r239109 | eroman@chromium.org | 2013-12-06T02:55:47.121963Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=239109&r2=239108&pathrev=239109
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=239109&r2=239108&pathrev=239109
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=239109&r2=239108&pathrev=239109

[webcrypto] Implicitly set public keys to extractable.

There was consensus on this issue during TPAC, and this behavior will be called out in a forthcoming spec update.

See also: https://www.w3.org/Bugs/Public/show_bug.cgi?id=23695

BUG=245025

Review URL: https://codereview.chromium.org/104923004
------------------------------------------------------------------------
Project Member Comment 100 by bugdroid1@chromium.org, Dec 6 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=163304

------------------------------------------------------------------------
r163304 | eroman@chromium.org | 2013-12-06T06:56:45.312825Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=163304&r2=163303&pathrev=163304
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.cpp?r1=163304&r2=163303&pathrev=163304
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.h?r1=163304&r2=163303&pathrev=163304

Cleanup: Rename NumberOfAlgorithmOperations --> LastAlgorithmOperation.

This avoids having to handle the sentinel enum value inside of switch statements.

BUG=245025

Review URL: https://codereview.chromium.org/105433002
------------------------------------------------------------------------
Project Member Comment 101 by bugdroid1@chromium.org, Dec 9 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=163456

------------------------------------------------------------------------
r163456 | eroman@chromium.org | 2013-12-09T21:07:27.831026Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=163456&r2=163455&pathrev=163456
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=163456&r2=163455&pathrev=163456
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.h?r1=163456&r2=163455&pathrev=163456
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.idl?r1=163456&r2=163455&pathrev=163456
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrap-unwrap-expected.txt?r1=163456&r2=163455&pathrev=163456
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=163456&r2=163455&pathrev=163456
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.cpp?r1=163456&r2=163455&pathrev=163456
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrap-unwrap.html?r1=163456&r2=163455&pathrev=163456
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=163456&r2=163455&pathrev=163456

[webcrypto] Add crypto.subtle.wrapKey() and crypto.subtle.unwrapKey()

As described by the WebCrypto spec:
  http://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-wrapKey
  http://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-unwrapKey

In particular, this changelist introduces the javascript-side bindings. This includes the algorithm normalization, various checks on parameters like key usages and key extractability, and then defers the real cryptographic work to the embedder via two new methods on Blink API.

BUG=245025

Review URL: https://codereview.chromium.org/109223002
------------------------------------------------------------------------
Project Member Comment 102 by bugdroid1@chromium.org, Dec 11 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=163662

------------------------------------------------------------------------
r163662 | eroman@chromium.org | 2013-12-11T02:19:55.342980Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey-expected.txt?r1=163662&r2=163661&pathrev=163662
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=163662&r2=163661&pathrev=163662
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey.html?r1=163662&r2=163661&pathrev=163662
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=163662&r2=163661&pathrev=163662

[webcrypto] Add AES-KW to the list of registered algorithms.

This algorithm is not yet defined in the WebCrypto spec, however is planned for inclusion and should make a forthcoming spec update.

BUG=245025

Review URL: https://codereview.chromium.org/111603004
------------------------------------------------------------------------
Project Member Comment 103 by bugdroid1@chromium.org, Dec 11 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=163691

------------------------------------------------------------------------
r163691 | eroman@chromium.org | 2013-12-11T09:26:27.661091Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesKeyGenParams.cpp?r1=163691&r2=163690&pathrev=163691
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesCtrParams.cpp?r1=163691&r2=163690&pathrev=163691
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacKeyParams.cpp?r1=163691&r2=163690&pathrev=163691
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithmParams.h?r1=163691&r2=163690&pathrev=163691
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaKeyGenParams.cpp?r1=163691&r2=163690&pathrev=163691

[webcrypto] Refactor some of the algorithm parameter names.

 (1) Add a suffix of either "Bits" or "Bytes" to all lengths to help with misuse. [*]

 (2) Change how optional parameters are retrieved. Currently they require a getter, to prevent misuse [*]. However this is inconvenient, especially for buffers. Naming them "optional" should be enough to guide proper usage.

[*] There was a bug attempting to do this caught in a codereview.

BUG=245025

Review URL: https://codereview.chromium.org/109393003
------------------------------------------------------------------------
Project Member Comment 104 by bugdroid1@chromium.org, Dec 17 2013
------------------------------------------------------------------------
r241132 | eroman@chromium.org | 2013-12-17T03:27:43.605843Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=241132&r2=241131&pathrev=241132

Rework how webcrypto tests are disabled for inprogress OpenSSL implementation.

Rather than preventing compilation of the test code, mark the test as disabled.

BUG=245025

Review URL: https://codereview.chromium.org/106873003
------------------------------------------------------------------------
Project Member Comment 105 by bugdroid1@chromium.org, Dec 17 2013
------------------------------------------------------------------------
r241195 | eroman@chromium.org | 2013-12-17T07:50:36.499873Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=241195&r2=241194&pathrev=241195
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=241195&r2=241194&pathrev=241195
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=241195&r2=241194&pathrev=241195

[refactor] delete CreateHmacAlgorithmByHashOutputLen().

BUG=245025

Review URL: https://codereview.chromium.org/116963002
------------------------------------------------------------------------
Project Member Comment 106 by bugdroid1@chromium.org, Dec 17 2013
------------------------------------------------------------------------
r241201 | eroman@chromium.org | 2013-12-17T08:00:48.215189Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=241201&r2=241200&pathrev=241201
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=241201&r2=241200&pathrev=241201

[webcrypto] Use new parameter names (that end in "bits" vs "bytes").

BUG=245025

Review URL: https://codereview.chromium.org/113003002
------------------------------------------------------------------------
Project Member Comment 107 by bugdroid1@chromium.org, Dec 18 2013
------------------------------------------------------------------------
r241504 | padolph@netflix.com | 2013-12-18T05:52:37.899390Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=241504&r2=241503&pathrev=241504
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=241504&r2=241503&pathrev=241504

[webcrypto] Add import of AES-KW key for NSS.

BUG=245025
TEST=content_unittests --gtest_filter="WebCryptoImpl*"

Review URL: https://codereview.chromium.org/117013002
------------------------------------------------------------------------
Project Member Comment 108 by bugdroid1@chromium.org, Dec 20 2013
------------------------------------------------------------------------
r242149 | eroman@chromium.org | 2013-12-20T19:49:09.105834Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=242149&r2=242148&pathrev=242149
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=242149&r2=242148&pathrev=242149
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=242149&r2=242148&pathrev=242149
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=242149&r2=242148&pathrev=242149
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=242149&r2=242148&pathrev=242149

[webcrypto] Some fixes for HMAC

 * Wire up HMAC SHA224, HMAC SHA384, HMAC SHA512 for NSS.
 * When generating an HMAC key and the key length was not specified use
   the underlying block size for the key length (as this is the maximum
   length of the key). The OpenSSL version had a bug where it would not
   select the block size.
 * Fix a test which intended to check randomness.

BUG=245025

Review URL: https://codereview.chromium.org/108653015
------------------------------------------------------------------------
Project Member Comment 109 by bugdroid1@chromium.org, Dec 21 2013
------------------------------------------------------------------------
r242255 | padolph@netflix.com | 2013-12-21T04:30:14.553793Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=242255&r2=242254&pathrev=242255
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=242255&r2=242254&pathrev=242255
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=242255&r2=242254&pathrev=242255
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=242255&r2=242254&pathrev=242255

[webcrypto] Add key generation for AES-GCM and AES-KW for NSS.

BUG=245025
TEST=content_unittests --gtest_filter="WebCryptoImpl*"

Review URL: https://codereview.chromium.org/119413002
------------------------------------------------------------------------
Cc: sirdarck...@gmail.com
Project Member Comment 111 by bugdroid1@chromium.org, Jan 15 2014
------------------------------------------------------------------------
r244845 | eroman@chromium.org | 2014-01-15T08:23:26.404483Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=244845&r2=244844&pathrev=244845
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=244845&r2=244844&pathrev=244845

[webcrypto] Add AES-GCM using NSS.

This requires NSS version 3.15 or greater. Since Linux Chrome is using the system NSS it may not work for Linux users unless they have a more recent NSS version. Mac and Windows builds however are not affected by this and it should just work.

BUG=245025

Review URL: https://codereview.chromium.org/115653002
------------------------------------------------------------------------
Project Member Comment 112 by bugdroid1@chromium.org, Jan 16 2014
------------------------------------------------------------------------
r245298 | eroman@chromium.org | 2014-01-16T20:02:22.401452Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/nss/nss/exports_win.def?r1=245298&r2=245297&pathrev=245298

Add SEC_SignData to NSS exports.

BUG=245025

Review URL: https://codereview.chromium.org/140693005
------------------------------------------------------------------------
Project Member Comment 113 by bugdroid1@chromium.org, Jan 17 2014
------------------------------------------------------------------------
r245394 | eroman@chromium.org | 2014-01-17T00:42:51.674566Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/DEPS?r1=245394&r2=245393&pathrev=245394

Roll NSS from r244613 to r245298.

This pulls in 1 change:

r245298: Add SEC_SignData to NSS exports. (eroman@chromium.org) 

BUG=245025

Review URL: https://codereview.chromium.org/140763005
------------------------------------------------------------------------
Project Member Comment 114 by bugdroid1@chromium.org, Jan 17 2014
------------------------------------------------------------------------
r245430 | padolph@netflix.com | 2014-01-17T06:15:32.100979Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=245430&r2=245429&pathrev=245430
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=245430&r2=245429&pathrev=245430
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=245430&r2=245429&pathrev=245430
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=245430&r2=245429&pathrev=245430

[webcrypto] Add RSASSA-PKCS1-v1_5 sign and verify for NSS.

BUG=245025
TEST=content_unittests --gtest_filter="WebCryptoImpl*"

Review URL: https://codereview.chromium.org/68303009
------------------------------------------------------------------------
Project Member Comment 115 by bugdroid1@chromium.org, Jan 21 2014
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=165478

------------------------------------------------------------------------
r165478 | eroman@chromium.org | 2014-01-21T20:39:17.483889Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithmParams.h?r1=165478&r2=165477&pathrev=165478

[webcrypto] Delete some deprecated code.

BUG=245025
TBR=abarth

Review URL: https://codereview.chromium.org/141073008
------------------------------------------------------------------------
Project Member Comment 116 by bugdroid1@chromium.org, Jan 22 2014
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=165506

------------------------------------------------------------------------
r165506 | eroman@chromium.org | 2014-01-22T03:15:34.016444Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoResultImpl.h?r1=165506&r2=165505&pathrev=165506
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/CryptoResult.h?r1=165506&r2=165505&pathrev=165506
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=165506&r2=165505&pathrev=165506
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=165506&r2=165505&pathrev=165506
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoResultImpl.cpp?r1=165506&r2=165505&pathrev=165506

[webcrypto] Fix TODO regarding asynchronous completion of crypto operations.

Also expand the documentation of blink API for WebCrypto to describe thread safety and guarantees on inputs.

BUG=245025
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/133253002
------------------------------------------------------------------------
Project Member Comment 117 by bugdroid1@chromium.org, Jan 22 2014
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=165513

------------------------------------------------------------------------
r165513 | eroman@chromium.org | 2014-01-22T06:11:08.747971Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey-expected.txt?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.cpp?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest.html?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrap-unwrap.html?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.h?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoResultImpl.cpp?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCrypto.cpp?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-expected.txt?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey.html?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt.html?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoResultImpl.h?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-expected.txt?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrap-unwrap-expected.txt?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/CryptoResult.h?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.h?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify.html?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey.html?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-expected.txt?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt-expected.txt?r1=165513&r2=165512&pathrev=165513
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=165513&r2=165512&pathrev=165513

[webcrypto] Match the error handling defined by the spec.

Previously the implementation was throwing exceptions for certain errors which the spec says to return a Promise and reject it with "null". [1]

The mechanism described by the spec does not provide for communicating any error details to the developer, since the Promise is rejected with "null".

In order to demystify these errors for developers, this change additionally logs error details to the dev tools console.

The specific errors which were previously throwing an exception and are now rejecting with null + logging to console are:

 * Key is not extractable
 * Key's algorithm doesn't match that of operation
 * Key's usage does not permit the requested operation
 * Any failure in parsing the AlgorithmIdentifier dictionary (with the exception of getting the "name" attribute).

One existing exception was changed:

 * When the AlgorithmIdentifier is either missing a "name" attribute, or the "name" attribute is not a string throw a NotSupportedError - before a TypeError would be thrown.

Lastly, this change allows the embedder to provide error details when failing an operation.

[1] https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html

BUG=245025
BUG=331665
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/141413003
------------------------------------------------------------------------
Project Member Comment 118 by bugdroid1@chromium.org, Jan 22 2014
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=165519

------------------------------------------------------------------------
r165519 | eroman@chromium.org | 2014-01-22T10:29:36.945863Z

Changed paths:
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacParams.cpp?r1=165519&r2=165518&pathrev=165519
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Algorithm.idl?r1=165519&r2=165518&pathrev=165519
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify.html?r1=165519&r2=165518&pathrev=165519
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesKeyGenParams.cpp?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacParams.h?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaKeyGenParams.idl?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesCbcParams.cpp?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesKeyGenParams.h?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesCtrParams.cpp?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacKeyParams.cpp?r1=165519&r2=165518&pathrev=165519
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Algorithm.cpp?r1=165519&r2=165518&pathrev=165519
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaSsaParams.idl?r1=165519&r2=165518&pathrev=165519
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/bindings.gypi?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesCbcParams.h?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesCtrParams.h?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacKeyParams.h?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaKeyGenParams.cpp?r1=165519&r2=165518&pathrev=165519
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaSsaParams.cpp?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaKeyGenParams.h?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacParams.idl?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaSsaParams.h?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesKeyGenParams.idl?r1=165519&r2=165518&pathrev=165519
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-expected.txt?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesCbcParams.idl?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacKeyParams.idl?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/custom/V8AlgorithmCustom.cpp?r1=165519&r2=165518&pathrev=165519
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesCtrParams.idl?r1=165519&r2=165518&pathrev=165519

[webcrypto] Remove code supporting Key.algorithm.

Now the reflected Key.algorithm has ONLY a "name" property and nothing else.

The issue is that the spec [1] doesn't define what interfaces should be used to reflect back the Key's algorithm, and there are several interpretations.

Previously the Blink code was reflecting the same Algorithm as was used to import the key, or generate the key. This is awkward since it gives different parameters depending on whether the key was generated or imported (imported keys will not indicate RSA key sizes, DH groups, etc).

Rather than try to invent new interfaces for this purpose, this changelist limits Key.algorithm to JUST having a "name" property and no other parameters.

The intention is to add back a richer Key.algorithm once this has been added to the spec (so there is clarity on what the interface names should be, what normalizations to perform, and what properties to expose).

Until then, I am deleting the ambiguous code to make this more maintainable, and avoid exposing inconsistent key.algorithms to consumers of WebCrypto.

[1] https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#key-interface

BUG=245025

Review URL: https://codereview.chromium.org/144093009
------------------------------------------------------------------------
Project Member Comment 119 by bugdroid1@chromium.org, Jan 30 2014
------------------------------------------------------------------------
r248062 | eroman@chromium.org | 2014-01-30T22:40:19.185367Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=248062&r2=248061&pathrev=248062
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=248062&r2=248061&pathrev=248062
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=248062&r2=248061&pathrev=248062
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=248062&r2=248061&pathrev=248062
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.h?r1=248062&r2=248061&pathrev=248062
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=248062&r2=248061&pathrev=248062
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=248062&r2=248061&pathrev=248062

[webcrypto] Add error messages for failed operations.

BUG=245025
BUG=331665

Review URL: https://codereview.chromium.org/145083006
------------------------------------------------------------------------
Project Member Comment 120 by bugdroid1@chromium.org, Jan 31 2014
------------------------------------------------------------------------
r248108 | eroman@chromium.org | 2014-01-31T02:14:03.645130Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=248108&r2=248107&pathrev=248108
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=248108&r2=248107&pathrev=248108
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.h?r1=248108&r2=248107&pathrev=248108
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=248108&r2=248107&pathrev=248108
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=248108&r2=248107&pathrev=248108

[refactor] Split up some large switch statements.

BUG=245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/147533002
------------------------------------------------------------------------
Project Member Comment 121 by bugdroid1@chromium.org, Jan 31 2014
------------------------------------------------------------------------
r248133 | eroman@chromium.org | 2014-01-31T05:32:52.607959Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=248133&r2=248132&pathrev=248133
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=248133&r2=248132&pathrev=248133
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=248133&r2=248132&pathrev=248133
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=248133&r2=248132&pathrev=248133

[style] Remove braces from single-line if statements for style consistency.

BUG=245025

Review URL: https://codereview.chromium.org/138953016
------------------------------------------------------------------------
Project Member Comment 122 by bugdroid1@chromium.org, Jan 31 2014
------------------------------------------------------------------------
r248159 | eroman@chromium.org | 2014-01-31T10:08:50.519441Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=248159&r2=248158&pathrev=248159
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.h?r1=248159&r2=248158&pathrev=248159
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=248159&r2=248158&pathrev=248159
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=248159&r2=248158&pathrev=248159
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=248159&r2=248158&pathrev=248159
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=248159&r2=248158&pathrev=248159
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=248159&r2=248158&pathrev=248159

[style] Consistently use "unsigned int" rather than just "unsigned".

BUG=245025

Review URL: https://codereview.chromium.org/147573002
------------------------------------------------------------------------
Project Member Comment 123 by bugdroid1@chromium.org, Jan 31 2014
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=166242

------------------------------------------------------------------------
r166242 | eroman@chromium.org | 2014-01-31T20:49:51.438942Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey-expected.txt?r1=166242&r2=166241&pathrev=166242
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-expected.txt?r1=166242&r2=166241&pathrev=166242
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebCrypto.cpp?r1=166242&r2=166241&pathrev=166242

Rebaseline layout tests to include some extra error messages.

BUG=245025
BUG=331665

Review URL: https://codereview.chromium.org/148663005
------------------------------------------------------------------------
Comment 124 by mal@google.com, Feb 2 2014
Blocking: chromium:159629
Project Member Comment 125 by bugdroid1@chromium.org, Feb 4 2014
------------------------------------------------------------------------
r248637 | eroman@chromium.org | 2014-02-04T00:48:46.596979Z

Changed paths:
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/webcrypto/aes_cbc.json?r1=248637&r2=248636&pathrev=248637
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/webcrypto/digest.json?r1=248637&r2=248636&pathrev=248637
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_tests.gypi?r1=248637&r2=248636&pathrev=248637
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=248637&r2=248636&pathrev=248637
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/webcrypto?r1=248637&r2=248636&pathrev=248637
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/webcrypto/hmac.json?r1=248637&r2=248636&pathrev=248637
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/webcrypto/rsa_es.json?r1=248637&r2=248636&pathrev=248637
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/DEPS?r1=248637&r2=248636&pathrev=248637
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/webcrypto/pkcs1v15_sign.json?r1=248637&r2=248636&pathrev=248637
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/webcrypto/aes_gcm.json?r1=248637&r2=248636&pathrev=248637

[refactor] Move webcrypto test data to separate files.

BUG=245025

Review URL: https://codereview.chromium.org/147613002
------------------------------------------------------------------------
Project Member Comment 126 by bugdroid1@chromium.org, Feb 5 2014
------------------------------------------------------------------------
r248834 | eroman@chromium.org | 2014-02-05T03:13:08.071429Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=248834&r2=248833&pathrev=248834
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=248834&r2=248833&pathrev=248834
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=248834&r2=248833&pathrev=248834
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=248834&r2=248833&pathrev=248834

[webcrypto] Validate JWK import of AES keys: key length must match algorithm.

BUG=245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/141853006
------------------------------------------------------------------------
Project Member Comment 127 by bugdroid1@chromium.org, Feb 5 2014
------------------------------------------------------------------------
r249112 | eroman@chromium.org | 2014-02-05T21:29:09.587693Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=249112&r2=249111&pathrev=249112
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=249112&r2=249111&pathrev=249112
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=249112&r2=249111&pathrev=249112
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=249112&r2=249111&pathrev=249112

[webcrypto] Require optional JWK properties to have the correct type.
BUG=245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/150303003
------------------------------------------------------------------------
Project Member Comment 128 by bugdroid1@chromium.org, Feb 7 2014
------------------------------------------------------------------------
r249614 | eroman@chromium.org | 2014-02-07T08:08:45.530314Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=249614&r2=249613&pathrev=249614
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=249614&r2=249613&pathrev=249614
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=249614&r2=249613&pathrev=249614
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=249614&r2=249613&pathrev=249614

[webcrypto] Require optional JWK properties to have the correct type.
BUG=245025

Review URL: https://codereview.chromium.org/150303003
------------------------------------------------------------------------
Project Member Comment 129 by bugdroid1@chromium.org, Feb 19 2014
------------------------------------------------------------------------
r251961 | eroman@chromium.org | 2014-02-19T06:11:04.772541Z

Changed paths:
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/crypto_data.h?r1=251961&r2=251960&pathrev=251961
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=251961&r2=251960&pathrev=251961
   D http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_nss.cc?r1=251961&r2=251960&pathrev=251961
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto.h?r1=251961&r2=251960&pathrev=251961
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto_openssl.cc?r1=251961&r2=251960&pathrev=251961
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_tests.gypi?r1=251961&r2=251960&pathrev=251961
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/jwk.cc?r1=251961&r2=251960&pathrev=251961
   D http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_unittest.cc?r1=251961&r2=251960&pathrev=251961
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=251961&r2=251960&pathrev=251961
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_renderer.gypi?r1=251961&r2=251960&pathrev=251961
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.h?r1=251961&r2=251960&pathrev=251961
   D http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl_openssl.cc?r1=251961&r2=251960&pathrev=251961
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto_unittest.cc?r1=251961&r2=251960&pathrev=251961
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto.cc?r1=251961&r2=251960&pathrev=251961
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto_nss.cc?r1=251961&r2=251960&pathrev=251961
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto.h?r1=251961&r2=251960&pathrev=251961
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/crypto_data.cc?r1=251961&r2=251960&pathrev=251961

[webcrypto] Refactor to share more code between OpenSSL and NSS implementations.

BUG=245025

Review URL: https://codereview.chromium.org/155623005
------------------------------------------------------------------------
Project Member Comment 130 by bugdroid1@chromium.org, Feb 19 2014
------------------------------------------------------------------------
r252122 | eroman@chromium.org | 2014-02-19T22:58:24.091010Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=252122&r2=252121&pathrev=252122
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.h?r1=252122&r2=252121&pathrev=252122
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto_unittest.cc?r1=252122&r2=252121&pathrev=252122
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto.h?r1=252122&r2=252121&pathrev=252122
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto.cc?r1=252122&r2=252121&pathrev=252122
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto_nss.cc?r1=252122&r2=252121&pathrev=252122
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto_openssl.cc?r1=252122&r2=252121&pathrev=252122
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/jwk.cc?r1=252122&r2=252121&pathrev=252122
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=252122&r2=252121&pathrev=252122

[style] Run webcrypto files through clang-format.

The only other change was to delete two TODOs regarding style adjustments.

BUG=245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/171503006
------------------------------------------------------------------------
Project Member Comment 131 by bugdroid1@chromium.org, Feb 20 2014
------------------------------------------------------------------------
r252225 | eroman@chromium.org | 2014-02-20T13:46:14.007196Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto_unittest.cc?r1=252225&r2=252224&pathrev=252225

[cleanup] Delete the *Internal wrapper functions.

These were a leftover from the shared_webcrypto refactor.

BUG=245025

Review URL: https://codereview.chromium.org/170843006
------------------------------------------------------------------------
Project Member Comment 132 by bugdroid1@chromium.org, Feb 21 2014
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=167611

------------------------------------------------------------------------
r167611 | eroman@chromium.org | 2014-02-21T20:19:59.368805Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-expected.txt?r1=167611&r2=167610&pathrev=167611
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey.html?r1=167611&r2=167610&pathrev=167611
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-expected.txt?r1=167611&r2=167610&pathrev=167611
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrap-unwrap-expected.txt?r1=167611&r2=167610&pathrev=167611
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=167611&r2=167610&pathrev=167611
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify.html?r1=167611&r2=167610&pathrev=167611
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.h?r1=167611&r2=167610&pathrev=167611
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey.html?r1=167611&r2=167610&pathrev=167611
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-expected.txt?r1=167611&r2=167610&pathrev=167611
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=167611&r2=167610&pathrev=167611
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey-expected.txt?r1=167611&r2=167610&pathrev=167611
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.cpp?r1=167611&r2=167610&pathrev=167611
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest.html?r1=167611&r2=167610&pathrev=167611
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=167611&r2=167610&pathrev=167611
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrap-unwrap.html?r1=167611&r2=167610&pathrev=167611
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.h?r1=167611&r2=167610&pathrev=167611
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=167611&r2=167610&pathrev=167611

[webcrypto] Make all of the crypto.subtle method failures asynchronous.

This matches the spec update https://dvcs.w3.org/hg/webcrypto-api/rev/4bd9e8dbe699

Background: The crypto.subtle methods all return a Promise. Rather than throwing exceptions for certain types of invalid/unsupported input but not others, the Promise is now consistently rejected. Web IDL errors are not affected and will still throw exceptions like before.

Specifically this changelist makes it so:
 * No longer throws NotSupportedError [1]
 * No longer throws when given an unrecognized/unsupported KeyFormat or KeyUsage

[1] It used to do this when the algorithm name was unrecognized, or the algorithm didn't support the requested operation.

BUG=245025

Review URL: https://codereview.chromium.org/170243007
------------------------------------------------------------------------
Project Member Comment 133 by bugdroid1@chromium.org, Feb 22 2014
------------------------------------------------------------------------
r252769 | eroman@chromium.org | 2014-02-22T08:07:16.676240Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=252769&r2=252768&pathrev=252769
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=252769&r2=252768&pathrev=252769
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto_unittest.cc?r1=252769&r2=252768&pathrev=252769
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto.h?r1=252769&r2=252768&pathrev=252769
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto.cc?r1=252769&r2=252768&pathrev=252769
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto_nss.cc?r1=252769&r2=252768&pathrev=252769

[webcrypto] Reject AES-GCM tag lengths other than 32, 64, 96, 104, 112, 120, 128 bits.

This matches the spec update https://dvcs.w3.org/hg/webcrypto-api/rev/1ed0fb7da636.

(Before it was possible to use a tag length of 0 and have it succeed)

BUG=245025

Review URL: https://codereview.chromium.org/165373008
------------------------------------------------------------------------
Project Member Comment 134 by bugdroid1@chromium.org, Feb 25 2014
------------------------------------------------------------------------
r253119 | eroman@chromium.org | 2014-02-25T10:18:51.772784Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto_openssl.cc?r1=253119&r2=253118&pathrev=253119

Remove some duplicated code for getting the EVP_MP.

BUG=245025

Review URL: https://codereview.chromium.org/169193005
------------------------------------------------------------------------
Project Member Comment 135 by bugdroid1@chromium.org, Feb 26 2014
------------------------------------------------------------------------
r253463 | eroman@chromium.org | 2014-02-26T15:16:25.204800Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto_unittest.cc?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto.h?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto.cc?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto_nss.cc?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto_openssl.cc?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto.h?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/jwk.cc?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=253463&r2=253462&pathrev=253463

[webcrypto] Update to use the KeyAlgorithm.

The WEBCRYPTO_HAS_KEY_ALGORITHM ifdef will be introduced by https://codereview.chromium.org/179353002/ on the blink side. 

This patch needs to land first in order to make the API changes on blink side without breaking the build. Sigh for non-atomic blink/chromium commits.

BUG=245025

Review URL: https://codereview.chromium.org/178073007
------------------------------------------------------------------------
Project Member Comment 136 by bugdroid1@chromium.org, Feb 26 2014
------------------------------------------------------------------------
r253463 | eroman@chromium.org | 2014-02-26T15:16:25.204800Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto_unittest.cc?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto.h?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto.cc?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto_nss.cc?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto_openssl.cc?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto.h?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/jwk.cc?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=253463&r2=253462&pathrev=253463
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=253463&r2=253462&pathrev=253463

[webcrypto] Update to use the KeyAlgorithm.

The WEBCRYPTO_HAS_KEY_ALGORITHM ifdef will be introduced by https://codereview.chromium.org/179353002/ on the blink side. 

This patch needs to land first in order to make the API changes on blink side without breaking the build. Sigh for non-atomic blink/chromium commits.

BUG=245025

Review URL: https://codereview.chromium.org/178073007
------------------------------------------------------------------------
Project Member Comment 137 by bugdroid1@chromium.org, Feb 26 2014
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=167919

------------------------------------------------------------------------
r167919 | eroman@chromium.org | 2014-02-26T19:34:38.114713Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt-expected.txt?r1=167919&r2=167918&pathrev=167919
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=167919&r2=167918&pathrev=167919
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt.html?r1=167919&r2=167918&pathrev=167919
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=167919&r2=167918&pathrev=167919

[webcrypto] Add parameter parsing for AES-GCM.

BUG=245025

Review URL: https://codereview.chromium.org/180323002
------------------------------------------------------------------------
Project Member Comment 138 by bugdroid1@chromium.org, Feb 26 2014
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=167919

------------------------------------------------------------------------
r167919 | eroman@chromium.org | 2014-02-26T19:34:38.114713Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt-expected.txt?r1=167919&r2=167918&pathrev=167919
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=167919&r2=167918&pathrev=167919
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt.html?r1=167919&r2=167918&pathrev=167919
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=167919&r2=167918&pathrev=167919

[webcrypto] Add parameter parsing for AES-GCM.

BUG=245025

Review URL: https://codereview.chromium.org/180323002
------------------------------------------------------------------------
Project Member Comment 139 by bugdroid1@chromium.org, Feb 27 2014
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=167979

------------------------------------------------------------------------
r167979 | eroman@chromium.org | 2014-02-27T04:10:18.734703Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyPair.h?r1=167979&r2=167978&pathrev=167979
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Algorithm.idl?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/exported/WebCryptoKey.cpp?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-expected.txt?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaHashedKeyAlgorithm.cpp?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/Source/platform/exported/WebCryptoKeyAlgorithm.cpp?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyAlgorithm.idl?r1=167979&r2=167978&pathrev=167979
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Algorithm.cpp?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesKeyAlgorithm.h?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacKeyAlgorithm.h?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.h?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyAlgorithm.cpp?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey.html?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKey.h?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaKeyAlgorithm.h?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/exported/WebCryptoAlgorithm.cpp?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify.html?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKeyAlgorithm.h?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesKeyAlgorithm.idl?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacKeyAlgorithm.idl?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.idl?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt-expected.txt?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKeyAlgorithmParams.h?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/blink_platform.gypi?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey-expected.txt?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaHashedKeyAlgorithm.h?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.cpp?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacKeyAlgorithm.cpp?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/AesKeyAlgorithm.cpp?r1=167979&r2=167978&pathrev=167979
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Algorithm.h?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaKeyAlgorithm.idl?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/Source/heap/ThreadState.h?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyAlgorithm.h?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaKeyAlgorithm.cpp?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt.html?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-expected.txt?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=167979&r2=167978&pathrev=167979
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithmParams.h?r1=167979&r2=167978&pathrev=167979
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaHashedKeyAlgorithm.idl?r1=167979&r2=167978&pathrev=167979

[webcrypto] Add the KeyAlgorithm interface.

This matches the changes in https://dvcs.w3.org/hg/webcrypto-api/rev/2fa3494f0179

 * Key.algorithm is now reflected as a KeyAlgorithm interface rather than Algorithm
 * HMAC no longer takes the hash as an operational parameter (key move to import/generation)
 * RSA-SSA no longer takes the hash as an operation (move to key import/generation)parameter

BUG=245025

Review URL: https://codereview.chromium.org/179353002
------------------------------------------------------------------------
Project Member Comment 140 by bugdroid1@chromium.org, Feb 28 2014
------------------------------------------------------------------------
r254080 | eroman@chromium.org | 2014-02-28T10:24:32.833812Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto_unittest.cc?r1=254080&r2=254079&pathrev=254080
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto.cc?r1=254080&r2=254079&pathrev=254080
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto_nss.cc?r1=254080&r2=254079&pathrev=254080
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto_openssl.cc?r1=254080&r2=254079&pathrev=254080
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/jwk.cc?r1=254080&r2=254079&pathrev=254080
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=254080&r2=254079&pathrev=254080
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=254080&r2=254079&pathrev=254080
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_impl.cc?r1=254080&r2=254079&pathrev=254080

[webcrypto] Remove code conditional on !defined(WEBCRYPTO_HAS_KEY_ALGORITHM).

This is the sister change to r253463 to remove the old API once the blink changes have rolled into chromium.

BUG=245025
TBR=rsleevi

Review URL: https://codereview.chromium.org/182073002
------------------------------------------------------------------------
Project Member Comment 141 by bugdroid1@chromium.org, Feb 28 2014
------------------------------------------------------------------------
r254202 | eroman@chromium.org | 2014-02-28T20:09:09.893579Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto_nss.cc?r1=254202&r2=254201&pathrev=254202
   M http://src.chromium.org/viewvc/chrome/trunk/src/tools/valgrind/memcheck/suppressions.txt?r1=254202&r2=254201&pathrev=254202

Fix memory leak from use of SECKEY_ConvertToPublicKey().

BUG=347965,245025

Review URL: https://codereview.chromium.org/184753002
------------------------------------------------------------------------
Project Member Comment 142 by bugdroid1@chromium.org, Mar 4 2014
------------------------------------------------------------------------
r254867 | eroman@chromium.org | 2014-03-04T22:52:45.795641Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/nss/nss/exports_win.def?r1=254867&r2=254866&pathrev=254867

Add PK11_GetKeyLength to NSS exports.

BUG=245025

Review URL: https://codereview.chromium.org/186783002
------------------------------------------------------------------------
Project Member Comment 143 by bugdroid1@chromium.org, Mar 5 2014
------------------------------------------------------------------------
r255071 | eroman@chromium.org | 2014-03-05T17:28:17.692962Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/DEPS?r1=255071&r2=255070&pathrev=255071

Roll NSS from 253292:254867

Pulls in 1 change:
  r254867: Add PK11_GetKeyLength to NSS exports.

BUG=245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/187153002
------------------------------------------------------------------------
Project Member Comment 144 by bugdroid1@chromium.org, Mar 6 2014
------------------------------------------------------------------------
r255270 | padolph@netflix.com | 2014-03-06T05:58:16.335005Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto_unittest.cc?r1=255270&r2=255269&pathrev=255270
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto.h?r1=255270&r2=255269&pathrev=255270
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto.cc?r1=255270&r2=255269&pathrev=255270
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto_nss.cc?r1=255270&r2=255269&pathrev=255270
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/platform_crypto_openssl.cc?r1=255270&r2=255269&pathrev=255270
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/shared_crypto.h?r1=255270&r2=255269&pathrev=255270
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.cc?r1=255270&r2=255269&pathrev=255270
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/webcrypto/webcrypto_util.h?r1=255270&r2=255269&pathrev=255270
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/webcrypto/aes_kw.json?r1=255270&r2=255269&pathrev=255270

[webcrypto] Add raw symmetric key AES-KW wrap/unwrap for NSS.

BUG=245025
TEST=content_unittests --gtest_filter="WebCryptoImpl*"

Review URL: https://codereview.chromium.org/118623002
------------------------------------------------------------------------
Project Member Comment 145 by bugdroid1@chromium.org, Mar 10 2014
------------------------------------------------------------------------
r256025 | eroman@chromium.org | 2014-03-10T20:42:21.184597Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=256025&r2=256024&pathrev=256025
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=256025&r2=256024&pathrev=256025

[webcrypto] Change HMAC key generation length from bytes to bits.

Matches the upstream change in the spec:
https://dvcs.w3.org/hg/webcrypto-api/rev/da045968abe0

Corresponding blink-side change:
https://codereview.chromium.org/184453005/

BUG=245025

Review URL: https://codereview.chromium.org/187103003
------------------------------------------------------------------------
Project Member Comment 146 by bugdroid1@chromium.org, Mar 10 2014
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=168869

------------------------------------------------------------------------
r168869 | eroman@chromium.org | 2014-03-10T22:22:53.015658Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey-expected.txt?r1=168869&r2=168868&pathrev=168869
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=168869&r2=168868&pathrev=168869
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithmParams.h?r1=168869&r2=168868&pathrev=168869
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey.html?r1=168869&r2=168868&pathrev=168869
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=168869&r2=168868&pathrev=168869

[webcrypto] Change HMAC key generation length from bytes to bits.

Matches the upstream change in the spec:
https://dvcs.w3.org/hg/webcrypto-api/rev/da045968abe0

Corresponding chromium-side change:
https://codereview.chromium.org/187103003/

BUG=245025

Review URL: https://codereview.chromium.org/184453005
------------------------------------------------------------------------
Project Member Comment 147 by bugdroid1@chromium.org, Mar 11 2014
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=168904

------------------------------------------------------------------------
r168904 | eroman@chromium.org | 2014-03-11T10:25:29.771254Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt.html?r1=168904&r2=168903&pathrev=168904
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.cpp?r1=168904&r2=168903&pathrev=168904
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt-expected.txt?r1=168904&r2=168903&pathrev=168904

[webcrypto] Change the order of usages in Key.usages.

Blink's implementation used to list them in lexicographic order. Changed to match the order defined by the spec in:
https://dvcs.w3.org/hg/webcrypto-api/rev/ca494eeb8ddf

BUG=245025

Review URL: https://codereview.chromium.org/194323002
------------------------------------------------------------------------
Project Member Comment 148 by bugdroid1@chromium.org, Mar 11 2014
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=168959

------------------------------------------------------------------------
r168959 | eroman@chromium.org | 2014-03-11T22:27:35.795897Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-expected.txt?r1=168959&r2=168958&pathrev=168959
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=168959&r2=168958&pathrev=168959
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=168959&r2=168958&pathrev=168959
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest.html?r1=168959&r2=168958&pathrev=168959

[webcrypto] Remove support for SHA-224 (CL 1 or 3).

Blink side of the change.

This was removed by the spec: https://dvcs.w3.org/hg/webcrypto-api/rev/3f7df730b2c7

BUG=245025

Review URL: https://codereview.chromium.org/194013003
------------------------------------------------------------------------
Project Member Comment 149 by bugdroid1@chromium.org, Mar 12 2014
------------------------------------------------------------------------
r256399 | padolph@netflix.com | 2014-03-12T02:06:16.879918Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=256399&r2=256398&pathrev=256399
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=256399&r2=256398&pathrev=256399
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.h?r1=256399&r2=256398&pathrev=256399
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=256399&r2=256398&pathrev=256399
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.h?r1=256399&r2=256398&pathrev=256399

[webcrypto] JWK: Updated import(ext, key_ops) and added export of symmetric keys

See https://www.w3.org/Bugs/Public/show_bug.cgi?id=23796

BUG=245025
TEST=content_unittests --gtest_filter="SharedCryptoTest*"

Review URL: https://codereview.chromium.org/184043021
------------------------------------------------------------------------
Project Member Comment 150 by bugdroid1@chromium.org, Mar 12 2014
------------------------------------------------------------------------
r256415 | kochi@chromium.org | 2014-03-12T03:29:53.669317Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.h?r1=256415&r2=256414&pathrev=256415
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=256415&r2=256414&pathrev=256415
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=256415&r2=256414&pathrev=256415
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.h?r1=256415&r2=256414&pathrev=256415
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=256415&r2=256414&pathrev=256415

Revert 256399 "[webcrypto] JWK: Updated import(ext, key_ops) and..."

This caused ImportExportJwkSymmetricKey test failure on dbg builds, e.g.
http://build.chromium.org/p/chromium.linux/builders/Linux%20Clang%20%28dbg%29/builds/57242

as assertion fail.  This may not have been caught by rel builds on trybots.

> [webcrypto] JWK: Updated import(ext, key_ops) and added export of symmetric keys
> 
> See https://www.w3.org/Bugs/Public/show_bug.cgi?id=23796
> 
> BUG=245025
> TEST=content_unittests --gtest_filter="SharedCryptoTest*"
> 
> Review URL: https://codereview.chromium.org/184043021

TBR=padolph@netflix.com

Review URL: https://codereview.chromium.org/196683002
------------------------------------------------------------------------
Project Member Comment 151 by bugdroid1@chromium.org, Mar 12 2014
------------------------------------------------------------------------
r256695 | eroman@chromium.org | 2014-03-12T23:20:52.203272Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/nss/nss/exports_win.def?r1=256695&r2=256694&pathrev=256695

Add PK11_PubUnwrapSymKeyWithFlagsPerm() to NSS exports.

BUG=245025

Review URL: https://codereview.chromium.org/195893010
------------------------------------------------------------------------
Project Member Comment 152 by bugdroid1@chromium.org, Mar 13 2014
------------------------------------------------------------------------
r256729 | eroman@chromium.org | 2014-03-13T01:46:01.448920Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=256729&r2=256728&pathrev=256729
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=256729&r2=256728&pathrev=256729

[webcrypto] Change HMAC key generation length from bytes to bits.

This is the final CL that removes the ifdef once blink has rolled.

BUG=245025

Review URL: https://codereview.chromium.org/193393002
------------------------------------------------------------------------
Project Member Comment 153 by bugdroid1@chromium.org, Mar 13 2014
------------------------------------------------------------------------
r256764 | eroman@chromium.org | 2014-03-13T05:46:13.983002Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=256764&r2=256763&pathrev=256764
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=256764&r2=256763&pathrev=256764
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=256764&r2=256763&pathrev=256764
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=256764&r2=256763&pathrev=256764
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/webcrypto/digest.json?r1=256764&r2=256763&pathrev=256764
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=256764&r2=256763&pathrev=256764
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/webcrypto/hmac.json?r1=256764&r2=256763&pathrev=256764

[webcrypto] Remove support for SHA-224 (CL 2 or 3).

Chromium side of the change.

This was removed by the spec: https://dvcs.w3.org/hg/webcrypto-api/rev/3f7df730b2c7

BUG=245025

Review URL: https://codereview.chromium.org/194203002
------------------------------------------------------------------------
Project Member Comment 154 by bugdroid1@chromium.org, Mar 13 2014
------------------------------------------------------------------------
r256766 | eroman@chromium.org | 2014-03-13T05:52:52.672598Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/DEPS?r1=256766&r2=256765&pathrev=256766

Roll NSS to r256695

Pulls in a single change:

Add PK11_PubUnwrapSymKeyWithFlagsPerm() to NSS exports

BUG=245025

Review URL: https://codereview.chromium.org/197753004
------------------------------------------------------------------------
Project Member Comment 155 by bugdroid1@chromium.org, Mar 13 2014
------------------------------------------------------------------------
r256779 | padolph@netflix.com | 2014-03-13T10:03:52.415107Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=256779&r2=256778&pathrev=256779
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto.h?r1=256779&r2=256778&pathrev=256779
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=256779&r2=256778&pathrev=256779
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=256779&r2=256778&pathrev=256779
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=256779&r2=256778&pathrev=256779

[webcrypto] Add raw symmetric key RSAES-PKCS1-v1_5 wrap/unwrap for NSS.

BUG=245025
TEST=content_unittests --gtest_filter="SharedCryptoTest*"

Based on https://codereview.chromium.org/118623002/

Review URL: https://codereview.chromium.org/188363002
------------------------------------------------------------------------
Project Member Comment 156 by bugdroid1@chromium.org, Mar 14 2014
------------------------------------------------------------------
r257078 | padolph@netflix.com | 2014-03-14T11:20:55.704181Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=257078&r2=257077&pathrev=257078
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.h?r1=257078&r2=257077&pathrev=257078
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=257078&r2=257077&pathrev=257078
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=257078&r2=257077&pathrev=257078
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.h?r1=257078&r2=257077&pathrev=257078

[webcrypto] JWK: Updated import(ext, key_ops) and added export of symmetric keys

See https://www.w3.org/Bugs/Public/show_bug.cgi?id=23796

BUG=245025
TEST=content_unittests --gtest_filter="SharedCryptoTest*"

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256399

Review URL: https://codereview.chromium.org/184043021
-----------------------------------------------------------------
Project Member Comment 157 by bugdroid1@chromium.org, Mar 14 2014
------------------------------------------------------------------
r257087 | finnur@chromium.org | 2014-03-14T12:32:44.937561Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=257087&r2=257086&pathrev=257087
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.h?r1=257087&r2=257086&pathrev=257087
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=257087&r2=257086&pathrev=257087
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=257087&r2=257086&pathrev=257087
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.h?r1=257087&r2=257086&pathrev=257087

Revert of [webcrypto] JWK: Updated import(ext, key_ops) and added export of symmetric keys (https://codereview.chromium.org/184043021/)

Reason for revert:
SharedCryptoTest.ImportExportJwkSymmetricKey test failing.
http://build.chromium.org/p/chromium.linux/builders/Linux%20Clang%20%28dbg%29/builds/57322



Original issue's description:
> [webcrypto] JWK: Updated import(ext, key_ops) and added export of symmetric keys
> 
> See https://www.w3.org/Bugs/Public/show_bug.cgi?id=23796
> 
> BUG=245025
> TEST=content_unittests --gtest_filter="SharedCryptoTest*"
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256399
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257078

TBR=eroman@chromium.org,rsleevi@chromium.org,bryaneyler@google.com,padolph@netflix.com
NOTREECHECKS=true
NOTRY=true
BUG=245025

Review URL: https://codereview.chromium.org/200263002
-----------------------------------------------------------------
Project Member Comment 158 by bugdroid1@chromium.org, Mar 14 2014
------------------------------------------------------------------
r257217 | padolph@netflix.com | 2014-03-14T21:51:45.306877Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=257217&r2=257216&pathrev=257217
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.h?r1=257217&r2=257216&pathrev=257217
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=257217&r2=257216&pathrev=257217
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=257217&r2=257216&pathrev=257217
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.h?r1=257217&r2=257216&pathrev=257217

[webcrypto] JWK: Updated import(ext, key_ops) and added export of symmetric keys

See https://www.w3.org/Bugs/Public/show_bug.cgi?id=23796

BUG=245025
TEST=content_unittests --gtest_filter="SharedCryptoTest*"

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256399

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257078

Review URL: https://codereview.chromium.org/184043021
-----------------------------------------------------------------
Comment 159 by meh@chromium.org, Mar 14 2014
Is this on track for M35 Stable?  According to http://www.chromestatus.com/features/5030265697075200 it is...
Project Member Comment 160 by bugdroid1@chromium.org, Mar 18 2014
------------------------------------------------------------------
r257689 | eroman@chromium.org | 2014-03-18T17:58:38.654347Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=257689&r2=257688&pathrev=257689

[webcrypto] Remove another instance of SHA-224 enum.

... So I can finaly delete it from blink side.

BUG=245025

Review URL: https://codereview.chromium.org/202493005
-----------------------------------------------------------------
Project Member Comment 161 by bugdroid1@chromium.org, Mar 18 2014
------------------------------------------------------------------
r257723 | eroman@chromium.org | 2014-03-18T20:27:08.882162Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.h?r1=257723&r2=257722&pathrev=257723
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=257723&r2=257722&pathrev=257723
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=257723&r2=257722&pathrev=257723
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.h?r1=257723&r2=257722&pathrev=257723
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=257723&r2=257722&pathrev=257723
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.h?r1=257723&r2=257722&pathrev=257723
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.cc?r1=257723&r2=257722&pathrev=257723

[webcrypto] Implement structured clone of keys (chromium-side).

The serialized format saves keys as:
  * spki for public RSA keys
  * pkcs8 for private RSA keys
  * raw for AES and HMAC keys

The testing for this is done on the blink side by (see https://codereview.chromium.org/195543002/)

[2] PKCS8 import/export is not yet implemented. I will re-visit the serialization of private keys in a follow-up change.

BUG=245025

Review URL: https://codereview.chromium.org/196513002
-----------------------------------------------------------------
Project Member Comment 162 by bugdroid1@chromium.org, Mar 18 2014
------------------------------------------------------------------
r257759 | padolph@netflix.com | 2014-03-18T21:22:58.482188Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=257759&r2=257758&pathrev=257759
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto.h?r1=257759&r2=257758&pathrev=257759
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=257759&r2=257758&pathrev=257759
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=257759&r2=257758&pathrev=257759
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=257759&r2=257758&pathrev=257759
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=257759&r2=257758&pathrev=257759

[webcrypto] Add JWK symmetric key AES-KW unwrap for NSS.

Note: AES-KW wrap of formats other than 'raw' is not 
currently supported because of strict input data size
modulo requirements of RFC3394.

BUG=245025
TEST=content_unittests --gtest_filter="SharedCryptoTest*"

Review URL: https://codereview.chromium.org/195983010
-----------------------------------------------------------------
Project Member Comment 163 by bugdroid1@chromium.org, Mar 19 2014
------------------------------------------------------------------
r257878 | eroman@chromium.org | 2014-03-19T06:38:58.874272Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=257878&r2=257877&pathrev=257878
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=257878&r2=257877&pathrev=257878
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.h?r1=257878&r2=257877&pathrev=257878

[webcrypto] Add length parameter to HmacKeyAlgorithm. (chromium)

Matches a planned change to the spec:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25094

Blink side of this change: https://codereview.chromium.org/204013006/

BUG=245025

Review URL: https://codereview.chromium.org/203303006
-----------------------------------------------------------------
Project Member Comment 164 by bugdroid1@chromium.org, Mar 20 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=169383

------------------------------------------------------------------
r169383 | eroman@chromium.org | 2014-03-17T19:52:48.364187Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=169383&r2=169382&pathrev=169383
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.idl?r1=169383&r2=169382&pathrev=169383
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-expected.txt?r1=169383&r2=169382&pathrev=169383
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=169383&r2=169382&pathrev=169383
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=169383&r2=169382&pathrev=169383

[webcrypto] Make the import algorithm a required parameter.

This applies to both importKey() and unwrapKey().

This matches the intended change in the spec, of dropping self-identifying JWK keys:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25036

BUG=245025

Review URL: https://codereview.chromium.org/198513002
-----------------------------------------------------------------
Project Member Comment 165 by bugdroid1@chromium.org, Mar 20 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=169493

------------------------------------------------------------------
r169493 | eroman@chromium.org | 2014-03-18T22:56:06.008038Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=169493&r2=169492&pathrev=169493
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=169493&r2=169492&pathrev=169493

[webcrypto] Remove some deprecated stuff.

(Left overs from 3-sided patches)

BUG=245025

Review URL: https://codereview.chromium.org/198483002
-----------------------------------------------------------------
Project Member Comment 166 by bugdroid1@chromium.org, Mar 20 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=169567

------------------------------------------------------------------
r169567 | eroman@chromium.org | 2014-03-19T18:14:44.902439Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKeyAlgorithmParams.h?r1=169567&r2=169566&pathrev=169567
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=169567&r2=169566&pathrev=169567
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacKeyAlgorithm.cpp?r1=169567&r2=169566&pathrev=169567
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify.html?r1=169567&r2=169566&pathrev=169567
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacKeyAlgorithm.h?r1=169567&r2=169566&pathrev=169567
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/HmacKeyAlgorithm.idl?r1=169567&r2=169566&pathrev=169567

[webcrypto] Add length parameter to HmacKeyAlgorithm. (blink)

Matches a planned change to the spec:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25094

Chromium side of this change: https://codereview.chromium.org/203303006/

BUG=245025

Review URL: https://codereview.chromium.org/204013006
-----------------------------------------------------------------
Project Member Comment 167 by bugdroid1@chromium.org, Mar 20 2014
------------------------------------------------------------------
r258223 | padolph@netflix.com | 2014-03-20T06:25:42.856162Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=258223&r2=258222&pathrev=258223
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=258223&r2=258222&pathrev=258223
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=258223&r2=258222&pathrev=258223

[webcrypto] Add JWK symmetric key RSAES-PKCS1-v1_5 wrap / unwrap for NSS.

BUG=245025
TEST=content_unittests --gtest_filter="SharedCryptoTest*"

Based on https://codereview.chromium.org/195983010/

Review URL: https://codereview.chromium.org/195893034
-----------------------------------------------------------------
Project Member Comment 168 by bugdroid1@chromium.org, Mar 20 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=169633

------------------------------------------------------------------
r169633 | eroman@chromium.org | 2014-03-20T07:51:12.173862Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaKey-public-expected.txt?r1=169633&r2=169632&pathrev=169633
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=169633&r2=169632&pathrev=169633
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaHashedKey-public.html?r1=169633&r2=169632&pathrev=169633
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-aesKey-expected.txt?r1=169633&r2=169632&pathrev=169633
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-hmacKey-expected.txt?r1=169633&r2=169632&pathrev=169633
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=169633&r2=169632&pathrev=169633
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKey.h?r1=169633&r2=169632&pathrev=169633
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=169633&r2=169632&pathrev=169633
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaHashedKey-public-expected.txt?r1=169633&r2=169632&pathrev=169633
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/exported/WebCryptoAlgorithm.cpp?r1=169633&r2=169632&pathrev=169633
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKeyAlgorithm.h?r1=169633&r2=169632&pathrev=169633
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/SerializedScriptValue.cpp?r1=169633&r2=169632&pathrev=169633
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaKey-public.html?r1=169633&r2=169632&pathrev=169633
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=169633&r2=169632&pathrev=169633
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/exported/WebCryptoKeyAlgorithm.cpp?r1=169633&r2=169632&pathrev=169633
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/SerializedScriptValue.h?r1=169633&r2=169632&pathrev=169633
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/storage/resources/serialized-script-value.js?r1=169633&r2=169632&pathrev=169633
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-hmacKey.html?r1=169633&r2=169632&pathrev=169633
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-aesKey.html?r1=169633&r2=169632&pathrev=169633
   M http://src.chromium.org/viewvc/blink/trunk/public/web/WebSerializedScriptValueVersion.h?r1=169633&r2=169632&pathrev=169633

[webcrypto] Implement structured clone of keys (blink-side). 

The format looks like this:

  subtag:byte            // The type of key
  keySpecificProperties  // Block of key specific algorithm info
  usages:uint32          // Bitfield of usages + extractability
  keyDataLength:uint32   // Block of data controlled by embedder
  keyData:byte[keyDataLength]

subtag influences how keySpecificProperties is interpreted:

[If subtag=AesKeyTag]
  keyLengthBytes:uint32  // 16, 24, or 32
  algorithmId:uint32

[If subtag=HmacKeyTag]
  keyLengthBytes:uint32
  hashId:uint32

[If subtag=RsaKeyTag]
  algorithmId:uint32
  type:uint32            // One of {PublicKeyType, PrivateKeyType}
  modulusLengthBits:uint32
  publicExponentLength:uint32
  publicExponent:byte[publicExponentLength]

[If subtag=RsaHashedKeyTag]
  <Same as for RsaKeyTag>
  hashId:uint32

Note that uint32 is encoded as a variable length number. In practice it ends up being a single byte for most of the uses above.

In this design, blink is responsible for serializing all of the key's attributes except for the actual key data which is left to the embedder.

The included tests rely on the chromium side of structured clone landing:
  https://codereview.chromium.org/196513002/

The tests cover serialization of hmac, aes and rsa public keys. I haven't added tests for serialization of rsa private keys yet, since that part is not done on the chromium side.

BUG=245025

Review URL: https://codereview.chromium.org/195543002
-----------------------------------------------------------------
Project Member Comment 169 by bugdroid1@chromium.org, Mar 20 2014
------------------------------------------------------------------
r258413 | eroman@chromium.org | 2014-03-20T21:33:07.763671Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=258413&r2=258412&pathrev=258413
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=258413&r2=258412&pathrev=258413

[webcrypto] Remove ifdefs for whether hmac key algorithm has length.

BUG=245025

Review URL: https://codereview.chromium.org/205583003
-----------------------------------------------------------------
Project Member Comment 170 by bugdroid1@chromium.org, Mar 20 2014
------------------------------------------------------------------
r258446 | eroman@chromium.org | 2014-03-20T22:58:40.802050Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=258446&r2=258445&pathrev=258446
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.cc?r1=258446&r2=258445&pathrev=258446
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.h?r1=258446&r2=258445&pathrev=258446
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.cc?r1=258446&r2=258445&pathrev=258446
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=258446&r2=258445&pathrev=258446
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.h?r1=258446&r2=258445&pathrev=258446
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto.h?r1=258446&r2=258445&pathrev=258446
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=258446&r2=258445&pathrev=258446
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=258446&r2=258445&pathrev=258446
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=258446&r2=258445&pathrev=258446
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.h?r1=258446&r2=258445&pathrev=258446

[webcrypto] Remove support for null import algorithms.

This is being dropped from the spec: https://www.w3.org/Bugs/Public/show_bug.cgi?id=25036

BUG=245025

Review URL: https://codereview.chromium.org/197223007
-----------------------------------------------------------------
Project Member Comment 171 by bugdroid1@chromium.org, Mar 23 2014
------------------------------------------------------------------
r258664 | eroman@chromium.org | 2014-03-21T20:34:11.742394Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/nss/nss/exports_win.def?r1=258664&r2=258663&pathrev=258664

Add NSS exports for Windows.

  SEC_ASN1EncodeInteger_Util
  NSS_Get_SECKEY_PrivateKeyInfoTemplate

Used by Web Crypto for the export of RSA private keys in PKCS#8 format.

BUG=245025

Review URL: https://codereview.chromium.org/203263013
-----------------------------------------------------------------
Blocking: chromium:355610
Project Member Comment 173 by bugdroid1@chromium.org, Mar 24 2014
------------------------------------------------------------------
r258960 | wtc@chromium.org | 2014-03-24T17:22:59.364948Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/DEPS?r1=258960&r2=258959&pathrev=258960

Update nss_revision to r258808.

Includes the following CLs:

Add NSS exports for Windows.
  SEC_ASN1EncodeInteger_Util
  NSS_Get_SECKEY_PrivateKeyInfoTemplate
https://codereview.chromium.org/203263013

Update to NSPR 4.10.4.
https://codereview.chromium.org/200653003

R=eroman@chromium.org,rsleevi@chromium.org
BUG=245025,353152
TEST=none

Review URL: https://codereview.chromium.org/208313007
-----------------------------------------------------------------
Project Member Comment 174 by bugdroid1@chromium.org, Mar 25 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=169894

------------------------------------------------------------------
r169894 | eroman@chromium.org | 2014-03-25T00:13:05.460316Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-failures-expected.txt?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-gcm-parseAlgorithm-failures.html?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-decrypt-failure-expected.txt?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-gcm-encrypt-decrypt.html?r1=169894&r2=169893&pathrev=169894
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaKey-public.html?r1=169894&r2=169893&pathrev=169894
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=169894&r2=169893&pathrev=169894
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/import-aes-key-bad-length-expected.txt?r1=169894&r2=169893&pathrev=169894
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrap-unwrap.html?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-failures.html?r1=169894&r2=169893&pathrev=169894
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-expected.txt?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-decrypt-failure.html?r1=169894&r2=169893&pathrev=169894
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey.html?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-key-usages-expected.txt?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-parseAlgorithm-failures-expected.txt?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-ctr-parseAlgorithm-failures-expected.txt?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-key-algorithm-mismatch-expected.txt?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-encrypt-decrypt-expected.txt?r1=169894&r2=169893&pathrev=169894
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify.html?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sha-digest-expected.txt?r1=169894&r2=169893&pathrev=169894
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt-expected.txt?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/import-aes-key-bad-length.html?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-gcm-parseAlgorithm-failures-expected.txt?r1=169894&r2=169893&pathrev=169894
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest.html?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-gcm-encrypt-decrypt-expected.txt?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-key-usages.html?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-parseAlgorithm-failures.html?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-key-algorithm-mismatch.html?r1=169894&r2=169893&pathrev=169894
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaHashedKey-public.html?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-ctr-parseAlgorithm-failures.html?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-encrypt-decrypt.html?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sha-digest.html?r1=169894&r2=169893&pathrev=169894
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/encrypt-decrypt.html?r1=169894&r2=169893&pathrev=169894
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/keys.js?r1=169894&r2=169893&pathrev=169894

[webcrypto] Refactor some layout tests.

* Splits up large tests into smaller files.
* Extracts common key data to its own file
* Reduces use of shouldRejectPromiseWithNull()

BUG=245025

Review URL: https://codereview.chromium.org/206483010
-----------------------------------------------------------------
Project Member Comment 175 by bugdroid1@chromium.org, Mar 25 2014
------------------------------------------------------------------
r259063 | eroman@chromium.org | 2014-03-25T00:50:44.644896Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=259063&r2=259062&pathrev=259063
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto.h?r1=259063&r2=259062&pathrev=259063
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=259063&r2=259062&pathrev=259063
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=259063&r2=259062&pathrev=259063
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=259063&r2=259062&pathrev=259063

[webcrypto] Add PKCS#8 export for RSA private keys for NSS.

BUG=245025
R=rsleevi@chromium.org, wtc@chromium.org

Review URL: https://codereview.chromium.org/203753009
-----------------------------------------------------------------
Project Member Comment 176 by bugdroid1@chromium.org, Mar 25 2014
------------------------------------------------------------------
r259073 | eroman@chromium.org | 2014-03-25T01:07:38.296553Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.cc?r1=259073&r2=259072&pathrev=259073
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.h?r1=259073&r2=259072&pathrev=259073

[webcrypto] Add wrap/unwrap forwarding methods to WebCryptoImpl.

The tests for this will have to be on the blink size.

BUG=245025

Review URL: https://codereview.chromium.org/206833003
-----------------------------------------------------------------
Project Member Comment 177 by bugdroid1@chromium.org, Mar 25 2014
------------------------------------------------------------------
r259143 | eroman@chromium.org | 2014-03-25T04:11:06.663921Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=259143&r2=259142&pathrev=259143
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=259143&r2=259142&pathrev=259143

[webcrypto] Refactor to use WebCryptoKeyAlgorithm create* functions.

BUG=245025

Review URL: https://codereview.chromium.org/210583003
-----------------------------------------------------------------
Project Member Comment 178 by bugdroid1@chromium.org, Mar 25 2014
------------------------------------------------------------------
r259153 | eroman@chromium.org | 2014-03-25T04:54:00.968651Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/tools/valgrind/memcheck/suppressions.txt?r1=259153&r2=259152&pathrev=259153
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=259153&r2=259152&pathrev=259153

[webcrypto] Simplify the AES-KW workaround for NSS and remove valgrind suppression

BUG=349939,245025

Review URL: https://codereview.chromium.org/210463003
-----------------------------------------------------------------
Project Member Comment 179 by bugdroid1@chromium.org, Mar 25 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=169957

------------------------------------------------------------------
r169957 | eroman@chromium.org | 2014-03-25T16:32:27.813606Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/keys.js?r1=169957&r2=169956&pathrev=169957
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaKey-private-expected.txt?r1=169957&r2=169956&pathrev=169957
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaHashedKey-public-expected.txt?r1=169957&r2=169956&pathrev=169957
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaHashedKey-private.html?r1=169957&r2=169956&pathrev=169957
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaKey-public-expected.txt?r1=169957&r2=169956&pathrev=169957
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaKey-private.html?r1=169957&r2=169956&pathrev=169957
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaHashedKey-public.html?r1=169957&r2=169956&pathrev=169957
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaKey-public.html?r1=169957&r2=169956&pathrev=169957
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaHashedKey-private-expected.txt?r1=169957&r2=169956&pathrev=169957

[webcrypto] Add structured clone tests for RSA private keys.

BUG=245025

Review URL: https://codereview.chromium.org/210693002
-----------------------------------------------------------------
Project Member Comment 180 by bugdroid1@chromium.org, Mar 26 2014
------------------------------------------------------------------
r259432 | padolph@netflix.com | 2014-03-26T01:39:30.894137Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=259432&r2=259431&pathrev=259432
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto.h?r1=259432&r2=259431&pathrev=259432
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=259432&r2=259431&pathrev=259432
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=259432&r2=259431&pathrev=259432
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=259432&r2=259431&pathrev=259432
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=259432&r2=259431&pathrev=259432
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.h?r1=259432&r2=259431&pathrev=259432

[webcrypto] Add JWK RSA public key export for NSS.

BUG=245025
TEST=content_unittests --gtest_filter="SharedCryptoTest*"

Review URL: https://codereview.chromium.org/205913002
-----------------------------------------------------------------
Project Member Comment 181 by bugdroid1@chromium.org, Mar 26 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=170019

------------------------------------------------------------------
r170019 | eroman@chromium.org | 2014-03-26T05:32:06.582418Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-normalize-usages-expected.txt?r1=170019&r2=170018&pathrev=170019
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey.html?r1=170019&r2=170018&pathrev=170019
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-badParameters-expected.txt?r1=170019&r2=170018&pathrev=170019
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-normalize-usages.html?r1=170019&r2=170018&pathrev=170019
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-badParameters.html?r1=170019&r2=170018&pathrev=170019
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-expected.txt?r1=170019&r2=170018&pathrev=170019
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=170019&r2=170018&pathrev=170019

[refactor] Split importKey.html into smaller files, and delete algoritm-specific tests.

 * importKey-badParameters.html
 * importKey-normalize-usages.html

The reason for deleting the successful key import tests, is that there are much more exhaustive key import tests as part of the clone-* layout tests (which import a large combination of keys in order to serialize them).

Lastly this change fixes a typo in an error message "HmacImporParams" --> "HmacImportParams".

BUG=245025

Review URL: https://codereview.chromium.org/211933003
-----------------------------------------------------------------
Project Member Comment 182 by bugdroid1@chromium.org, Mar 26 2014
------------------------------------------------------------------
r259536 | padolph@netflix.com | 2014-03-26T09:50:57.904121Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=259536&r2=259535&pathrev=259536
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=259536&r2=259535&pathrev=259536
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.h?r1=259536&r2=259535&pathrev=259536
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.h?r1=259536&r2=259535&pathrev=259536
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_child.gypi?r1=259536&r2=259535&pathrev=259536
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=259536&r2=259535&pathrev=259536
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=259536&r2=259535&pathrev=259536
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.h?r1=259536&r2=259535&pathrev=259536

[webcrypto] Minor cleanup/consolidation of JWK source.

BUG=245025
TEST=content_unittests --gtest_filter="SharedCryptoTest*"

Review URL: https://codereview.chromium.org/211943002
-----------------------------------------------------------------
Project Member Comment 183 by bugdroid1@chromium.org, Mar 27 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=170137

------------------------------------------------------------------
r170137 | eroman@chromium.org | 2014-03-27T05:20:56.076372Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-badParameters.html?r1=170137&r2=170136&pathrev=170137
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-unextractable-expected.txt?r1=170137&r2=170136&pathrev=170137
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-expected.txt?r1=170137&r2=170136&pathrev=170137
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-unextractable.html?r1=170137&r2=170136&pathrev=170137
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey.html?r1=170137&r2=170136&pathrev=170137
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-badParameters-expected.txt?r1=170137&r2=170136&pathrev=170137

[webcrypto] Split exportKey.html test into smaller files.

Also adds additional tests for extractable=false.

BUG=245025

Review URL: https://codereview.chromium.org/214233002
-----------------------------------------------------------------
Project Member Comment 184 by bugdroid1@chromium.org, Mar 27 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=170138

------------------------------------------------------------------
r170138 | eroman@chromium.org | 2014-03-27T05:21:20.468091Z

Changed paths:
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-expected.txt?r1=170138&r2=170137&pathrev=170138
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/hmac-sign-verify-expected.txt?r1=170138&r2=170137&pathrev=170138
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify.html?r1=170138&r2=170137&pathrev=170138
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-badParameters-expected.txt?r1=170138&r2=170137&pathrev=170138
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/hmac-sign-verify.html?r1=170138&r2=170137&pathrev=170138
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-badParameters.html?r1=170138&r2=170137&pathrev=170138

[refactor] Split up the layout test sign-verify.html into smaller files.

Becomes:
 * hmac-sign-verify.html
 * sign-verify-badParameters.html

Motivation: I am splitting out per-algorithm tests so the tests are more readable.

Also changing how the error expectations are tested to simplify an upcoming change where the result is no longer just "null".

BUG=245025

Review URL: https://codereview.chromium.org/199663006
-----------------------------------------------------------------
Project Member Comment 185 by bugdroid1@chromium.org, Mar 27 2014
------------------------------------------------------------------
r259797 | wtc@chromium.org | 2014-03-27T05:41:29.912085Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=259797&r2=259796&pathrev=259797
   M http://src.chromium.org/viewvc/chrome/trunk/src/DEPS?r1=259797&r2=259796&pathrev=259797

Use the new PK11_ExportDERPrivateKeyInfo function when using bundled NSS.

Update nss_revision to r259440, which includes the following CL:

Add PK11_ExportDERPrivateKeyInfo and PK11_ExportPrivKeyInfo.
https://codereview.chromium.org/205343004

R=eroman@chromium.org,rsleevi@chromium.org
BUG=245025

Review URL: https://codereview.chromium.org/197873040
-----------------------------------------------------------------
Project Member Comment 186 by bugdroid1@chromium.org, Mar 27 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=170201

------------------------------------------------------------------
r170201 | eroman@chromium.org | 2014-03-27T20:13:55.537610Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/unwrapKey-lacks-usage-expected.txt?r1=170201&r2=170200&pathrev=170201
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/unwrapKey-badParameters.html?r1=170201&r2=170200&pathrev=170201
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrap-unwrap-expected.txt?r1=170201&r2=170200&pathrev=170201
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrapKey-lacks-usage.html?r1=170201&r2=170200&pathrev=170201
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrapKey-unextractable.html?r1=170201&r2=170200&pathrev=170201
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/unwrapKey-lacks-usage.html?r1=170201&r2=170200&pathrev=170201
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrap-unwrap.html?r1=170201&r2=170200&pathrev=170201
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrapKey-badParameters-expected.txt?r1=170201&r2=170200&pathrev=170201
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/unwrapKey-badParameters-expected.txt?r1=170201&r2=170200&pathrev=170201
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrapKey-lacks-usage-expected.txt?r1=170201&r2=170200&pathrev=170201
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrapKey-badParameters.html?r1=170201&r2=170200&pathrev=170201
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrapKey-unextractable-expected.txt?r1=170201&r2=170200&pathrev=170201

[refactor] Split wrap-unwrap.html into smaller files, and directly check the error result.

wrap-unwrap.html becomes these files:

 * wrapKey-unextractable.html
 * wrapKey-lacks-usage.html
 * wrapKey-badParameters.html
 * unwrapKey-lacks-usage.html
 * unwrapKey-badParameters.html

BUG=245025

Review URL: https://codereview.chromium.org/214263002
-----------------------------------------------------------------
Project Member Comment 187 by bugdroid1@chromium.org, Mar 28 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=170252

------------------------------------------------------------------
r170252 | eroman@chromium.org | 2014-03-28T02:45:59.564918Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-ssa-generateKey-parseAlgorithm-failures-expected.txt?r1=170252&r2=170251&pathrev=170252
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-es-generateKey-parseAlgorithm-failures-expected.txt?r1=170252&r2=170251&pathrev=170252
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey-expected.txt?r1=170252&r2=170251&pathrev=170252
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-generateKey-parseAlgorithm-failures-expected.txt?r1=170252&r2=170251&pathrev=170252
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-kw-generateKey-parseAlgorithm-failures.html?r1=170252&r2=170251&pathrev=170252
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-ctr-generateKey-parseAlgorithm-failures-expected.txt?r1=170252&r2=170251&pathrev=170252
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/hmac-generateKey-parseAlgorithm-failures.html?r1=170252&r2=170251&pathrev=170252
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-ssa-generateKey-parseAlgorithm-failures.html?r1=170252&r2=170251&pathrev=170252
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-es-generateKey-parseAlgorithm-failures.html?r1=170252&r2=170251&pathrev=170252
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/generateKey.html?r1=170252&r2=170251&pathrev=170252
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-generateKey-parseAlgorithm-failures.html?r1=170252&r2=170251&pathrev=170252
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-ctr-generateKey-parseAlgorithm-failures.html?r1=170252&r2=170251&pathrev=170252
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-kw-generateKey-parseAlgorithm-failures-expected.txt?r1=170252&r2=170251&pathrev=170252
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/hmac-generateKey-parseAlgorithm-failures-expected.txt?r1=170252&r2=170251&pathrev=170252

[refactor] Split up generateKey.html into multiple files, and test errors directly.

BUG=245025

Review URL: https://codereview.chromium.org/215153005
-----------------------------------------------------------------
Project Member Comment 188 by bugdroid1@chromium.org, Mar 28 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=170263

------------------------------------------------------------------
r170263 | eroman@chromium.org | 2014-03-28T04:22:15.072057Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=170263&r2=170262&pathrev=170263

[refactor] Delete unused test code.

Now that all the tests have been moved off using shouldRejectPromiseWithNull() these temporary helpers can be removed.

BUG=245025

Review URL: https://codereview.chromium.org/212173007
-----------------------------------------------------------------
Project Member Comment 189 by bugdroid1@chromium.org, Mar 28 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=170284

------------------------------------------------------------------
r170284 | eroman@chromium.org | 2014-03-28T06:31:15.877290Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/crypto-gc.html?r1=170284&r2=170283&pathrev=170284
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/gc-2.html?r1=170284&r2=170283&pathrev=170284
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/gc-3.html?r1=170284&r2=170283&pathrev=170284
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/gc.html?r1=170284&r2=170283&pathrev=170284
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/crypto-gc-expected.txt?r1=170284&r2=170283&pathrev=170284
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/gc-2-expected.txt?r1=170284&r2=170283&pathrev=170284
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/gc-3-expected.txt?r1=170284&r2=170283&pathrev=170284
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/gc-expected.txt?r1=170284&r2=170283&pathrev=170284

[webcrypto] Add layout tests for garbage collection of custom properties.

These tests come from WebKit's LayoutTests/crypto, with only slight modifications to work in Blink.

BUG=245025

Review URL: https://codereview.chromium.org/215763002
-----------------------------------------------------------------
Project Member Comment 190 by bugdroid1@chromium.org, Mar 28 2014
------------------------------------------------------------------
r260100 | eroman@chromium.org | 2014-03-28T09:29:59.502041Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=260100&r2=260099&pathrev=260100
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=260100&r2=260099&pathrev=260100

[webcrypto] Fix a bug where generated RSA private keys couldn't be exported or cloned.

BUG=245025
R=rsleevi@chromium.org, wtc@chromium.org

Review URL: https://codereview.chromium.org/213423007
-----------------------------------------------------------------
Blockedon: chromium:357673
Blockedon: chromium:357723
Project Member Comment 193 by bugdroid1@chromium.org, Apr 2 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=170672

------------------------------------------------------------------
r170672 | eroman@chromium.org | 2014-04-02T17:14:17.356082Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=170672&r2=170671&pathrev=170672

[refactor] Remove the AlgorithmRegistry singleton.

The problem with AlgorithmRegistry is that it is not threadsafe.

BUG=357673,245025

Review URL: https://codereview.chromium.org/211423008
-----------------------------------------------------------------
Project Member Comment 194 by bugdroid1@chromium.org, Apr 3 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=170740

------------------------------------------------------------------
r170740 | eroman@chromium.org | 2014-04-03T06:24:09.774572Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/bindings.gypi?r1=170740&r2=170739&pathrev=170740
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/subtle-crypto-concurrent.js?r1=170740&r2=170739&pathrev=170740
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/WorkerGlobalScopeCrypto.h?r1=170740&r2=170739&pathrev=170740
   D http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/custom/V8WorkerCryptoCustom.cpp?r1=170740&r2=170739&pathrev=170740
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/WorkerCrypto.idl?r1=170740&r2=170739&pathrev=170740
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/custom/V8CryptoCustom.cpp?r1=170740&r2=170739&pathrev=170740
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/WorkerCrypto.cpp?r1=170740&r2=170739&pathrev=170740
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/WorkerGlobalScopeCrypto.idl?r1=170740&r2=170739&pathrev=170740
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/worker-subtle-crypto-concurrent.html?r1=170740&r2=170739&pathrev=170740
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=170740&r2=170739&pathrev=170740
   D http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/WorkerCrypto.h?r1=170740&r2=170739&pathrev=170740
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Crypto.cpp?r1=170740&r2=170739&pathrev=170740
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/hmac-sign-verify.html?r1=170740&r2=170739&pathrev=170740
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=170740&r2=170739&pathrev=170740
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Crypto.h?r1=170740&r2=170739&pathrev=170740
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/WorkerGlobalScopeCrypto.cpp?r1=170740&r2=170739&pathrev=170740
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/worker-subtle-crypto-concurrent-expected.txt?r1=170740&r2=170739&pathrev=170740

[webcrypto] Expose crypto.subtle to web workers.

This corresponds with the spec update:
https://dvcs.w3.org/hg/webcrypto-api/rev/9f1f378595fc

BUG=245025

Review URL: https://codereview.chromium.org/222553007
-----------------------------------------------------------------
Project Member Comment 195 by bugdroid1@chromium.org, Apr 10 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=171238

------------------------------------------------------------------
r171238 | eroman@chromium.org | 2014-04-10T06:57:01.352279Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-badParameters.html?r1=171238&r2=171237&pathrev=171238
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.idl?r1=171238&r2=171237&pathrev=171238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-badParameters-expected.txt?r1=171238&r2=171237&pathrev=171238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/unwrapKey-badParameters.html?r1=171238&r2=171237&pathrev=171238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-failures-expected.txt?r1=171238&r2=171237&pathrev=171238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-badParameters.html?r1=171238&r2=171237&pathrev=171238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-badParameters-expected.txt?r1=171238&r2=171237&pathrev=171238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrapKey-badParameters-expected.txt?r1=171238&r2=171237&pathrev=171238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-badParameters-expected.txt?r1=171238&r2=171237&pathrev=171238
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=171238&r2=171237&pathrev=171238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-failures.html?r1=171238&r2=171237&pathrev=171238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/unwrapKey-badParameters-expected.txt?r1=171238&r2=171237&pathrev=171238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-badParameters.html?r1=171238&r2=171237&pathrev=171238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrapKey-badParameters.html?r1=171238&r2=171237&pathrev=171238
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.h?r1=171238&r2=171237&pathrev=171238

[webcrypto] Don't throw any extra WebIDL exceptions from WebCrypto methods.

The editors draft of WebIDL says that methods which return a Promise should not throw exceptions for such failures, but rather reject the promise with the error.

This behavior is not implemented by the Blink generator yet, so this changelist doesn't completely fix the issue.

However, it does remove some of the synchronous exceptions.

BUG=357723,245025

Review URL: https://codereview.chromium.org/222003006
-----------------------------------------------------------------
Project Member Comment 196 by bugdroid1@chromium.org, Apr 12 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=171391

------------------------------------------------------------------
r171391 | eroman@chromium.org | 2014-04-12T01:28:00.275370Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/subtle-crypto-concurrent.js?r1=171391&r2=171390&pathrev=171391

[webcrypto] Improve the concurrency layout test.

Previously it was running a number of concurrent operations, however none of those operations were using the same key.

Now each of the encrypt/decrypt/exportKey, sign/verify/exportKey sequences for a particular key are also run in parallel.

BUG=245025
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/224823003
-----------------------------------------------------------------
Project Member Comment 197 by bugdroid1@chromium.org, Apr 16 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=171789

------------------------------------------------------------------
r171789 | eroman@chromium.org | 2014-04-16T18:01:50.068408Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/unwrapKey-badParameters.html?r1=171789&r2=171788&pathrev=171789
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-generateKey-parseAlgorithm-failures-expected.txt?r1=171789&r2=171788&pathrev=171789
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-failures-expected.txt?r1=171789&r2=171788&pathrev=171789
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=171789&r2=171788&pathrev=171789
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-generateKey-parseAlgorithm-failures.html?r1=171789&r2=171788&pathrev=171789
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-failures.html?r1=171789&r2=171788&pathrev=171789
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/unwrapKey-badParameters-expected.txt?r1=171789&r2=171788&pathrev=171789
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=171789&r2=171788&pathrev=171789

[webcrypto] Update layout tests to match idl generator changes.

Functions that return Promises no longer throw TypeError exceptions.

BUG=362992,245025

Review URL: https://codereview.chromium.org/240063002
-----------------------------------------------------------------
Project Member Comment 198 by bugdroid1@chromium.org, Apr 23 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=172425

------------------------------------------------------------------
r172425 | eroman@chromium.org | 2014-04-23T22:46:37.394188Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-generateKey.html?r1=172425&r2=172424&pathrev=172425
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-generateKey-expected.txt?r1=172425&r2=172424&pathrev=172425

[webcrypto] Add layout test for generated AES keys.

BUG=245025

Review URL: https://codereview.chromium.org/246693007
-----------------------------------------------------------------
Project Member Comment 199 by bugdroid1@chromium.org, Apr 24 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=172434

------------------------------------------------------------------
r172434 | eroman@chromium.org | 2014-04-24T00:18:54.403817Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.h?r1=172434&r2=172433&pathrev=172434
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/SerializedScriptValue.cpp?r1=172434&r2=172433&pathrev=172434
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKey.h?r1=172434&r2=172433&pathrev=172434
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.cpp?r1=172434&r2=172433&pathrev=172434

[webcrypto] Add key usage for 'deriveBits'

BUG=245025

Review URL: https://codereview.chromium.org/248963006
-----------------------------------------------------------------
Project Member Comment 200 by bugdroid1@chromium.org, Apr 24 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=172557

------------------------------------------------------------------
r172557 | eroman@chromium.org | 2014-04-24T23:28:04.215414Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=172557&r2=172556&pathrev=172557
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=172557&r2=172556&pathrev=172557

[refactor] Use a lookup table rather than binary search for algorithm normalization.

Pros: Uses less space, is faster, and easier to extend with new properties.

Cons: Slightly more difficult to edit.

BUG=245025

Review URL: https://codereview.chromium.org/255453002
-----------------------------------------------------------------
Project Member Comment 201 by bugdroid1@chromium.org, Apr 26 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=172696

------------------------------------------------------------------
r172696 | eroman@chromium.org | 2014-04-26T03:29:40.726466Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoResultImpl.h?r1=172696&r2=172695&pathrev=172696
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=172696&r2=172695&pathrev=172696
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/CryptoResult.h?r1=172696&r2=172695&pathrev=172696
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoResultImpl.cpp?r1=172696&r2=172695&pathrev=172696

[webcrypto] Make it safe to delete WebCryptoResult from any thread.

It used to be that WebCrytoResult had to be deleted from the original Blink thread which created it. This posed a challenge for embedders that wanted to defer the work to a background thread. Since it was possible that by the time the work had completed, the original Blink thread was gone (if it was a WebWorker).

The approach taken in this changelist is to split out the state tied to an ExecutionContext into a separate WeakPtr which deletes itself on request completion, or when the ExecutionContext is destroyed.

BUG=366840,245025

Review URL: https://codereview.chromium.org/253563002
-----------------------------------------------------------------
Project Member Comment 202 by bugdroid1@chromium.org, Apr 26 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=172697

------------------------------------------------------------------
r172697 | eroman@chromium.org | 2014-04-26T03:36:07.468557Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-kw-wrapKey-unwrapKey-raw-expected.txt?r1=172697&r2=172696&pathrev=172697
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-kw-wrapKey-unwrapKey-raw.html?r1=172697&r2=172696&pathrev=172697

[webcrypto] Add a layout test for wraping/unwrapping AES-CBC keys using AES-KW.

BUG=245025

Review URL: https://codereview.chromium.org/250823005
-----------------------------------------------------------------
Project Member Comment 203 by bugdroid1@chromium.org, Apr 28 2014
Labels: merge-merged-git-svn
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c503936fa4256dbfcfe7f3b7ca19f4bbce6fbb22

commit c503936fa4256dbfcfe7f3b7ca19f4bbce6fbb22
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Mon Apr 28 19:10:34 2014 +0000

[webcrypto] Set the error type for failures.

This corresponds with the WebCrypto spec update:
https://dvcs.w3.org/hg/webcrypto-api/rev/64993be45f9f

And is a dependency for the Blink change:
https://codereview.chromium.org/243853004/

BUG=245025

Review URL: https://codereview.chromium.org/243433006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266620 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 204 by bugdroid1@chromium.org, Apr 28 2014
------------------------------------------------------------------
r266620 | eroman@chromium.org | 2014-04-28T19:10:34.449563Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=266620&r2=266619&pathrev=266620
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.h?r1=266620&r2=266619&pathrev=266620
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=266620&r2=266619&pathrev=266620
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=266620&r2=266619&pathrev=266620
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=266620&r2=266619&pathrev=266620
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=266620&r2=266619&pathrev=266620
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.cc?r1=266620&r2=266619&pathrev=266620
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.cc?r1=266620&r2=266619&pathrev=266620

[webcrypto] Set the error type for failures.

This corresponds with the WebCrypto spec update:
https://dvcs.w3.org/hg/webcrypto-api/rev/64993be45f9f

And is a dependency for the Blink change:
https://codereview.chromium.org/243853004/

BUG=245025

Review URL: https://codereview.chromium.org/243433006
-----------------------------------------------------------------
Project Member Comment 205 by bugdroid1@chromium.org, Apr 28 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=172812

------------------------------------------------------------------
r172812 | eroman@chromium.org | 2014-04-28T22:28:00.949237Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-es-generateKey-parseAlgorithm-failures-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/hmac-generateKey-parseAlgorithm-failures.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-failures-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-ssa-generateKey-parseAlgorithm-failures.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-gcm-parseAlgorithm-failures.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrapKey-badParameters-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-badParameters-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/unwrapKey-badParameters-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-badParameters-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-kw-generateKey-parseAlgorithm-failures.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-es-generateKey-parseAlgorithm-failures.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-badParameters-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-failures.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrapKey-lacks-usage-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrapKey-badParameters.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-badParameters.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrapKey-unextractable-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/unwrapKey-lacks-usage-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoResultImpl.h?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-key-usages-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/unwrapKey-badParameters.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-parseAlgorithm-failures-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-key-algorithm-mismatch-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-generateKey-parseAlgorithm-failures-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-ctr-parseAlgorithm-failures-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-ctr-generateKey-parseAlgorithm-failures-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-badParameters.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-unextractable-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/CryptoResult.h?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/hmac-generateKey-parseAlgorithm-failures-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-badParameters.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-ssa-generateKey-parseAlgorithm-failures-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-gcm-parseAlgorithm-failures-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/Key.cpp?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrapKey-lacks-usage.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/wrapKey-unextractable.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/unwrapKey-lacks-usage.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-key-usages.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-parseAlgorithm-failures.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-key-algorithm-mismatch.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-ctr-parseAlgorithm-failures.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-generateKey-parseAlgorithm-failures.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-ctr-generateKey-parseAlgorithm-failures.html?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoResultImpl.cpp?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/exported/WebCryptoResult.cpp?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-kw-generateKey-parseAlgorithm-failures-expected.txt?r1=172812&r2=172811&pathrev=172812
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-unextractable.html?r1=172812&r2=172811&pathrev=172812

[webcrypto] Reject failed operations with a DOMException rather than null.

This corresponds with the WebCrypto spec update:
https://dvcs.w3.org/hg/webcrypto-api/rev/64993be45f9f

BUG=245025

Review URL: https://codereview.chromium.org/243853004
-----------------------------------------------------------------
Project Member Comment 206 by bugdroid1@chromium.org, Apr 29 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cb070b93105a0e7fa165280786928c39c237c0c4

commit cb070b93105a0e7fa165280786928c39c237c0c4
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Tue Apr 29 09:13:51 2014 +0000

[webcrypto] Make operations run on a background thread so they don't block the blink thread.

More details on threading strategy provided in webcrypto_impl.cc.

BUG=245025

Review URL: https://codereview.chromium.org/233733004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266798 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 207 by bugdroid1@chromium.org, Apr 29 2014
------------------------------------------------------------------
r266798 | eroman@chromium.org | 2014-04-29T09:13:51.493889Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=266798&r2=266797&pathrev=266798
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=266798&r2=266797&pathrev=266798
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.h?r1=266798&r2=266797&pathrev=266798
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.h?r1=266798&r2=266797&pathrev=266798
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.cc?r1=266798&r2=266797&pathrev=266798
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.h?r1=266798&r2=266797&pathrev=266798
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=266798&r2=266797&pathrev=266798
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.h?r1=266798&r2=266797&pathrev=266798
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto.h?r1=266798&r2=266797&pathrev=266798
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=266798&r2=266797&pathrev=266798
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=266798&r2=266797&pathrev=266798
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=266798&r2=266797&pathrev=266798
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.h?r1=266798&r2=266797&pathrev=266798

[webcrypto] Make operations run on a background thread so they don't block the blink thread.

More details on threading strategy provided in webcrypto_impl.cc.

BUG=245025

Review URL: https://codereview.chromium.org/233733004
-----------------------------------------------------------------
Project Member Comment 208 by bugdroid1@chromium.org, Apr 29 2014
------------------------------------------------------------------
r266903 | jsbell@chromium.org | 2014-04-29T16:58:31.831373Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=266903&r2=266902&pathrev=266903
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.h?r1=266903&r2=266902&pathrev=266903
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto.h?r1=266903&r2=266902&pathrev=266903
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=266903&r2=266902&pathrev=266903
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=266903&r2=266902&pathrev=266903
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=266903&r2=266902&pathrev=266903
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.h?r1=266903&r2=266902&pathrev=266903
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=266903&r2=266902&pathrev=266903
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=266903&r2=266902&pathrev=266903
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.h?r1=266903&r2=266902&pathrev=266903
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.h?r1=266903&r2=266902&pathrev=266903
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.cc?r1=266903&r2=266902&pathrev=266903
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.h?r1=266903&r2=266902&pathrev=266903

Revert 266798 "[webcrypto] Make operations run on a background t..."

> [webcrypto] Make operations run on a background thread so they don't block the blink thread.
> 
> More details on threading strategy provided in webcrypto_impl.cc.
> 
> BUG=245025
> 
> Review URL: https://codereview.chromium.org/233733004

TBR=eroman@chromium.org

Review URL: https://codereview.chromium.org/252213003
-----------------------------------------------------------------
Project Member Comment 209 by bugdroid1@chromium.org, Apr 29 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/04a5dfa93f3185d189452aee72bdc259df33f11b

commit 04a5dfa93f3185d189452aee72bdc259df33f11b
Author: jsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Tue Apr 29 16:58:31 2014 +0000

Revert 266798 "[webcrypto] Make operations run on a background t..."

> [webcrypto] Make operations run on a background thread so they don't block the blink thread.
> 
> More details on threading strategy provided in webcrypto_impl.cc.
> 
> BUG=245025
> 
> Review URL: https://codereview.chromium.org/233733004

TBR=eroman@chromium.org

Review URL: https://codereview.chromium.org/252213003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266903 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 210 by bugdroid1@chromium.org, Apr 30 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0945421beed7af0475aa8fa1d255648421f0bc8c

commit 0945421beed7af0475aa8fa1d255648421f0bc8c
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Wed Apr 30 00:47:16 2014 +0000

[refactor] Remove usages of WEBCRYPTO_HAS_ERROR_TYPE ifdef.

No longer needed now that Blink has rolled.

BUG=245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/253123002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267013 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 211 by bugdroid1@chromium.org, Apr 30 2014
------------------------------------------------------------------
r267013 | eroman@chromium.org | 2014-04-30T00:47:16.806021Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.cc?r1=267013&r2=267012&pathrev=267013
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.cc?r1=267013&r2=267012&pathrev=267013
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.h?r1=267013&r2=267012&pathrev=267013

[refactor] Remove usages of WEBCRYPTO_HAS_ERROR_TYPE ifdef.

No longer needed now that Blink has rolled.

BUG=245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/253123002
-----------------------------------------------------------------
Project Member Comment 212 by bugdroid1@chromium.org, Apr 30 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=172926

------------------------------------------------------------------
r172926 | eroman@chromium.org | 2014-04-30T04:39:57.713015Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=172926&r2=172925&pathrev=172926

[refactor] Remove WEBCRYPTO_HAS_ERROR_TYPE ifdef.

BUG=245025

Review URL: https://codereview.chromium.org/259233003
-----------------------------------------------------------------
Project Member Comment 213 by bugdroid1@chromium.org, Apr 30 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/88be9856b4fc2887b9a7a94077755dad6d41be3f

commit 88be9856b4fc2887b9a7a94077755dad6d41be3f
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Wed Apr 30 11:18:59 2014 +0000

[webcrypto] Make operations run on a background thread so they don't block the blink thread.

More details on threading strategy provided in webcrypto_impl.cc.

BUG=245025

Review URL: https://codereview.chromium.org/254153002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267176 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 214 by bugdroid1@chromium.org, Apr 30 2014
------------------------------------------------------------------
r267176 | eroman@chromium.org | 2014-04-30T11:18:59.062238Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.cc?r1=267176&r2=267175&pathrev=267176
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.h?r1=267176&r2=267175&pathrev=267176
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=267176&r2=267175&pathrev=267176
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.h?r1=267176&r2=267175&pathrev=267176
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto.h?r1=267176&r2=267175&pathrev=267176
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=267176&r2=267175&pathrev=267176
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=267176&r2=267175&pathrev=267176
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=267176&r2=267175&pathrev=267176
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.h?r1=267176&r2=267175&pathrev=267176
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=267176&r2=267175&pathrev=267176
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=267176&r2=267175&pathrev=267176
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.h?r1=267176&r2=267175&pathrev=267176
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.h?r1=267176&r2=267175&pathrev=267176

[webcrypto] Make operations run on a background thread so they don't block the blink thread.

More details on threading strategy provided in webcrypto_impl.cc.

BUG=245025

Review URL: https://codereview.chromium.org/254153002
-----------------------------------------------------------------
Blockedon: chromium:368814 chromium:368821
Project Member Comment 216 by bugdroid1@chromium.org, Apr 30 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/96608acf8661dfe96f97146a31e7ffe49346ba72

commit 96608acf8661dfe96f97146a31e7ffe49346ba72
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Wed Apr 30 23:27:52 2014 +0000

[refactor] Remove WebArrayBuffer from unittests, since now using std::vector.

This is a cleanup following https://codereview.chromium.org/233733004/.

BUG=245025

Review URL: https://codereview.chromium.org/251213006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267375 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 217 by bugdroid1@chromium.org, Apr 30 2014
------------------------------------------------------------------
r267375 | eroman@chromium.org | 2014-04-30T23:27:52.412823Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=267375&r2=267374&pathrev=267375
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=267375&r2=267374&pathrev=267375
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.h?r1=267375&r2=267374&pathrev=267375
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/crypto_data.cc?r1=267375&r2=267374&pathrev=267375
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/crypto_data.h?r1=267375&r2=267374&pathrev=267375

[refactor] Remove WebArrayBuffer from unittests, since now using std::vector.

This is a cleanup following https://codereview.chromium.org/233733004/.

BUG=245025

Review URL: https://codereview.chromium.org/251213006
-----------------------------------------------------------------
Project Member Comment 218 by bugdroid1@chromium.org, May 6 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=173416

------------------------------------------------------------------
r173416 | eroman@chromium.org | 2014-05-06T19:10:15.582367Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/DOMException.cpp?r1=173416&r2=173415&pathrev=173416
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/ExceptionCode.h?r1=173416&r2=173415&pathrev=173416
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-decrypt-failure-expected.txt?r1=173416&r2=173415&pathrev=173416
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoResultImpl.cpp?r1=173416&r2=173415&pathrev=173416
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-decrypt-failure.html?r1=173416&r2=173415&pathrev=173416

[webcrypto] Define the DOMException OperationError.

This is defined by the Web Crypto spec:
https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#SubtleCrypto-Exceptions

BUG=245025

Review URL: https://codereview.chromium.org/258203003
-----------------------------------------------------------------
Labels: M-37
Labels: -Pri-2 Pri-1
Project Member Comment 221 by bugdroid1@chromium.org, May 6 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=173444

------------------------------------------------------------------
r173444 | eroman@chromium.org | 2014-05-06T23:01:21.342811Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaHashedKey-private.html?r1=173444&r2=173443&pathrev=173444
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaKey-public-expected.txt?r1=173444&r2=173443&pathrev=173444
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaKey-private.html?r1=173444&r2=173443&pathrev=173444
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaHashedKey-public.html?r1=173444&r2=173443&pathrev=173444
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaKey-public.html?r1=173444&r2=173443&pathrev=173444
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-aesKey-expected.txt?r1=173444&r2=173443&pathrev=173444
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-hmacKey-expected.txt?r1=173444&r2=173443&pathrev=173444
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaHashedKey-private-expected.txt?r1=173444&r2=173443&pathrev=173444
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaKey-private-expected.txt?r1=173444&r2=173443&pathrev=173444
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/subtle-crypto-concurrent.js?r1=173444&r2=173443&pathrev=173444
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-aesKey.html?r1=173444&r2=173443&pathrev=173444
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-hmacKey.html?r1=173444&r2=173443&pathrev=173444
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaHashedKey-public-expected.txt?r1=173444&r2=173443&pathrev=173444

[refactor] Replace shouldBeTrue("a != b") with shouldNotBe("a", "b") in existing crypto tests.

The same changes were made for a new test in https://codereview.chromium.org/268273002; this fixes the older ones.

Also fixes a typo in a comment, pointed out by same review.

BUG=245025

Review URL: https://codereview.chromium.org/268653004
-----------------------------------------------------------------
Project Member Comment 222 by bugdroid1@chromium.org, May 6 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=173446

------------------------------------------------------------------
r173446 | eroman@chromium.org | 2014-05-06T23:31:38.200753Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/SerializedScriptValue.cpp?r1=173446&r2=173445&pathrev=173446

[refactor] Use "return false" instead of "return 0".

BUG=245025

Review URL: https://codereview.chromium.org/269543026
-----------------------------------------------------------------
Project Member Comment 223 by bugdroid1@chromium.org, May 8 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=173601

------------------------------------------------------------------
r173601 | eroman@chromium.org | 2014-05-08T04:55:25.213395Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.h?r1=173601&r2=173600&pathrev=173601
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.idl?r1=173601&r2=173600&pathrev=173601
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-arraybuffer-expected.txt?r1=173601&r2=173600&pathrev=173601
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-failures-expected.txt?r1=173601&r2=173600&pathrev=173601
   A http://src.chromium.org/viewvc/blink/trunk/Source/wtf/ArrayPiece.cpp?r1=173601&r2=173600&pathrev=173601
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-badParameters-expected.txt?r1=173601&r2=173600&pathrev=173601
   M http://src.chromium.org/viewvc/blink/trunk/Source/wtf/wtf.gypi?r1=173601&r2=173600&pathrev=173601
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/digest-arraybuffer.html?r1=173601&r2=173600&pathrev=173601
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-badParameters-expected.txt?r1=173601&r2=173600&pathrev=173601
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=173601&r2=173600&pathrev=173601
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/unwrapKey-badParameters-expected.txt?r1=173601&r2=173600&pathrev=173601
   A http://src.chromium.org/viewvc/blink/trunk/Source/wtf/ArrayPiece.h?r1=173601&r2=173600&pathrev=173601
   M http://src.chromium.org/viewvc/blink/trunk/Source/wtf/Forward.h?r1=173601&r2=173600&pathrev=173601

[webcrypto] Allow both ArrayBuffer and ArrayBufferView as inputs to crypto.subtle methods.

This is in line with the webcrypto spec which takes CryptoOperationData as inputs throughout, and defines it as:

  typedef (ArrayBuffer or ArrayBufferView) CryptoOperationData;

BUG=369179,245025

Review URL: https://codereview.chromium.org/267133002
-----------------------------------------------------------------
Project Member Comment 224 by bugdroid1@chromium.org, May 9 2014
------------------------------------------------------------------
r269262 | eroman@chromium.org | 2014-05-09T13:34:42.988414Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=269262&r2=269261&pathrev=269262
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=269262&r2=269261&pathrev=269262

[webcrypto] Fix AES-KW unwrapping for symmetric keys (NSS).

The unwrapped key did not have the proper flags so it could not be used in other operations (like signing).

BUG=370712,245025

Review URL: https://codereview.chromium.org/269313004
-----------------------------------------------------------------
Project Member Comment 225 by bugdroid1@chromium.org, May 9 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cd636729b2ffc613f90fa22c605d15d1fe2ba70e

commit cd636729b2ffc613f90fa22c605d15d1fe2ba70e
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Fri May 09 13:34:42 2014

[webcrypto] Fix AES-KW unwrapping for symmetric keys (NSS).

The unwrapped key did not have the proper flags so it could not be used in other operations (like signing).

BUG=370712,245025

Review URL: https://codereview.chromium.org/269313004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269262 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 226 by bugdroid1@chromium.org, May 10 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/82ca1533fccfa2beec6bbedab766231e970e61b7

commit 82ca1533fccfa2beec6bbedab766231e970e61b7
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Sat May 10 02:00:26 2014

[refactor] Change ordering of wrapkey parameters

crypto.subtle.wrapKey() orders the key to be wrapped before the wrapping key. Use the same convention throughout webcrypto code to avoid confusion.

BUG=245025

Review URL: https://codereview.chromium.org/272033003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269478 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 227 by bugdroid1@chromium.org, May 10 2014
------------------------------------------------------------------
r269478 | eroman@chromium.org | 2014-05-10T02:00:26.990223Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto.h?r1=269478&r2=269477&pathrev=269478
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=269478&r2=269477&pathrev=269478
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=269478&r2=269477&pathrev=269478
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=269478&r2=269477&pathrev=269478
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.h?r1=269478&r2=269477&pathrev=269478
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.cc?r1=269478&r2=269477&pathrev=269478
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=269478&r2=269477&pathrev=269478

[refactor] Change ordering of wrapkey parameters

crypto.subtle.wrapKey() orders the key to be wrapped before the wrapping key. Use the same convention throughout webcrypto code to avoid confusion.

BUG=245025

Review URL: https://codereview.chromium.org/272033003
-----------------------------------------------------------------
Project Member Comment 228 by bugdroid1@chromium.org, May 10 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/063854ec9dca4c3a460812c3eddf54eb7f9588dd

commit 063854ec9dca4c3a460812c3eddf54eb7f9588dd
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Sat May 10 02:47:01 2014

[refactor] Move giant JWK import comment block to top of file.

BUG=245025

Review URL: https://codereview.chromium.org/274943002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269495 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 229 by bugdroid1@chromium.org, May 10 2014
------------------------------------------------------------------
r269495 | eroman@chromium.org | 2014-05-10T02:47:01.229499Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=269495&r2=269494&pathrev=269495

[refactor] Move giant JWK import comment block to top of file.

BUG=245025

Review URL: https://codereview.chromium.org/274943002
-----------------------------------------------------------------
Project Member Comment 230 by bugdroid1@chromium.org, May 13 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=173981

------------------------------------------------------------------
r173981 | eroman@chromium.org | 2014-05-13T19:42:12.726413Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/worker-infinite-loop-generateKey.js?r1=173981&r2=173980&pathrev=173981
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoResultImpl.cpp?r1=173981&r2=173980&pathrev=173981
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/abandon-crypto-operation-expected.txt?r1=173981&r2=173980&pathrev=173981
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/abandon-crypto-operation.html?r1=173981&r2=173980&pathrev=173981
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/ScriptPromiseResolverWithContext.h?r1=173981&r2=173980&pathrev=173981

Fix crash when ExecutionContext is torn down before a crypto operation has completed.

The issue is that ActiveDOMObjects cannot be deleted as part of a different observer's contextDestroyed().

The solution taken here is to subclass PromiseResolveWithContext so that the deletion is done as part of its contextDestroyed() instead.

BUG=368821,245025

Review URL: https://codereview.chromium.org/263163006
-----------------------------------------------------------------
Project Member Comment 231 by bugdroid1@chromium.org, May 13 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0bf8178f57cfb394e872cc78df125bca3dbc0f11

commit 0bf8178f57cfb394e872cc78df125bca3dbc0f11
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Tue May 13 21:27:00 2014

[refactor] Remove IsHashAlgorithm() function.

BUG=245025

Review URL: https://codereview.chromium.org/274863003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270204 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 232 by bugdroid1@chromium.org, May 13 2014
------------------------------------------------------------------
r270204 | eroman@chromium.org | 2014-05-13T21:27:00.113997Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=270204&r2=270203&pathrev=270204
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.h?r1=270204&r2=270203&pathrev=270204
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=270204&r2=270203&pathrev=270204

[refactor] Remove IsHashAlgorithm() function.

BUG=245025

Review URL: https://codereview.chromium.org/274863003
-----------------------------------------------------------------
Project Member Comment 233 by bugdroid1@chromium.org, May 13 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/72af5c558d6d5b28285f95a9d5a38c76a8ba73d6

commit 72af5c558d6d5b28285f95a9d5a38c76a8ba73d6
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Tue May 13 21:40:19 2014

[webcrypto] Fix a race in BlinkPlatformImpl::crypto(), by using eager initilization of WebCryptoImpl.

BUG=371243,245025

Review URL: https://codereview.chromium.org/278513004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270215 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 234 by bugdroid1@chromium.org, May 13 2014
------------------------------------------------------------------
r270215 | eroman@chromium.org | 2014-05-13T21:40:19.698914Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.cc?r1=270215&r2=270214&pathrev=270215
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.h?r1=270215&r2=270214&pathrev=270215
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/blink_platform_impl.cc?r1=270215&r2=270214&pathrev=270215
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/blink_platform_impl.h?r1=270215&r2=270214&pathrev=270215
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.h?r1=270215&r2=270214&pathrev=270215

[webcrypto] Fix a race in BlinkPlatformImpl::crypto(), by using eager initilization of WebCryptoImpl.

BUG=371243,245025

Review URL: https://codereview.chromium.org/278513004
-----------------------------------------------------------------
Labels: Cr-Blink-WebCrypto
Project Member Comment 236 by bugdroid1@chromium.org, May 20 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=174414

------------------------------------------------------------------
r174414 | eroman@chromium.org | 2014-05-20T21:59:37.364895Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/wtf/CryptographicallyRandomNumber.cpp?r1=174414&r2=174413&pathrev=174414

[webcrypto] Fix a race in crypto.getRandomValues() when used from WebWorkers.

BUG=368814, 245025

Review URL: https://codereview.chromium.org/285863003
-----------------------------------------------------------------
Project Member Comment 237 by bugdroid1@chromium.org, May 21 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=174457

------------------------------------------------------------------
r174457 | eroman@chromium.org | 2014-05-21T15:24:18.387109Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/exportKey-unextractable.html?r1=174457&r2=174456&pathrev=174457
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-badParameters.html?r1=174457&r2=174456&pathrev=174457
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-es-generateKey-parseAlgorithm-failures-expected.txt?r1=174457&r2=174456&pathrev=174457
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaKey-private-expected.txt?r1=174457&r2=174456&pathrev=174457
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/subtle-crypto-concurrent.js?r1=174457&r2=174456&pathrev=174457
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaKey-public-expected.txt?r1=174457&r2=174456&pathrev=174457
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-es-generateKey-parseAlgorithm-failures.html?r1=174457&r2=174456&pathrev=174457
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaKey-private.html?r1=174457&r2=174456&pathrev=174457
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/sign-verify-badParameters-expected.txt?r1=174457&r2=174456&pathrev=174457
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaKey-public.html?r1=174457&r2=174456&pathrev=174457

[webcrypto] Remove RSA-ES support (1 of 3)

Removes RSA-ES from the LayoutTests.

BUG=372920, 245025
R=adamk@chromium.org

Review URL: https://codereview.chromium.org/285823002
-----------------------------------------------------------------
Project Member Comment 238 by bugdroid1@chromium.org, May 21 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6f82af2c1c69d6f8f324347198b4f41707852ff2

commit 6f82af2c1c69d6f8f324347198b4f41707852ff2
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Wed May 21 15:26:14 2014

[webcrypto] Add JWK import/export of RSA private keys (NSS).

BUG=373543,373542,245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/287133004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271901 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 239 by bugdroid1@chromium.org, May 21 2014
------------------------------------------------------------------
r271901 | eroman@chromium.org | 2014-05-21T15:26:14.941631Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=271901&r2=271900&pathrev=271901
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.cc?r1=271901&r2=271900&pathrev=271901
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=271901&r2=271900&pathrev=271901
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.h?r1=271901&r2=271900&pathrev=271901
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto.h?r1=271901&r2=271900&pathrev=271901
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=271901&r2=271900&pathrev=271901
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=271901&r2=271900&pathrev=271901
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=271901&r2=271900&pathrev=271901
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.h?r1=271901&r2=271900&pathrev=271901

[webcrypto] Add JWK import/export of RSA private keys (NSS).

BUG=373543,373542,245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/287133004
-----------------------------------------------------------------
Project Member Comment 240 by bugdroid1@chromium.org, May 21 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/11ef91967445f891858da41836b3d187b4d6dbbf

commit 11ef91967445f891858da41836b3d187b4d6dbbf
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Wed May 21 17:03:33 2014

[webcrypto] Fix a leak in RSA private key import using JWK.

BUG=375808,245025,373542
TBR=rsleevi

Review URL: https://codereview.chromium.org/299623007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271920 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 241 by bugdroid1@chromium.org, May 21 2014
------------------------------------------------------------------
r271920 | eroman@chromium.org | 2014-05-21T17:03:33.869911Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=271920&r2=271919&pathrev=271920

[webcrypto] Fix a leak in RSA private key import using JWK.

BUG=375808,245025,373542
TBR=rsleevi

Review URL: https://codereview.chromium.org/299623007
-----------------------------------------------------------------
Project Member Comment 242 by bugdroid1@chromium.org, May 22 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=174495

------------------------------------------------------------------
r174495 | jbroman@chromium.org | 2014-05-21T23:59:01.139074Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKeyAlgorithmParams.h?r1=174495&r2=174494&pathrev=174495

Remove WEBCRYPTO_HMAC_KEY_HAS_LENGTH.

This is no longer needed since >1 month ago:
https://codereview.chromium.org/205583003

BUG=245025

Review URL: https://codereview.chromium.org/291583006
-----------------------------------------------------------------
Project Member Comment 243 by bugdroid1@chromium.org, May 22 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=174522

------------------------------------------------------------------
r174522 | eroman@chromium.org | 2014-05-22T05:23:18.409866Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaHashedKey-public.html?r1=174522&r2=174521&pathrev=174522
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaHashedKey-private-expected.txt?r1=174522&r2=174521&pathrev=174522
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaHashedKey-public-expected.txt?r1=174522&r2=174521&pathrev=174522
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-rsaHashedKey-private.html?r1=174522&r2=174521&pathrev=174522

[webcrypto] Fix the key usages used by some layout tests.

A Chromium-side change is going to make these illegal, so update the tests first.

Once the Chromium side has landed, additional tests for error case will be added.

BUG=372944,245025

Review URL: https://codereview.chromium.org/296723006
-----------------------------------------------------------------
Project Member Comment 244 by bugdroid1@chromium.org, May 22 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=174523

------------------------------------------------------------------
r174523 | eroman@chromium.org | 2014-05-22T05:23:44.313676Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-encrypt-parseAlgorithm-failures-expected.txt?r1=174523&r2=174522&pathrev=174523
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-ssa-generateKey-parseAlgorithm-failures-expected.txt?r1=174523&r2=174522&pathrev=174523
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=174523&r2=174522&pathrev=174523
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-generateKey-parseAlgorithm-failures.html?r1=174523&r2=174522&pathrev=174523
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-encrypt-parseAlgorithm-failures.html?r1=174523&r2=174522&pathrev=174523
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-ssa-generateKey-parseAlgorithm-failures.html?r1=174523&r2=174522&pathrev=174523
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-generateKey-parseAlgorithm-failures-expected.txt?r1=174523&r2=174522&pathrev=174523

[webcrypto] Hook up parameter normalization for RSA-OAEP.

BUG=245025,372917

Review URL: https://codereview.chromium.org/289073005
-----------------------------------------------------------------
Project Member Comment 245 by bugdroid1@chromium.org, May 22 2014
------------------------------------------------------------------
r272291 | eroman@chromium.org | 2014-05-22T20:05:06.955337Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=272291&r2=272290&pathrev=272291
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=272291&r2=272290&pathrev=272291

[webcrypto] Add deriveBits key_op to JWK import/export.

BUG=245025

Review URL: https://codereview.chromium.org/267323009
-----------------------------------------------------------------
Project Member Comment 246 by bugdroid1@chromium.org, May 23 2014
------------------------------------------------------------------
r272577 | eroman@chromium.org | 2014-05-23T19:11:59.735441Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=272577&r2=272576&pathrev=272577
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.h?r1=272577&r2=272576&pathrev=272577
   D http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/webcrypto/rsa_es.json?r1=272577&r2=272576&pathrev=272577
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto.h?r1=272577&r2=272576&pathrev=272577
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=272577&r2=272576&pathrev=272577
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=272577&r2=272576&pathrev=272577
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=272577&r2=272576&pathrev=272577
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=272577&r2=272576&pathrev=272577
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=272577&r2=272576&pathrev=272577
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.h?r1=272577&r2=272576&pathrev=272577
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.cc?r1=272577&r2=272576&pathrev=272577

[webcrypto] Remove RSA-ES support (2 of 3)

BUG=372920,245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/282903002
-----------------------------------------------------------------
Project Member Comment 247 by bugdroid1@chromium.org, May 23 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=174726

------------------------------------------------------------------
r174726 | eroman@chromium.org | 2014-05-23T22:54:20.996481Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/SerializedScriptValue.cpp?r1=174726&r2=174725&pathrev=174726
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyAlgorithm.cpp?r1=174726&r2=174725&pathrev=174726
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKeyAlgorithmParams.h?r1=174726&r2=174725&pathrev=174726
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyAlgorithm.h?r1=174726&r2=174725&pathrev=174726
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/exported/WebCryptoKeyAlgorithm.cpp?r1=174726&r2=174725&pathrev=174726
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=174726&r2=174725&pathrev=174726
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyAlgorithm.idl?r1=174726&r2=174725&pathrev=174726
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaKeyAlgorithm.cpp?r1=174726&r2=174725&pathrev=174726
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=174726&r2=174725&pathrev=174726
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithmParams.h?r1=174726&r2=174725&pathrev=174726
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaKeyAlgorithm.h?r1=174726&r2=174725&pathrev=174726
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/exported/WebCryptoAlgorithm.cpp?r1=174726&r2=174725&pathrev=174726
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKeyAlgorithm.h?r1=174726&r2=174725&pathrev=174726

[webcrypto] Remove RSA-ES support (3 of 3)

  * RSA-ES keys that were previously serialized via structured clone will not be readable after this change. Since WebCrypto is behind an experimental flag this breakage is acceptable.

 * Removes some related code. Parameters for generating and importing RSA keys had the notion of being hashed or not. With RSA-ES gone, all of the RSA keys enumerated by the spec are "hashed" (rsa-ssa, rsa-oaep, rsa-pss) so this distinction isn't necessary.

BUG=372920, 245025
R=jochen@chromium.org, jsbell@chromium.org, jww@chromium.org

Review URL: https://codereview.chromium.org/284973002
-----------------------------------------------------------------
Project Member Comment 248 by bugdroid1@chromium.org, May 23 2014
------------------------------------------------------------------
r272630 | eroman@chromium.org | 2014-05-23T23:13:47.869707Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto.h?r1=272630&r2=272629&pathrev=272630
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=272630&r2=272629&pathrev=272630
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=272630&r2=272629&pathrev=272630
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=272630&r2=272629&pathrev=272630
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.h?r1=272630&r2=272629&pathrev=272630
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/jwk.cc?r1=272630&r2=272629&pathrev=272630
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=272630&r2=272629&pathrev=272630
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.h?r1=272630&r2=272629&pathrev=272630
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.cc?r1=272630&r2=272629&pathrev=272630
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.cc?r1=272630&r2=272629&pathrev=272630
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=272630&r2=272629&pathrev=272630
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.h?r1=272630&r2=272629&pathrev=272630

[webcryto] Validate key usages during key creation.

 (1) Key creation (whether by importKey(), unwrapKey(), generateKey() now fails if the requested key usages are not applicable (for instance asking for 'sign' on an AES-CBC key).
 (2) When generating a key pair, the public/private key get the intersection of supported usages and requested ones.
 (3) The exceptions thrown during the import phase of unwrapKey() are now surfaced to the caller (bug 372944)

BUG=372040,372944,245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/282133002
-----------------------------------------------------------------
Project Member Comment 249 by bugdroid1@chromium.org, May 23 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=174733

------------------------------------------------------------------
r174733 | kbr@chromium.org | 2014-05-23T23:38:17.723682Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaKeyAlgorithm.h?r1=174733&r2=174732&pathrev=174733
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/exported/WebCryptoAlgorithm.cpp?r1=174733&r2=174732&pathrev=174733
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKeyAlgorithm.h?r1=174733&r2=174732&pathrev=174733
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/SerializedScriptValue.cpp?r1=174733&r2=174732&pathrev=174733
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyAlgorithm.cpp?r1=174733&r2=174732&pathrev=174733
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKeyAlgorithmParams.h?r1=174733&r2=174732&pathrev=174733
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyAlgorithm.h?r1=174733&r2=174732&pathrev=174733
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/exported/WebCryptoKeyAlgorithm.cpp?r1=174733&r2=174732&pathrev=174733
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=174733&r2=174732&pathrev=174733
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyAlgorithm.idl?r1=174733&r2=174732&pathrev=174733
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaKeyAlgorithm.cpp?r1=174733&r2=174732&pathrev=174733
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=174733&r2=174732&pathrev=174733
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithmParams.h?r1=174733&r2=174732&pathrev=174733

Revert 174726 "[webcrypto] Remove RSA-ES support (3 of 3)"

Broke build on Android. See bug 372920 for details.

BUG=372920, 245025

> [webcrypto] Remove RSA-ES support (3 of 3)
> 
>   * RSA-ES keys that were previously serialized via structured clone will not be readable after this change. Since WebCrypto is behind an experimental flag this breakage is acceptable.
> 
>  * Removes some related code. Parameters for generating and importing RSA keys had the notion of being hashed or not. With RSA-ES gone, all of the RSA keys enumerated by the spec are "hashed" (rsa-ssa, rsa-oaep, rsa-pss) so this distinction isn't necessary.
> 
> BUG=372920, 245025
> R=jochen@chromium.org, jsbell@chromium.org, jww@chromium.org
> 
> Review URL: https://codereview.chromium.org/284973002

TBR=eroman@chromium.org

Review URL: https://codereview.chromium.org/296333002
-----------------------------------------------------------------
Project Member Comment 250 by bugdroid1@chromium.org, May 24 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=174741

------------------------------------------------------------------
r174741 | eroman@chromium.org | 2014-05-24T01:24:58.486919Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKeyAlgorithmParams.h?r1=174741&r2=174740&pathrev=174741
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyAlgorithm.h?r1=174741&r2=174740&pathrev=174741
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/exported/WebCryptoKeyAlgorithm.cpp?r1=174741&r2=174740&pathrev=174741
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithm.h?r1=174741&r2=174740&pathrev=174741
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyAlgorithm.idl?r1=174741&r2=174740&pathrev=174741
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaKeyAlgorithm.cpp?r1=174741&r2=174740&pathrev=174741
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/NormalizeAlgorithm.cpp?r1=174741&r2=174740&pathrev=174741
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoAlgorithmParams.h?r1=174741&r2=174740&pathrev=174741
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/RsaKeyAlgorithm.h?r1=174741&r2=174740&pathrev=174741
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/exported/WebCryptoAlgorithm.cpp?r1=174741&r2=174740&pathrev=174741
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCryptoKeyAlgorithm.h?r1=174741&r2=174740&pathrev=174741
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/SerializedScriptValue.cpp?r1=174741&r2=174740&pathrev=174741
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/KeyAlgorithm.cpp?r1=174741&r2=174740&pathrev=174741

[webcrypto] Remove RSA-ES support (3 of 3)

  * RSA-ES keys that were previously serialized via structured clone will not be readable after this change. Since WebCrypto is behind an experimental flag this breakage is acceptable.

 * Removes some related code. Parameters for generating and importing RSA keys had the notion of being hashed or not. With RSA-ES gone, all of the RSA keys enumerated by the spec are "hashed" (rsa-ssa, rsa-oaep, rsa-pss) so this distinction isn't necessary.

BUG=372920, 245025
R=jochen@chromium.org, jsbell@chromium.org, jww@chromium.org

Review URL: https://codereview.chromium.org/284973002
-----------------------------------------------------------------
Project Member Comment 251 by bugdroid1@chromium.org, May 27 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/373f4acfdfeb75696083256f5073bbc5088591df

commit 373f4acfdfeb75696083256f5073bbc5088591df
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Tue May 27 23:35:51 2014

[webcrypto] Enable wrap/unwrap for SPKI and PKCS8.

(Does not yet address AES-KW, which is currently only exposed for wrapping/unwrapping of 'raw' format).

BUG=373555,245025

Review URL: https://codereview.chromium.org/299843014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273071 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 252 by bugdroid1@chromium.org, May 27 2014
------------------------------------------------------------------
r273071 | eroman@chromium.org | 2014-05-27T23:35:51.085556Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=273071&r2=273070&pathrev=273071
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=273071&r2=273070&pathrev=273071

[webcrypto] Enable wrap/unwrap for SPKI and PKCS8.

(Does not yet address AES-KW, which is currently only exposed for wrapping/unwrapping of 'raw' format).

BUG=373555,245025

Review URL: https://codereview.chromium.org/299843014
-----------------------------------------------------------------
Project Member Comment 253 by bugdroid1@chromium.org, May 30 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/19853497f848c5295daa8946a82fc565b5db54ea

commit 19853497f848c5295daa8946a82fc565b5db54ea
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Fri May 30 10:25:34 2014

[webcrypto] Order JWK's key_ops the same way as Key.usages.

BUG=378050,245025

Review URL: https://codereview.chromium.org/294393009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273787 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 254 by bugdroid1@chromium.org, May 30 2014
------------------------------------------------------------------
r273787 | eroman@chromium.org | 2014-05-30T10:25:34.696154Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=273787&r2=273786&pathrev=273787

[webcrypto] Order JWK's key_ops the same way as Key.usages.

BUG=378050,245025

Review URL: https://codereview.chromium.org/294393009
-----------------------------------------------------------------
Project Member Comment 255 by bugdroid1@chromium.org, Jun 3 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aee9f1fc961299f6b6d940bef0398f437717d51d

commit aee9f1fc961299f6b6d940bef0398f437717d51d
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Tue Jun 03 10:45:50 2014

[webcrypto] Don't fail JWK import if key_ops contains an unrecognized value.

BUG=378084,245025

Review URL: https://codereview.chromium.org/308183003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274465 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 256 by bugdroid1@chromium.org, Jun 3 2014
------------------------------------------------------------------
r274465 | eroman@chromium.org | 2014-06-03T10:45:50.513811Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=274465&r2=274464&pathrev=274465
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_util.cc?r1=274465&r2=274464&pathrev=274465

[webcrypto] Don't fail JWK import if key_ops contains an unrecognized value.

BUG=378084,245025

Review URL: https://codereview.chromium.org/308183003
-----------------------------------------------------------------
Project Member Comment 257 by bugdroid1@chromium.org, Jun 7 2014
------------------------------------------------------------------
r275589 | eroman@chromium.org | 2014-06-07T02:06:36.352463Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/nss/nss/exports_win.def?r1=275589&r2=275588&pathrev=275589

Add PK11_MakeIDFromPubKey to windows exports

BUG=378315,245025

Review URL: https://codereview.chromium.org/320603003
-----------------------------------------------------------------
Project Member Comment 258 by bugdroid1@chromium.org, Jun 7 2014
------------------------------------------------------------------
r275664 | eroman@chromium.org | 2014-06-07T09:04:50.354660Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/DEPS?r1=275664&r2=275663&pathrev=275664

Roll NSS from 275286 to 275589.

Picks up a single change:
r275589 - Add PK11_MakeIDFromPubKey to windows exports

BUG=378315, 245025

Review URL: https://codereview.chromium.org/321643002
-----------------------------------------------------------------
Project Member Comment 259 by bugdroid1@chromium.org, Jun 7 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d0e0c56642126f4014cddf7dfce8c39ab45f9761

commit d0e0c56642126f4014cddf7dfce8c39ab45f9761
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Sat Jun 07 09:04:50 2014

Roll NSS from 275286 to 275589.

Picks up a single change:
r275589 - Add PK11_MakeIDFromPubKey to windows exports

BUG=378315, 245025

Review URL: https://codereview.chromium.org/321643002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275664 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 260 by bugdroid1@chromium.org, Jun 9 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/86ee591acb7a0aa8d0d8bc6bb4dd163d8ac5e203

commit 86ee591acb7a0aa8d0d8bc6bb4dd163d8ac5e203
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Mon Jun 09 22:52:59 2014

[webcrypto] Fix a bug with JWK private key import.

The bug would return the oldest live private key imported via JWK rather than the expected one.

BUG=378315,245025

Review URL: https://codereview.chromium.org/308523003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275870 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 261 by bugdroid1@chromium.org, Jun 9 2014
------------------------------------------------------------------
r275870 | eroman@chromium.org | 2014-06-09T22:52:59.646523Z

Changed paths:
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/webcrypto/rsa_private_keys.json?r1=275870&r2=275869&pathrev=275870
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=275870&r2=275869&pathrev=275870
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=275870&r2=275869&pathrev=275870

[webcrypto] Fix a bug with JWK private key import.

The bug would return the oldest live private key imported via JWK rather than the expected one.

BUG=378315,245025

Review URL: https://codereview.chromium.org/308523003
-----------------------------------------------------------------
Project Member Comment 262 by bugdroid1@chromium.org, Jun 9 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=175833

------------------------------------------------------------------
r175833 | eroman@chromium.org | 2014-06-09T23:10:12.816934Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/common.js?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-kw-key-manipulation.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-generate-key.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-export-private-key-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/import-jwk-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-export-key.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-kw-wrap-unwrap-aes.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-wrong-key-class.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/array-buffer-view-offset.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/hmac-import-jwk-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-sign-verify.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-wrap-rsa-non-extractable-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/hmac-export-key-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-wrap-rsa.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-import-jwk-small-key-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-export-key.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-unwrap-failure.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-import-jwk-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/hmac-generate-key-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-export-private-key.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/import-jwk.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/jwk-import-use-values-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-unwrap-rsa-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-import-jwk-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/hmac-import-jwk.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-invalid-length-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-generate-key-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-wrap-rsa-non-extractable.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/jwk-export-use-values-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/hmac-export-key.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-import-jwk-small-key.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-indexeddb-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-import-jwk.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-generate-key-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-kw-key-manipulation-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/hmac-generate-key.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-export-key-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-kw-wrap-unwrap-aes-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-unwrap-rsa.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/jwk-import-use-values.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-wrong-key-class-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/array-buffer-view-offset-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-sign-verify-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-import-jwk.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-invalid-length.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-generate-key.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-wrap-rsa-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/jwk-export-use-values.html?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-export-key-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-unwrap-failure-expected.txt?r1=175833&r2=175832&pathrev=175833
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-indexeddb.html?r1=175833&r2=175832&pathrev=175833

[webcrypto] Import WebKit's webcrypto LayoutTests.

Some modifications necessary to account for differences in version of the spec and implementation.

BUG=377941,245025

Review URL: https://codereview.chromium.org/298023002
-----------------------------------------------------------------
Project Member Comment 263 by bugdroid1@chromium.org, Jun 10 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=175916

------------------------------------------------------------------
r175916 | eroman@chromium.org | 2014-06-10T20:30:20.339412Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=175916&r2=175915&pathrev=175916
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/weborigin/SecurityOrigin.cpp?r1=175916&r2=175915&pathrev=175916
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/weborigin/SecurityOriginTest.cpp?r1=175916&r2=175915&pathrev=175916
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/weborigin/SecurityOrigin.h?r1=175916&r2=175915&pathrev=175916
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/DEPS?r1=175916&r2=175915&pathrev=175916

[webcrypto] Only allow crypto.subtle.* to be used from "secure origins".

The meaning of a secure origin is defined by:
http://www.chromium.org/Home/chromium-security/security-faq#TOC-Which-origins-are-secure-

In essence, "secure origins" are those that load resources either from the local machine or over the network from a cryptographically-authenticated server.

For example these are considered secure origins:
  * chrome-extension://xxx
  * https://xxx
  * wss://xxx
  * file://xxx
  * http://localhost/
  * http://127.0.0.1/

Whereas these are considered insecure:
  * http://foobar
  * ws://foobar

crypto.subtle itself is visible from insecure origins. However all of its methods will fail by returning a rejected Promise for NotSupportedError.

BUG=373032, 245025, 362214

Review URL: https://codereview.chromium.org/299253003
-----------------------------------------------------------------
Project Member Comment 264 by bugdroid1@chromium.org, Jun 12 2014
------------------------------------------------------------------
r276658 | eroman@chromium.org | 2014-06-12T13:21:50.806769Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.cc?r1=276658&r2=276657&pathrev=276658
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=276658&r2=276657&pathrev=276658
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.h?r1=276658&r2=276657&pathrev=276658
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto.h?r1=276658&r2=276657&pathrev=276658
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=276658&r2=276657&pathrev=276658
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=276658&r2=276657&pathrev=276658
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=276658&r2=276657&pathrev=276658

[webcrypto] Restrict public exponent for RSA key generation to 3 or 65537.

OpenSSL can hang when given invalid values for the public exponent so do a whitelist validation approach to avoid this.

For compatibility reasons the same restriction is applied to the NSS implementation.

BUG=381844,245025

Review URL: https://codereview.chromium.org/329673002
-----------------------------------------------------------------
Project Member Comment 265 by bugdroid1@chromium.org, Jun 12 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c360f83ba48be15ba2bed984c306948e68822bb8

commit c360f83ba48be15ba2bed984c306948e68822bb8
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Thu Jun 12 13:21:50 2014

[webcrypto] Restrict public exponent for RSA key generation to 3 or 65537.

OpenSSL can hang when given invalid values for the public exponent so do a whitelist validation approach to avoid this.

For compatibility reasons the same restriction is applied to the NSS implementation.

BUG=381844,245025

Review URL: https://codereview.chromium.org/329673002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276658 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 266 by bugdroid1@chromium.org, Jun 12 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=176062

------------------------------------------------------------------
r176062 | eroman@chromium.org | 2014-06-12T23:44:37.115229Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-plaintext-length.html?r1=176062&r2=176061&pathrev=176062
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-wrap-unwrap-aes.html?r1=176062&r2=176061&pathrev=176062
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=176062&r2=176061&pathrev=176062
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-generate-non-extractable-key-expected.txt?r1=176062&r2=176061&pathrev=176062
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-key-manipulation-expected.txt?r1=176062&r2=176061&pathrev=176062
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-plaintext-length-expected.txt?r1=176062&r2=176061&pathrev=176062
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-wrap-unwrap-aes-expected.txt?r1=176062&r2=176061&pathrev=176062
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-generate-non-extractable-key.html?r1=176062&r2=176061&pathrev=176062
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-key-manipulation.html?r1=176062&r2=176061&pathrev=176062

Import WebKit RSA-OAEP LayoutTests.

BUG=377941,245025

Review URL: https://codereview.chromium.org/310513004
-----------------------------------------------------------------
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=176066

------------------------------------------------------------------
r176066 | eroman@chromium.org | 2014-06-13T00:23:17.407873Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-import-jwk-expected.txt?r1=176066&r2=176065&pathrev=176066
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-generateKey.html?r1=176066&r2=176065&pathrev=176066
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-export-key.html?r1=176066&r2=176065&pathrev=176066
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/subtle-crypto-concurrent.js?r1=176066&r2=176065&pathrev=176066
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-aesKey.html?r1=176066&r2=176065&pathrev=176066
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-gcm-encrypt-decrypt-expected.txt?r1=176066&r2=176065&pathrev=176066
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-kw-wrapKey-unwrapKey-raw.html?r1=176066&r2=176065&pathrev=176066
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-generateKey-expected.txt?r1=176066&r2=176065&pathrev=176066
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-export-key-expected.txt?r1=176066&r2=176065&pathrev=176066
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-encrypt-decrypt.html?r1=176066&r2=176065&pathrev=176066
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/clone-aesKey-expected.txt?r1=176066&r2=176065&pathrev=176066
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/jwk-import-use-values.html?r1=176066&r2=176065&pathrev=176066
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-kw-wrapKey-unwrapKey-raw-expected.txt?r1=176066&r2=176065&pathrev=176066
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-import-jwk.html?r1=176066&r2=176065&pathrev=176066
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-encrypt-decrypt-expected.txt?r1=176066&r2=176065&pathrev=176066
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/jwk-export-use-values.html?r1=176066&r2=176065&pathrev=176066
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-gcm-encrypt-decrypt.html?r1=176066&r2=176065&pathrev=176066

[webcrypto] Remove support for AES 192-bit keys (1 of 2)

Removes uses of 192-bit AES keys from the LayoutTests. Since once the corresponding Chromium change lands they will no longer work.

BUG=381829

Review URL: https://codereview.chromium.org/325323004
-----------------------------------------------------------------
Project Member Comment 268 by bugdroid1@chromium.org, Jun 13 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/30a7b12816c6adec48d03f7f022a6f8658f235d0

commit 30a7b12816c6adec48d03f7f022a6f8658f235d0
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Fri Jun 13 02:31:09 2014

[webcrypto] Remove a special case for AES-KW wrapping/unwrapping.

Now the same export+encrypt / decrypt+import codepath is used as for other wrapping algorithms.

The new code is less efficient (creates a temporary raw key), however simplifies things, and allows wrapping to be done on non-raw keys (however because of size constraints is likely to fail).

BUG=373544,245025

Review URL: https://codereview.chromium.org/335463002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276890 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 269 by bugdroid1@chromium.org, Jun 13 2014
------------------------------------------------------------------
r276890 | eroman@chromium.org | 2014-06-13T02:31:09.548374Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto.h?r1=276890&r2=276889&pathrev=276890
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=276890&r2=276889&pathrev=276890
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_nss.cc?r1=276890&r2=276889&pathrev=276890
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/platform_crypto_openssl.cc?r1=276890&r2=276889&pathrev=276890

[webcrypto] Remove a special case for AES-KW wrapping/unwrapping.

Now the same export+encrypt / decrypt+import codepath is used as for other wrapping algorithms.

The new code is less efficient (creates a temporary raw key), however simplifies things, and allows wrapping to be done on non-raw keys (however because of size constraints is likely to fail).

BUG=373544,245025

Review URL: https://codereview.chromium.org/335463002
-----------------------------------------------------------------
Project Member Comment 270 by bugdroid1@chromium.org, Jun 13 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b05ba93318bdb67205d51d7731ce2c487287e809

commit b05ba93318bdb67205d51d7731ce2c487287e809
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Fri Jun 13 08:49:15 2014

[webcrypto] Remove support for AES 192-bit keys (2 of 2)

BUG=381829, 245025

Review URL: https://codereview.chromium.org/328903003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276979 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 271 by bugdroid1@chromium.org, Jun 13 2014
------------------------------------------------------------------
r276979 | eroman@chromium.org | 2014-06-13T08:49:15.068460Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/webcrypto/aes_kw.json?r1=276979&r2=276978&pathrev=276979
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.cc?r1=276979&r2=276978&pathrev=276979
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto_unittest.cc?r1=276979&r2=276978&pathrev=276979
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/status.h?r1=276979&r2=276978&pathrev=276979
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/shared_crypto.cc?r1=276979&r2=276978&pathrev=276979
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/webcrypto/aes_gcm.json?r1=276979&r2=276978&pathrev=276979

[webcrypto] Remove support for AES 192-bit keys (2 of 2)

BUG=381829, 245025

Review URL: https://codereview.chromium.org/328903003
-----------------------------------------------------------------
Project Member Comment 272 by bugdroid1@chromium.org, Jun 14 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=176145

------------------------------------------------------------------
r176145 | eroman@chromium.org | 2014-06-14T01:33:10.726565Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-key-manipulation.html?r1=176145&r2=176144&pathrev=176145
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-generate-key-expected.txt?r1=176145&r2=176144&pathrev=176145
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent-expected.txt?r1=176145&r2=176144&pathrev=176145
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-generate-key.html?r1=176145&r2=176144&pathrev=176145
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html?r1=176145&r2=176144&pathrev=176145
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-generate-non-extractable-key-expected.txt?r1=176145&r2=176144&pathrev=176145
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-key-manipulation-expected.txt?r1=176145&r2=176144&pathrev=176145
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-generate-non-extractable-key.html?r1=176145&r2=176144&pathrev=176145

Speed up slow tests by reducing RSA modulus size (from 2048 --> 512).

BUG=384565,245025

Review URL: https://codereview.chromium.org/333063004
-----------------------------------------------------------------
Project Member Comment 273 by bugdroid1@chromium.org, Jun 16 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=176238

------------------------------------------------------------------
r176238 | eroman@chromium.org | 2014-06-16T20:26:35.023317Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-export-private-key.html?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/import-jwk.html?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/importKey-badParameters-expected.txt?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-indexeddb.html?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/hmac-import-jwk.html?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.idl?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-wrap-rsa-non-extractable.html?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/import-jwk-expected.txt?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/hmac-export-key.html?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-export-key.html?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-import-jwk-small-key.html?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-sign-verify.html?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsassa-pkcs1-v1_5-import-jwk.html?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.cpp?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-wrap-rsa.html?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/SubtleCrypto.h?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/jwk-import-use-values.html?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-export-key.html?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-key-manipulation.html?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-plaintext-length.html?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-wrap-unwrap-aes.html?r1=176238&r2=176237&pathrev=176238
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-cbc-import-jwk.html?r1=176238&r2=176237&pathrev=176238

[webcrypto] Require importKey() for JWK to provide data as a Javascript object rather than a JSON arraybuffer.

BUG=373917,245025

Review URL: https://codereview.chromium.org/336173002
-----------------------------------------------------------------
Project Member Comment 274 by bugdroid1@chromium.org, Jun 17 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b7deaa08d0df8e73a0351c00612afc8ec087d713

commit b7deaa08d0df8e73a0351c00612afc8ec087d713
Author: eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Tue Jun 17 22:24:37 2014

[webcrypto] exportKey() now returns dictionary when format='jwk' (CL 1 of 2).

Previously it would return an array buffer of the JSON.

This corresponds with the recent spec update:
https://dvcs.w3.org/hg/webcrypto-api/rev/f61017a76a5d

BUG=373917, 245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/334333004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277884 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 275 by bugdroid1@chromium.org, Jun 17 2014
------------------------------------------------------------------
r277884 | eroman@chromium.org | 2014-06-17T22:24:37.247155Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/webcrypto/webcrypto_impl.cc?r1=277884&r2=277883&pathrev=277884

[webcrypto] exportKey() now returns dictionary when format='jwk' (CL 1 of 2).

Previously it would return an array buffer of the JSON.

This corresponds with the recent spec update:
https://dvcs.w3.org/hg/webcrypto-api/rev/f61017a76a5d

BUG=373917, 245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/334333004
-----------------------------------------------------------------
Project Member Comment 276 by bugdroid1@chromium.org, Jun 17 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=176355

------------------------------------------------------------------
r176355 | eroman@chromium.org | 2014-06-17T22:32:14.866114Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=176355&r2=176354&pathrev=176355

[webcrypto] Mark WebCrypto RSA tests on Linux as flaky.

Change https://codereview.chromium.org/334983006/ makes RSA key import on Linux fail if the version of NSS is not recent enough (to avoid some ugly bugs).

Therefore such tests may either pass or fail, depending on the system installation.

TBR=jww
BUG=380424, 378315, 245025

Review URL: https://codereview.chromium.org/333273008
-----------------------------------------------------------------
Project Member Comment 277 by bugdroid1@chromium.org, Jun 18 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=176371

------------------------------------------------------------------
r176371 | eroman@chromium.org | 2014-06-18T01:10:39.785171Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/CryptoResult.h?r1=176371&r2=176370&pathrev=176371
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoResultImpl.cpp?r1=176371&r2=176370&pathrev=176371
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/exported/WebCryptoResult.cpp?r1=176371&r2=176370&pathrev=176371
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-export-key.html?r1=176371&r2=176370&pathrev=176371
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-oaep-key-manipulation.html?r1=176371&r2=176370&pathrev=176371
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/crypto/CryptoResultImpl.h?r1=176371&r2=176370&pathrev=176371
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/aes-export-key.html?r1=176371&r2=176370&pathrev=176371
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/hmac-export-key.html?r1=176371&r2=176370&pathrev=176371
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/jwk-export-use-values.html?r1=176371&r2=176370&pathrev=176371
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/rsa-export-private-key.html?r1=176371&r2=176370&pathrev=176371
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebCrypto.h?r1=176371&r2=176370&pathrev=176371

[webcrypto] exportKey() now returns a dictionary when format='jwk' (CL 2 of 2).

Previously it would return an array buffer of the JSON.

This corresponds with the recent spec update:
https://dvcs.w3.org/hg/webcrypto-api/rev/f61017a76a5d

BUG=373917,245025

Review URL: https://codereview.chromium.org/338993002
-----------------------------------------------------------------
Project Member Comment 278 by bugdroid1@chromium.org, Jun 18 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=176376

------------------------------------------------------------------
r176376 | eroman@chromium.org | 2014-06-18T01:49:46.364069Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/RuntimeEnabledFeatures.in?r1=176376&r2=176375&pathrev=176376

Enable WebCrypto by default.

BUG=245025, 379976

Review URL: https://codereview.chromium.org/336693003
-----------------------------------------------------------------
Project Member Comment 279 by bugdroid1@chromium.org, Jun 18 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=176389

------------------------------------------------------------------
r176389 | eroman@chromium.org | 2014-06-18T04:57:32.866408Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/crypto/resources/worker-infinite-loop-generateKey.js?r1=176389&r2=176388&pathrev=176389

[webcrypto] Remove a lingering usage of RSA-ES.

TBR=jww
BUG=372920,245025

Review URL: https://codereview.chromium.org/344503003
-----------------------------------------------------------------
Status: Fixed
WebCrypto is now enabled by default in Chromium [1], and will be present in M37 without a flag or prefixing [2]

Details on what the Chromium WebCrypto implementation supports and differences from the standard, are described in this document [3]

There is still work to be done for WebCrypto, such as adding more algorithms, incorporating last week's spec update, resolving bugs, and addressing feedback from users.

These issues will be tracked by new bugs under the "cr-blink-webcrypto" label. Please open new bugs for any WebCrypto issues rather than posting to this one, which I am now considering resolved.

If you are interested in following future work you can subscribe to the bug label using [4]

[1] http://crrev.com/278085 and 
[2] http://crbug.com/379976
[3] https://docs.google.com/a/chromium.org/document/d/184AgXzLAoUjQjrtNdbimceyXVYzrn3tGpf3xQGCN10g/edit
[4] https://code.google.com/p/chromium/issues/subscriptions
Sign in to add a comment