Title: [218744] trunk
Revision
218744
Author
[email protected]
Date
2017-06-23 05:03:11 -0700 (Fri, 23 Jun 2017)

Log Message

[GCrypt] Drop the AES-CFB support
https://bugs.webkit.org/show_bug.cgi?id=173547

Reviewed by Jiewen Tan.

Source/WebCore:

No new tests -- relevant test baselines are updated.

Stop registering the AES-CFB algorithm as something that's supported by
the libgcrypt implementation. This algorithm was previously included in
the Web Crypto API specification, but has since been dropped from it.

Conveniently, libgcrypt only recently gained support for the CFB8 AES
cipher mode that's required by the specification, meaning we could only
support this algorithm with future releases of the libgcrypt library.

* crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):

LayoutTests:

Add GTK+-specific baselines for AES tests that also cover the CFB variation.
These tests still pass because errors are expected, it's just that errors now
occur because the algorithm isn't supported anymore, rather than because of
operation errors due to malformed parameters.

* platform/gtk/crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters-expected.txt: Added.
* platform/gtk/crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters-expected.txt: Added.
* platform/gtk/crypto/subtle/aes-export-key-malformed-parameters-expected.txt: Added.
* platform/gtk/crypto/subtle/aes-generate-key-malformed-parameters-expected.txt: Added.
* platform/gtk/crypto/subtle/aes-import-key-malformed-parameters-expected.txt: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (218743 => 218744)


--- trunk/LayoutTests/ChangeLog	2017-06-23 12:03:10 UTC (rev 218743)
+++ trunk/LayoutTests/ChangeLog	2017-06-23 12:03:11 UTC (rev 218744)
@@ -1,3 +1,21 @@
+2017-06-23  Zan Dobersek  <[email protected]>
+
+        [GCrypt] Drop the AES-CFB support
+        https://bugs.webkit.org/show_bug.cgi?id=173547
+
+        Reviewed by Jiewen Tan.
+
+        Add GTK+-specific baselines for AES tests that also cover the CFB variation.
+        These tests still pass because errors are expected, it's just that errors now
+        occur because the algorithm isn't supported anymore, rather than because of
+        operation errors due to malformed parameters.
+
+        * platform/gtk/crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters-expected.txt: Added.
+        * platform/gtk/crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters-expected.txt: Added.
+        * platform/gtk/crypto/subtle/aes-export-key-malformed-parameters-expected.txt: Added.
+        * platform/gtk/crypto/subtle/aes-generate-key-malformed-parameters-expected.txt: Added.
+        * platform/gtk/crypto/subtle/aes-import-key-malformed-parameters-expected.txt: Added.
+
 2017-06-22  Antti Koivisto  <[email protected]>
 
         REGRESSION(r217695): Offscreen/overflowed items not being rendered while translating in-frame

Added: trunk/LayoutTests/platform/gtk/crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters-expected.txt (0 => 218744)


--- trunk/LayoutTests/platform/gtk/crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/gtk/crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters-expected.txt	2017-06-23 12:03:11 UTC (rev 218744)
@@ -0,0 +1,12 @@
+Test decrypting using AES-CBC/AES-CFB with malformed parameters
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS crypto.subtle.decrypt({name: "aes-cbc", iv: asciiToUint8Array("")}, key, cipherText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.decrypt({name: "aes-cbc", iv: asciiToUint8Array("j")}, key, cipherText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.decrypt({name: "aes-cbc", iv: asciiToUint8Array("jnOw99oOZFLIEPMrd")}, key, cipherText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/platform/gtk/crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters-expected.txt (0 => 218744)


--- trunk/LayoutTests/platform/gtk/crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/gtk/crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters-expected.txt	2017-06-23 12:03:11 UTC (rev 218744)
@@ -0,0 +1,21 @@
+Test encrypting using AES-CBC/AES-CFB with malformed parameters
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS crypto.subtle.encrypt("aes-cbc", key, plainText) rejected promise  with TypeError: Member AesCbcCfbParams.iv is required and must be an instance of BufferSource.
+PASS crypto.subtle.encrypt({name: "aes-cbc"}, key, plainText) rejected promise  with TypeError: Member AesCbcCfbParams.iv is required and must be an instance of BufferSource.
+PASS crypto.subtle.encrypt({name: "aes-cbc", iv: true}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: "aes-cbc", iv: 1}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: "aes-cbc", iv: null}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: "aes-cbc", iv: undefined}, key, plainText) rejected promise  with TypeError: Member AesCbcCfbParams.iv is required and must be an instance of BufferSource.
+PASS crypto.subtle.encrypt({name: "aes-cbc", iv: Symbol()}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: "aes-cbc", iv: { }}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: "aes-cbc", iv: "foo"}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: "aes-cbc", iv: asciiToUint8Array("")}, key, plainText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.encrypt({name: "aes-cbc", iv: asciiToUint8Array("j")}, key, plainText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.encrypt({name: "aes-cbc", iv: asciiToUint8Array("jnOw99oOZFLIEPMrd")}, key, plainText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/platform/gtk/crypto/subtle/aes-export-key-malformed-parameters-expected.txt (0 => 218744)


--- trunk/LayoutTests/platform/gtk/crypto/subtle/aes-export-key-malformed-parameters-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/gtk/crypto/subtle/aes-export-key-malformed-parameters-expected.txt	2017-06-23 12:03:11 UTC (rev 218744)
@@ -0,0 +1,13 @@
+Test exporting an AES key with malformed parameters
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS crypto.subtle.exportKey("spki", key) rejected promise  with NotSupportedError (DOM Exception 9): The algorithm is not supported.
+PASS crypto.subtle.exportKey("pkcs8", key) rejected promise  with NotSupportedError (DOM Exception 9): The algorithm is not supported.
+PASS crypto.subtle.exportKey("spki", key) rejected promise  with NotSupportedError (DOM Exception 9): The algorithm is not supported.
+PASS crypto.subtle.exportKey("pkcs8", key) rejected promise  with NotSupportedError (DOM Exception 9): The algorithm is not supported.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/platform/gtk/crypto/subtle/aes-generate-key-malformed-parameters-expected.txt (0 => 218744)


--- trunk/LayoutTests/platform/gtk/crypto/subtle/aes-generate-key-malformed-parameters-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/gtk/crypto/subtle/aes-generate-key-malformed-parameters-expected.txt	2017-06-23 12:03:11 UTC (rev 218744)
@@ -0,0 +1,41 @@
+Test generating an AES key with malformed-paramters.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS crypto.subtle.generateKey("aes-cbc", extractable, ["encrypt", "decrypt"]) rejected promise  with TypeError: Member AesKeyParams.length is required and must be an instance of unsigned short.
+PASS crypto.subtle.generateKey({name: "aes-cbc"}, extractable, ["encrypt", "decrypt"]) rejected promise  with TypeError: Member AesKeyParams.length is required and must be an instance of unsigned short.
+PASS crypto.subtle.generateKey({name: "aes-cbc", length: true}, extractable, ["encrypt", "decrypt"]) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.generateKey({name: "aes-cbc", length: null}, extractable, ["encrypt", "decrypt"]) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.generateKey({name: "aes-cbc", length: undefined}, extractable, ["encrypt", "decrypt"]) rejected promise  with TypeError: Member AesKeyParams.length is required and must be an instance of unsigned short.
+PASS crypto.subtle.generateKey({name: "aes-cbc", length: Symbol()}, extractable, ["encrypt", "decrypt"]) rejected promise  with TypeError: Cannot convert a symbol to a number.
+PASS crypto.subtle.generateKey({name: "aes-cbc", length: { }}, extractable, ["encrypt", "decrypt"]) rejected promise  with TypeError: Value NaN is outside the range [0, 65535].
+PASS crypto.subtle.generateKey({name: "aes-cbc", length: "foo"}, extractable, ["encrypt", "decrypt"]) rejected promise  with TypeError: Value NaN is outside the range [0, 65535].
+PASS crypto.subtle.generateKey({name: "aes-cbc", length: 128}, extractable, ["sign"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-cbc", length: 128}, extractable, ["verify"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-cbc", length: 128}, extractable, ["deriveKey"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-cbc", length: 128}, extractable, ["deriveBits"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-kw", length: 128}, extractable, ["encrypt"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-kw", length: 128}, extractable, ["decrypt"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-kw", length: 128}, extractable, ["sign"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-kw", length: 128}, extractable, ["verify"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-kw", length: 128}, extractable, ["deriveKey"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-kw", length: 128}, extractable, ["deriveBits"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-cfb-8", length: 128}, extractable, ["sign"]) rejected promise  with NotSupportedError (DOM Exception 9): The operation is not supported..
+PASS crypto.subtle.generateKey({name: "aes-cfb-8", length: 128}, extractable, ["verify"]) rejected promise  with NotSupportedError (DOM Exception 9): The operation is not supported..
+PASS crypto.subtle.generateKey({name: "aes-cfb-8", length: 128}, extractable, ["deriveKey"]) rejected promise  with NotSupportedError (DOM Exception 9): The operation is not supported..
+PASS crypto.subtle.generateKey({name: "aes-cfb-8", length: 128}, extractable, ["deriveBits"]) rejected promise  with NotSupportedError (DOM Exception 9): The operation is not supported..
+PASS crypto.subtle.generateKey({name: "aes-gcm", length: 128}, extractable, ["sign"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-gcm", length: 128}, extractable, ["verify"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-gcm", length: 128}, extractable, ["deriveKey"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-gcm", length: 128}, extractable, ["deriveBits"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-ctr", length: 128}, extractable, ["sign"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-ctr", length: 128}, extractable, ["verify"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-ctr", length: 128}, extractable, ["deriveKey"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-ctr", length: 128}, extractable, ["deriveBits"]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "aes-cbc", length: 111}, extractable, ["encrypt"]) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.generateKey({name: "aes-kw", length: 111}, extractable, ["wrapKey"]) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/platform/gtk/crypto/subtle/aes-import-key-malformed-parameters-expected.txt (0 => 218744)


--- trunk/LayoutTests/platform/gtk/crypto/subtle/aes-import-key-malformed-parameters-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/gtk/crypto/subtle/aes-import-key-malformed-parameters-expected.txt	2017-06-23 12:03:11 UTC (rev 218744)
@@ -0,0 +1,54 @@
+Test importing an AES key with malformed parameters
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS crypto.subtle.importKey("raw", asciiToUint8Array("jnOw97"), "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "RSA"}, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct"}, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k128, alg: "A192CBC"}, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k192, alg: "A256CBC"}, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k256, alg: "A128CBC"}, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: "A72F", alg: "foo"}, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k128, alg: ""}, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k192, alg: ""}, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k256, alg: ""}, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k128, alg: "A192KW"}, "aes-kw", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k192, alg: "A256KW"}, "aes-kw", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k256, alg: "A128KW"}, "aes-kw", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: "A72F", alg: "foo"}, "aes-kw", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k128, alg: ""}, "aes-kw", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k192, alg: ""}, "aes-kw", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k256, alg: ""}, "aes-kw", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k128, alg: "A192CFB8"}, "aes-cfb-8", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with NotSupportedError (DOM Exception 9): The operation is not supported..
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k192, alg: "A256CFB8"}, "aes-cfb-8", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with NotSupportedError (DOM Exception 9): The operation is not supported..
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k256, alg: "A128CFB8"}, "aes-cfb-8", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with NotSupportedError (DOM Exception 9): The operation is not supported..
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: "A72F", alg: "foo"}, "aes-cfb-8", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with NotSupportedError (DOM Exception 9): The operation is not supported..
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k128, alg: ""}, "aes-cfb-8", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with NotSupportedError (DOM Exception 9): The operation is not supported..
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k192, alg: ""}, "aes-cfb-8", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with NotSupportedError (DOM Exception 9): The operation is not supported..
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k256, alg: ""}, "aes-cfb-8", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with NotSupportedError (DOM Exception 9): The operation is not supported..
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k128, alg: "A192GCM"}, "aes-gcm", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k192, alg: "A256GCM"}, "aes-gcm", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k256, alg: "A128GCM"}, "aes-gcm", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: "A72F", alg: "foo"}, "aes-gcm", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k128, alg: ""}, "aes-gcm", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k192, alg: ""}, "aes-gcm", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k256, alg: ""}, "aes-gcm", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k128, alg: "A192CTR"}, "aes-ctr", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k192, alg: "A256CTR"}, "aes-ctr", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k256, alg: "A128CTR"}, "aes-ctr", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: "A72F", alg: "foo"}, "aes-ctr", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k128, alg: ""}, "aes-ctr", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k192, alg: ""}, "aes-ctr", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k256, alg: ""}, "aes-ctr", extractable, ["wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: "!!!", alg: "foo"}, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: "", alg: "foo"}, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k128, alg: "A128CBC", use: "sig"}, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k128, alg: "A128CBC", use: ""}, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k128, alg: "A128CBC", key_ops: ["encrypt", "decrypt"]}, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k128, alg: "A128CBC", key_ops: [ ]}, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey("jwk", {kty: "oct", k: k128, alg: "A128CBC", ext: false}, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Modified: trunk/Source/WebCore/ChangeLog (218743 => 218744)


--- trunk/Source/WebCore/ChangeLog	2017-06-23 12:03:10 UTC (rev 218743)
+++ trunk/Source/WebCore/ChangeLog	2017-06-23 12:03:11 UTC (rev 218744)
@@ -1,3 +1,23 @@
+2017-06-23  Zan Dobersek  <[email protected]>
+
+        [GCrypt] Drop the AES-CFB support
+        https://bugs.webkit.org/show_bug.cgi?id=173547
+
+        Reviewed by Jiewen Tan.
+
+        No new tests -- relevant test baselines are updated.
+
+        Stop registering the AES-CFB algorithm as something that's supported by
+        the libgcrypt implementation. This algorithm was previously included in
+        the Web Crypto API specification, but has since been dropped from it.
+
+        Conveniently, libgcrypt only recently gained support for the CFB8 AES
+        cipher mode that's required by the specification, meaning we could only
+        support this algorithm with future releases of the libgcrypt library.
+
+        * crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp:
+        (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
+
 2017-06-23  Carlos Garcia Campos  <[email protected]>
 
         [WPE] Enable PUBLIC_SUFFIX_LIST

Modified: trunk/Source/WebCore/crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp (218743 => 218744)


--- trunk/Source/WebCore/crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp	2017-06-23 12:03:10 UTC (rev 218743)
+++ trunk/Source/WebCore/crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp	2017-06-23 12:03:11 UTC (rev 218744)
@@ -29,7 +29,6 @@
 #if ENABLE(SUBTLE_CRYPTO)
 
 #include "CryptoAlgorithmAES_CBC.h"
-#include "CryptoAlgorithmAES_CFB.h"
 #include "CryptoAlgorithmAES_CTR.h"
 #include "CryptoAlgorithmAES_GCM.h"
 #include "CryptoAlgorithmAES_KW.h"
@@ -53,7 +52,6 @@
 void CryptoAlgorithmRegistry::platformRegisterAlgorithms()
 {
     registerAlgorithm<CryptoAlgorithmAES_CBC>();
-    registerAlgorithm<CryptoAlgorithmAES_CFB>();
     registerAlgorithm<CryptoAlgorithmAES_CTR>();
     registerAlgorithm<CryptoAlgorithmAES_GCM>();
     registerAlgorithm<CryptoAlgorithmAES_KW>();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to