Changeset 208891 in webkit
- Timestamp:
- Nov 18, 2016 1:31:42 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 24 added
- 43 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r208889 r208891 1 2016-11-17 Jiewen Tan <jiewen_tan@apple.com> 2 3 Update SubtleCrypto::encrypt to match the latest spec 4 https://bugs.webkit.org/show_bug.cgi?id=164738 5 <rdar://problem/29257812> 6 7 Reviewed by Brent Fulgham. 8 9 * TestExpectations: 10 * crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt: Added. 11 * crypto/subtle/aes-cbc-encrypt-malformed-parameters.html: Added. 12 * crypto/subtle/aes-cbc-import-key-encrypt-expected.txt: Added. 13 * crypto/subtle/aes-cbc-import-key-encrypt.html: Added. 14 * crypto/subtle/encrypt-malformed-parameters-expected.txt: Added. 15 * crypto/subtle/encrypt-malformed-parameters.html: Added. 16 * crypto/subtle/rsa-oaep-encrypt-malformed-parameters-expected.txt: Added. 17 * crypto/subtle/rsa-oaep-encrypt-malformed-parameters.html: Added. 18 * crypto/subtle/rsa-oaep-import-key-encrypt-expected.txt: Added. 19 * crypto/subtle/rsa-oaep-import-key-encrypt-label-expected.txt: Added. 20 * crypto/subtle/rsa-oaep-import-key-encrypt-label.html: Added. 21 * crypto/subtle/rsa-oaep-import-key-encrypt.html: Added. 22 * crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt: Added. 23 * crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html: Added. 24 * crypto/workers/subtle/aes-cbc-import-key-encrypt-expected.txt: Added. 25 * crypto/workers/subtle/aes-cbc-import-key-encrypt.html: Added. 26 * crypto/workers/subtle/resources/aes-cbc-import-key-encrypt.js: Added. 27 * crypto/workers/subtle/resources/rsa-oaep-import-key-encrypt.js: Added. 28 * crypto/workers/subtle/resources/rsaes-pkcs1-v1_5-import-key-encrypt.js: Added. 29 * crypto/workers/subtle/rsa-oaep-import-key-encrypt-expected.txt: Added. 30 * crypto/workers/subtle/rsa-oaep-import-key-encrypt.html: Added. 31 * crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt: Added. 32 * crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html: Added. 33 1 34 2016-11-18 Myles C. Maxfield <mmaxfield@apple.com> 2 35 -
trunk/LayoutTests/TestExpectations
r208859 r208891 920 920 workers/bomb-with-v8.html [ Skip ] 921 921 922 # WebCryptoAPI tests, skip for unimplemented features. webkit.org/b/159638 923 imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_cbc.html [ Skip ] 924 imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_ctr.html [ Skip ] 925 imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_gcm.html [ Skip ] 926 imported/w3c/WebCryptoAPI/encrypt_decrypt/test_rsa_oaep.html [ Skip ] 927 # Take too long to complete, need to scale down. 922 # WebCryptoAPI tests that take too long to complete, need to scale down. webkit.org/b/159638 928 923 imported/w3c/WebCryptoAPI/generateKey/test_failures.html [ Slow ] 929 924 imported/w3c/WebCryptoAPI/generateKey/test_successes_RSA-OAEP.html [ Skip ] -
trunk/LayoutTests/imported/w3c/ChangeLog
r208872 r208891 1 2016-11-17 Jiewen Tan <jiewen_tan@apple.com> 2 3 Update SubtleCrypto::encrypt to match the latest spec 4 https://bugs.webkit.org/show_bug.cgi?id=164738 5 <rdar://problem/29257812> 6 7 Reviewed by Brent Fulgham. 8 9 * WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt: 10 * WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt: 11 * WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt: 12 * WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt: 13 * WebCryptoAPI/idlharness-expected.txt: 14 1 15 2016-11-17 Alex Christensen <achristensen@webkit.org> 2 16 -
trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt
r203201 r208891 1 CONSOLE MESSAGE: line 285: TypeError: undefined is not an object (evaluating 'subtle.importKey') 2 FAIL: Timed out waiting for notifyDone to be called 1 encrypt Tests for AES-CBC 3 2 3 4 PASS AES-CBC 128-bit key 5 PASS AES-CBC 192-bit key 6 PASS AES-CBC 256-bit key 7 PASS AES-CBC 128-bit key with altered plaintext 8 PASS AES-CBC 192-bit key with altered plaintext 9 PASS AES-CBC 256-bit key with altered plaintext 10 FAIL AES-CBC 128-bit key decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 11 FAIL AES-CBC 192-bit key decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 12 FAIL AES-CBC 256-bit key decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 13 FAIL AES-CBC 128-bit key decryption with altered ciphertext subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, ciphertext)', 'subtle.decrypt' is undefined) 14 FAIL AES-CBC 192-bit key decryption with altered ciphertext subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, ciphertext)', 'subtle.decrypt' is undefined) 15 FAIL AES-CBC 256-bit key decryption with altered ciphertext subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, ciphertext)', 'subtle.decrypt' is undefined) 16 PASS AES-CBC 128-bit key without encrypt usage 17 PASS AES-CBC 192-bit key without encrypt usage 18 PASS AES-CBC 256-bit key without encrypt usage 19 FAIL AES-CBC 128-bit key with mismatched key and algorithm assert_equals: Mismatch should cause InvalidAccessError instead of The operation is not supported. expected "InvalidAccessError" but got "NotSupportedError" 20 FAIL AES-CBC 192-bit key with mismatched key and algorithm assert_equals: Mismatch should cause InvalidAccessError instead of The operation is not supported. expected "InvalidAccessError" but got "NotSupportedError" 21 FAIL AES-CBC 256-bit key with mismatched key and algorithm assert_equals: Mismatch should cause InvalidAccessError instead of The operation is not supported. expected "InvalidAccessError" but got "NotSupportedError" 22 FAIL AES-CBC 128-bit key without decrypt usage subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 23 FAIL AES-CBC 192-bit key without decrypt usage subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 24 FAIL AES-CBC 256-bit key without decrypt usage subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 25 PASS AES-CBC 128-bit key, 64-bit IV 26 PASS AES-CBC 128-bit key, 192-bit IV 27 PASS AES-CBC 192-bit key, 64-bit IV 28 PASS AES-CBC 192-bit key, 192-bit IV 29 PASS AES-CBC 256-bit key, 64-bit IV 30 PASS AES-CBC 256-bit key, 192-bit IV 31 FAIL AES-CBC 128-bit key, 64-bit IV decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 32 FAIL AES-CBC 128-bit key, 192-bit IV decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 33 FAIL AES-CBC 192-bit key, 64-bit IV decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 34 FAIL AES-CBC 192-bit key, 192-bit IV decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 35 FAIL AES-CBC 256-bit key, 64-bit IV decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 36 FAIL AES-CBC 256-bit key, 192-bit IV decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 37 FAIL AES-CBC 128-bit key, zeroPadChar subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 38 FAIL AES-CBC 128-bit key, bigPadChar subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 39 FAIL AES-CBC 128-bit key, inconsistentPadChars subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 40 FAIL AES-CBC 192-bit key, zeroPadChar subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 41 FAIL AES-CBC 192-bit key, bigPadChar subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 42 FAIL AES-CBC 192-bit key, inconsistentPadChars subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 43 FAIL AES-CBC 256-bit key, zeroPadChar subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 44 FAIL AES-CBC 256-bit key, bigPadChar subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 45 FAIL AES-CBC 256-bit key, inconsistentPadChars subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined) 46 -
trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt
r203201 r208891 1 CONSOLE MESSAGE: line 285: TypeError: undefined is not an object (evaluating 'subtle.importKey') 2 FAIL: Timed out waiting for notifyDone to be called 1 encrypt Tests for AES-CTR 3 2 3 4 FAIL importKey step: AES-CTR 128-bit key assert_unreached: importKey failed for AES-CTR 128-bit key Reached unreachable code 5 FAIL importKey step: AES-CTR 192-bit key assert_unreached: importKey failed for AES-CTR 192-bit key Reached unreachable code 6 FAIL importKey step: AES-CTR 256-bit key assert_unreached: importKey failed for AES-CTR 256-bit key Reached unreachable code 7 FAIL importKey step: AES-CTR 128-bit key with altered plaintext assert_unreached: importKey failed for AES-CTR 128-bit key Reached unreachable code 8 FAIL importKey step: AES-CTR 192-bit key with altered plaintext assert_unreached: importKey failed for AES-CTR 192-bit key Reached unreachable code 9 FAIL importKey step: AES-CTR 256-bit key with altered plaintext assert_unreached: importKey failed for AES-CTR 256-bit key Reached unreachable code 10 FAIL importKey step for decryption: AES-CTR 128-bit key assert_unreached: importKey failed for AES-CTR 128-bit key Reached unreachable code 11 FAIL importKey step for decryption: AES-CTR 192-bit key assert_unreached: importKey failed for AES-CTR 192-bit key Reached unreachable code 12 FAIL importKey step for decryption: AES-CTR 256-bit key assert_unreached: importKey failed for AES-CTR 256-bit key Reached unreachable code 13 FAIL importKey step for decryption: AES-CTR 128-bit key with altered ciphertext assert_unreached: importKey failed for AES-CTR 128-bit key Reached unreachable code 14 FAIL importKey step for decryption: AES-CTR 192-bit key with altered ciphertext assert_unreached: importKey failed for AES-CTR 192-bit key Reached unreachable code 15 FAIL importKey step for decryption: AES-CTR 256-bit key with altered ciphertext assert_unreached: importKey failed for AES-CTR 256-bit key Reached unreachable code 16 FAIL importKey step: AES-CTR 128-bit key without encrypt usage assert_unreached: importKey failed for AES-CTR 128-bit key Reached unreachable code 17 FAIL importKey step: AES-CTR 192-bit key without encrypt usage assert_unreached: importKey failed for AES-CTR 192-bit key Reached unreachable code 18 FAIL importKey step: AES-CTR 256-bit key without encrypt usage assert_unreached: importKey failed for AES-CTR 256-bit key Reached unreachable code 19 FAIL importKey step: AES-CTR 128-bit key with mismatched key and algorithm assert_unreached: importKey failed for AES-CTR 128-bit key Reached unreachable code 20 FAIL importKey step: AES-CTR 192-bit key with mismatched key and algorithm assert_unreached: importKey failed for AES-CTR 192-bit key Reached unreachable code 21 FAIL importKey step: AES-CTR 256-bit key with mismatched key and algorithm assert_unreached: importKey failed for AES-CTR 256-bit key Reached unreachable code 22 FAIL importKey step: AES-CTR 128-bit key without decrypt usage assert_unreached: importKey failed for AES-CTR 128-bit key Reached unreachable code 23 FAIL importKey step: AES-CTR 192-bit key without decrypt usage assert_unreached: importKey failed for AES-CTR 192-bit key Reached unreachable code 24 FAIL importKey step: AES-CTR 256-bit key without decrypt usage assert_unreached: importKey failed for AES-CTR 256-bit key Reached unreachable code 25 FAIL importKey step: AES-CTR 128-bit key, 0-bit counter assert_unreached: importKey failed for AES-CTR 128-bit key, 0-bit counter Reached unreachable code 26 FAIL importKey step: AES-CTR 128-bit key, 129-bit counter assert_unreached: importKey failed for AES-CTR 128-bit key, 129-bit counter Reached unreachable code 27 FAIL importKey step: AES-CTR 192-bit key, 0-bit counter assert_unreached: importKey failed for AES-CTR 192-bit key, 0-bit counter Reached unreachable code 28 FAIL importKey step: AES-CTR 192-bit key, 129-bit counter assert_unreached: importKey failed for AES-CTR 192-bit key, 129-bit counter Reached unreachable code 29 FAIL importKey step: AES-CTR 256-bit key, 0-bit counter assert_unreached: importKey failed for AES-CTR 256-bit key, 0-bit counter Reached unreachable code 30 FAIL importKey step: AES-CTR 256-bit key, 129-bit counter assert_unreached: importKey failed for AES-CTR 256-bit key, 129-bit counter Reached unreachable code 31 FAIL importKey step: decryption AES-CTR 128-bit key, 0-bit counter assert_unreached: importKey failed for AES-CTR 128-bit key, 0-bit counter Reached unreachable code 32 FAIL importKey step: decryption AES-CTR 128-bit key, 129-bit counter assert_unreached: importKey failed for AES-CTR 128-bit key, 129-bit counter Reached unreachable code 33 FAIL importKey step: decryption AES-CTR 192-bit key, 0-bit counter assert_unreached: importKey failed for AES-CTR 192-bit key, 0-bit counter Reached unreachable code 34 FAIL importKey step: decryption AES-CTR 192-bit key, 129-bit counter assert_unreached: importKey failed for AES-CTR 192-bit key, 129-bit counter Reached unreachable code 35 FAIL importKey step: decryption AES-CTR 256-bit key, 0-bit counter assert_unreached: importKey failed for AES-CTR 256-bit key, 0-bit counter Reached unreachable code 36 FAIL importKey step: decryption AES-CTR 256-bit key, 129-bit counter assert_unreached: importKey failed for AES-CTR 256-bit key, 129-bit counter Reached unreachable code 37 -
trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt
r203201 r208891 1 CONSOLE MESSAGE: line 285: TypeError: undefined is not an object (evaluating 'subtle.importKey') 2 FAIL: Timed out waiting for notifyDone to be called 1 encrypt Tests for AES-GCM 3 2 3 4 FAIL importKey step: AES-GCM 128-bit key, 32-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 32-bit tag Reached unreachable code 5 FAIL importKey step: AES-GCM 128-bit key, no additional data, 32-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 32-bit tag Reached unreachable code 6 FAIL importKey step: AES-GCM 128-bit key, 64-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 64-bit tag Reached unreachable code 7 FAIL importKey step: AES-GCM 128-bit key, no additional data, 64-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 64-bit tag Reached unreachable code 8 FAIL importKey step: AES-GCM 128-bit key, 96-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 96-bit tag Reached unreachable code 9 FAIL importKey step: AES-GCM 128-bit key, no additional data, 96-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 96-bit tag Reached unreachable code 10 FAIL importKey step: AES-GCM 128-bit key, 104-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 104-bit tag Reached unreachable code 11 FAIL importKey step: AES-GCM 128-bit key, no additional data, 104-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 104-bit tag Reached unreachable code 12 FAIL importKey step: AES-GCM 128-bit key, 112-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 112-bit tag Reached unreachable code 13 FAIL importKey step: AES-GCM 128-bit key, no additional data, 112-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 112-bit tag Reached unreachable code 14 FAIL importKey step: AES-GCM 128-bit key, 120-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 120-bit tag Reached unreachable code 15 FAIL importKey step: AES-GCM 128-bit key, no additional data, 120-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 120-bit tag Reached unreachable code 16 FAIL importKey step: AES-GCM 128-bit key, 128-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 128-bit tag Reached unreachable code 17 FAIL importKey step: AES-GCM 128-bit key, no additional data, 128-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 128-bit tag Reached unreachable code 18 FAIL importKey step: AES-GCM 192-bit key, 32-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 32-bit tag Reached unreachable code 19 FAIL importKey step: AES-GCM 192-bit key, no additional data, 32-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 32-bit tag Reached unreachable code 20 FAIL importKey step: AES-GCM 192-bit key, 64-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 64-bit tag Reached unreachable code 21 FAIL importKey step: AES-GCM 192-bit key, no additional data, 64-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 64-bit tag Reached unreachable code 22 FAIL importKey step: AES-GCM 192-bit key, 96-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 96-bit tag Reached unreachable code 23 FAIL importKey step: AES-GCM 192-bit key, no additional data, 96-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 96-bit tag Reached unreachable code 24 FAIL importKey step: AES-GCM 192-bit key, 104-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 104-bit tag Reached unreachable code 25 FAIL importKey step: AES-GCM 192-bit key, no additional data, 104-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 104-bit tag Reached unreachable code 26 FAIL importKey step: AES-GCM 192-bit key, 112-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 112-bit tag Reached unreachable code 27 FAIL importKey step: AES-GCM 192-bit key, no additional data, 112-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 112-bit tag Reached unreachable code 28 FAIL importKey step: AES-GCM 192-bit key, 120-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 120-bit tag Reached unreachable code 29 FAIL importKey step: AES-GCM 192-bit key, no additional data, 120-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 120-bit tag Reached unreachable code 30 FAIL importKey step: AES-GCM 192-bit key, 128-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 128-bit tag Reached unreachable code 31 FAIL importKey step: AES-GCM 192-bit key, no additional data, 128-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 128-bit tag Reached unreachable code 32 FAIL importKey step: AES-GCM 256-bit key, 32-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 32-bit tag Reached unreachable code 33 FAIL importKey step: AES-GCM 256-bit key, no additional data, 32-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 32-bit tag Reached unreachable code 34 FAIL importKey step: AES-GCM 256-bit key, 64-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 64-bit tag Reached unreachable code 35 FAIL importKey step: AES-GCM 256-bit key, no additional data, 64-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 64-bit tag Reached unreachable code 36 FAIL importKey step: AES-GCM 256-bit key, 96-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 96-bit tag Reached unreachable code 37 FAIL importKey step: AES-GCM 256-bit key, no additional data, 96-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 96-bit tag Reached unreachable code 38 FAIL importKey step: AES-GCM 256-bit key, 104-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 104-bit tag Reached unreachable code 39 FAIL importKey step: AES-GCM 256-bit key, no additional data, 104-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 104-bit tag Reached unreachable code 40 FAIL importKey step: AES-GCM 256-bit key, 112-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 112-bit tag Reached unreachable code 41 FAIL importKey step: AES-GCM 256-bit key, no additional data, 112-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 112-bit tag Reached unreachable code 42 FAIL importKey step: AES-GCM 256-bit key, 120-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 120-bit tag Reached unreachable code 43 FAIL importKey step: AES-GCM 256-bit key, no additional data, 120-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 120-bit tag Reached unreachable code 44 FAIL importKey step: AES-GCM 256-bit key, 128-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 128-bit tag Reached unreachable code 45 FAIL importKey step: AES-GCM 256-bit key, no additional data, 128-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 128-bit tag Reached unreachable code 46 FAIL importKey step: AES-GCM 128-bit key, 32-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, 32-bit tag Reached unreachable code 47 FAIL importKey step: AES-GCM 128-bit key, no additional data, 32-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 32-bit tag Reached unreachable code 48 FAIL importKey step: AES-GCM 128-bit key, 64-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, 64-bit tag Reached unreachable code 49 FAIL importKey step: AES-GCM 128-bit key, no additional data, 64-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 64-bit tag Reached unreachable code 50 FAIL importKey step: AES-GCM 128-bit key, 96-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, 96-bit tag Reached unreachable code 51 FAIL importKey step: AES-GCM 128-bit key, no additional data, 96-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 96-bit tag Reached unreachable code 52 FAIL importKey step: AES-GCM 128-bit key, 104-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, 104-bit tag Reached unreachable code 53 FAIL importKey step: AES-GCM 128-bit key, no additional data, 104-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 104-bit tag Reached unreachable code 54 FAIL importKey step: AES-GCM 128-bit key, 112-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, 112-bit tag Reached unreachable code 55 FAIL importKey step: AES-GCM 128-bit key, no additional data, 112-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 112-bit tag Reached unreachable code 56 FAIL importKey step: AES-GCM 128-bit key, 120-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, 120-bit tag Reached unreachable code 57 FAIL importKey step: AES-GCM 128-bit key, no additional data, 120-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 120-bit tag Reached unreachable code 58 FAIL importKey step: AES-GCM 128-bit key, 128-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, 128-bit tag Reached unreachable code 59 FAIL importKey step: AES-GCM 128-bit key, no additional data, 128-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 128-bit tag Reached unreachable code 60 FAIL importKey step: AES-GCM 192-bit key, 32-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, 32-bit tag Reached unreachable code 61 FAIL importKey step: AES-GCM 192-bit key, no additional data, 32-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 32-bit tag Reached unreachable code 62 FAIL importKey step: AES-GCM 192-bit key, 64-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, 64-bit tag Reached unreachable code 63 FAIL importKey step: AES-GCM 192-bit key, no additional data, 64-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 64-bit tag Reached unreachable code 64 FAIL importKey step: AES-GCM 192-bit key, 96-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, 96-bit tag Reached unreachable code 65 FAIL importKey step: AES-GCM 192-bit key, no additional data, 96-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 96-bit tag Reached unreachable code 66 FAIL importKey step: AES-GCM 192-bit key, 104-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, 104-bit tag Reached unreachable code 67 FAIL importKey step: AES-GCM 192-bit key, no additional data, 104-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 104-bit tag Reached unreachable code 68 FAIL importKey step: AES-GCM 192-bit key, 112-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, 112-bit tag Reached unreachable code 69 FAIL importKey step: AES-GCM 192-bit key, no additional data, 112-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 112-bit tag Reached unreachable code 70 FAIL importKey step: AES-GCM 192-bit key, 120-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, 120-bit tag Reached unreachable code 71 FAIL importKey step: AES-GCM 192-bit key, no additional data, 120-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 120-bit tag Reached unreachable code 72 FAIL importKey step: AES-GCM 192-bit key, 128-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, 128-bit tag Reached unreachable code 73 FAIL importKey step: AES-GCM 192-bit key, no additional data, 128-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 128-bit tag Reached unreachable code 74 FAIL importKey step: AES-GCM 256-bit key, 32-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, 32-bit tag Reached unreachable code 75 FAIL importKey step: AES-GCM 256-bit key, no additional data, 32-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 32-bit tag Reached unreachable code 76 FAIL importKey step: AES-GCM 256-bit key, 64-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, 64-bit tag Reached unreachable code 77 FAIL importKey step: AES-GCM 256-bit key, no additional data, 64-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 64-bit tag Reached unreachable code 78 FAIL importKey step: AES-GCM 256-bit key, 96-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, 96-bit tag Reached unreachable code 79 FAIL importKey step: AES-GCM 256-bit key, no additional data, 96-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 96-bit tag Reached unreachable code 80 FAIL importKey step: AES-GCM 256-bit key, 104-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, 104-bit tag Reached unreachable code 81 FAIL importKey step: AES-GCM 256-bit key, no additional data, 104-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 104-bit tag Reached unreachable code 82 FAIL importKey step: AES-GCM 256-bit key, 112-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, 112-bit tag Reached unreachable code 83 FAIL importKey step: AES-GCM 256-bit key, no additional data, 112-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 112-bit tag Reached unreachable code 84 FAIL importKey step: AES-GCM 256-bit key, 120-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, 120-bit tag Reached unreachable code 85 FAIL importKey step: AES-GCM 256-bit key, no additional data, 120-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 120-bit tag Reached unreachable code 86 FAIL importKey step: AES-GCM 256-bit key, 128-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, 128-bit tag Reached unreachable code 87 FAIL importKey step: AES-GCM 256-bit key, no additional data, 128-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 128-bit tag Reached unreachable code 88 FAIL importKey step for decryption: AES-GCM 128-bit key, 32-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 32-bit tag Reached unreachable code 89 FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 32-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 32-bit tag Reached unreachable code 90 FAIL importKey step for decryption: AES-GCM 128-bit key, 64-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 64-bit tag Reached unreachable code 91 FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 64-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 64-bit tag Reached unreachable code 92 FAIL importKey step for decryption: AES-GCM 128-bit key, 96-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 96-bit tag Reached unreachable code 93 FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 96-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 96-bit tag Reached unreachable code 94 FAIL importKey step for decryption: AES-GCM 128-bit key, 104-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 104-bit tag Reached unreachable code 95 FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 104-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 104-bit tag Reached unreachable code 96 FAIL importKey step for decryption: AES-GCM 128-bit key, 112-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 112-bit tag Reached unreachable code 97 FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 112-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 112-bit tag Reached unreachable code 98 FAIL importKey step for decryption: AES-GCM 128-bit key, 120-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 120-bit tag Reached unreachable code 99 FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 120-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 120-bit tag Reached unreachable code 100 FAIL importKey step for decryption: AES-GCM 128-bit key, 128-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 128-bit tag Reached unreachable code 101 FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 128-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 128-bit tag Reached unreachable code 102 FAIL importKey step for decryption: AES-GCM 192-bit key, 32-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 32-bit tag Reached unreachable code 103 FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 32-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 32-bit tag Reached unreachable code 104 FAIL importKey step for decryption: AES-GCM 192-bit key, 64-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 64-bit tag Reached unreachable code 105 FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 64-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 64-bit tag Reached unreachable code 106 FAIL importKey step for decryption: AES-GCM 192-bit key, 96-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 96-bit tag Reached unreachable code 107 FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 96-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 96-bit tag Reached unreachable code 108 FAIL importKey step for decryption: AES-GCM 192-bit key, 104-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 104-bit tag Reached unreachable code 109 FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 104-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 104-bit tag Reached unreachable code 110 FAIL importKey step for decryption: AES-GCM 192-bit key, 112-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 112-bit tag Reached unreachable code 111 FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 112-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 112-bit tag Reached unreachable code 112 FAIL importKey step for decryption: AES-GCM 192-bit key, 120-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 120-bit tag Reached unreachable code 113 FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 120-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 120-bit tag Reached unreachable code 114 FAIL importKey step for decryption: AES-GCM 192-bit key, 128-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 128-bit tag Reached unreachable code 115 FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 128-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 128-bit tag Reached unreachable code 116 FAIL importKey step for decryption: AES-GCM 256-bit key, 32-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 32-bit tag Reached unreachable code 117 FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 32-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 32-bit tag Reached unreachable code 118 FAIL importKey step for decryption: AES-GCM 256-bit key, 64-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 64-bit tag Reached unreachable code 119 FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 64-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 64-bit tag Reached unreachable code 120 FAIL importKey step for decryption: AES-GCM 256-bit key, 96-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 96-bit tag Reached unreachable code 121 FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 96-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 96-bit tag Reached unreachable code 122 FAIL importKey step for decryption: AES-GCM 256-bit key, 104-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 104-bit tag Reached unreachable code 123 FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 104-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 104-bit tag Reached unreachable code 124 FAIL importKey step for decryption: AES-GCM 256-bit key, 112-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 112-bit tag Reached unreachable code 125 FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 112-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 112-bit tag Reached unreachable code 126 FAIL importKey step for decryption: AES-GCM 256-bit key, 120-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 120-bit tag Reached unreachable code 127 FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 120-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 120-bit tag Reached unreachable code 128 FAIL importKey step for decryption: AES-GCM 256-bit key, 128-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 128-bit tag Reached unreachable code 129 FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 128-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 128-bit tag Reached unreachable code 130 FAIL importKey step for decryption: AES-GCM 128-bit key, 32-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, 32-bit tag Reached unreachable code 131 FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 32-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 32-bit tag Reached unreachable code 132 FAIL importKey step for decryption: AES-GCM 128-bit key, 64-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, 64-bit tag Reached unreachable code 133 FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 64-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 64-bit tag Reached unreachable code 134 FAIL importKey step for decryption: AES-GCM 128-bit key, 96-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, 96-bit tag Reached unreachable code 135 FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 96-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 96-bit tag Reached unreachable code 136 FAIL importKey step for decryption: AES-GCM 128-bit key, 104-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, 104-bit tag Reached unreachable code 137 FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 104-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 104-bit tag Reached unreachable code 138 FAIL importKey step for decryption: AES-GCM 128-bit key, 112-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, 112-bit tag Reached unreachable code 139 FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 112-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 112-bit tag Reached unreachable code 140 FAIL importKey step for decryption: AES-GCM 128-bit key, 120-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, 120-bit tag Reached unreachable code 141 FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 120-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 120-bit tag Reached unreachable code 142 FAIL importKey step for decryption: AES-GCM 128-bit key, 128-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, 128-bit tag Reached unreachable code 143 FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 128-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 128-bit tag Reached unreachable code 144 FAIL importKey step for decryption: AES-GCM 192-bit key, 32-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, 32-bit tag Reached unreachable code 145 FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 32-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 32-bit tag Reached unreachable code 146 FAIL importKey step for decryption: AES-GCM 192-bit key, 64-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, 64-bit tag Reached unreachable code 147 FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 64-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 64-bit tag Reached unreachable code 148 FAIL importKey step for decryption: AES-GCM 192-bit key, 96-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, 96-bit tag Reached unreachable code 149 FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 96-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 96-bit tag Reached unreachable code 150 FAIL importKey step for decryption: AES-GCM 192-bit key, 104-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, 104-bit tag Reached unreachable code 151 FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 104-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 104-bit tag Reached unreachable code 152 FAIL importKey step for decryption: AES-GCM 192-bit key, 112-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, 112-bit tag Reached unreachable code 153 FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 112-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 112-bit tag Reached unreachable code 154 FAIL importKey step for decryption: AES-GCM 192-bit key, 120-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, 120-bit tag Reached unreachable code 155 FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 120-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 120-bit tag Reached unreachable code 156 FAIL importKey step for decryption: AES-GCM 192-bit key, 128-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, 128-bit tag Reached unreachable code 157 FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 128-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 128-bit tag Reached unreachable code 158 FAIL importKey step for decryption: AES-GCM 256-bit key, 32-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, 32-bit tag Reached unreachable code 159 FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 32-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 32-bit tag Reached unreachable code 160 FAIL importKey step for decryption: AES-GCM 256-bit key, 64-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, 64-bit tag Reached unreachable code 161 FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 64-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 64-bit tag Reached unreachable code 162 FAIL importKey step for decryption: AES-GCM 256-bit key, 96-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, 96-bit tag Reached unreachable code 163 FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 96-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 96-bit tag Reached unreachable code 164 FAIL importKey step for decryption: AES-GCM 256-bit key, 104-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, 104-bit tag Reached unreachable code 165 FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 104-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 104-bit tag Reached unreachable code 166 FAIL importKey step for decryption: AES-GCM 256-bit key, 112-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, 112-bit tag Reached unreachable code 167 FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 112-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 112-bit tag Reached unreachable code 168 FAIL importKey step for decryption: AES-GCM 256-bit key, 120-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, 120-bit tag Reached unreachable code 169 FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 120-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 120-bit tag Reached unreachable code 170 FAIL importKey step for decryption: AES-GCM 256-bit key, 128-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, 128-bit tag Reached unreachable code 171 FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 128-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 128-bit tag Reached unreachable code 172 FAIL importKey step: AES-GCM 128-bit key, 32-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 32-bit tag Reached unreachable code 173 FAIL importKey step: AES-GCM 128-bit key, no additional data, 32-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 32-bit tag Reached unreachable code 174 FAIL importKey step: AES-GCM 128-bit key, 64-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 64-bit tag Reached unreachable code 175 FAIL importKey step: AES-GCM 128-bit key, no additional data, 64-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 64-bit tag Reached unreachable code 176 FAIL importKey step: AES-GCM 128-bit key, 96-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 96-bit tag Reached unreachable code 177 FAIL importKey step: AES-GCM 128-bit key, no additional data, 96-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 96-bit tag Reached unreachable code 178 FAIL importKey step: AES-GCM 128-bit key, 104-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 104-bit tag Reached unreachable code 179 FAIL importKey step: AES-GCM 128-bit key, no additional data, 104-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 104-bit tag Reached unreachable code 180 FAIL importKey step: AES-GCM 128-bit key, 112-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 112-bit tag Reached unreachable code 181 FAIL importKey step: AES-GCM 128-bit key, no additional data, 112-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 112-bit tag Reached unreachable code 182 FAIL importKey step: AES-GCM 128-bit key, 120-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 120-bit tag Reached unreachable code 183 FAIL importKey step: AES-GCM 128-bit key, no additional data, 120-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 120-bit tag Reached unreachable code 184 FAIL importKey step: AES-GCM 128-bit key, 128-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 128-bit tag Reached unreachable code 185 FAIL importKey step: AES-GCM 128-bit key, no additional data, 128-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 128-bit tag Reached unreachable code 186 FAIL importKey step: AES-GCM 192-bit key, 32-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 32-bit tag Reached unreachable code 187 FAIL importKey step: AES-GCM 192-bit key, no additional data, 32-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 32-bit tag Reached unreachable code 188 FAIL importKey step: AES-GCM 192-bit key, 64-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 64-bit tag Reached unreachable code 189 FAIL importKey step: AES-GCM 192-bit key, no additional data, 64-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 64-bit tag Reached unreachable code 190 FAIL importKey step: AES-GCM 192-bit key, 96-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 96-bit tag Reached unreachable code 191 FAIL importKey step: AES-GCM 192-bit key, no additional data, 96-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 96-bit tag Reached unreachable code 192 FAIL importKey step: AES-GCM 192-bit key, 104-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 104-bit tag Reached unreachable code 193 FAIL importKey step: AES-GCM 192-bit key, no additional data, 104-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 104-bit tag Reached unreachable code 194 FAIL importKey step: AES-GCM 192-bit key, 112-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 112-bit tag Reached unreachable code 195 FAIL importKey step: AES-GCM 192-bit key, no additional data, 112-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 112-bit tag Reached unreachable code 196 FAIL importKey step: AES-GCM 192-bit key, 120-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 120-bit tag Reached unreachable code 197 FAIL importKey step: AES-GCM 192-bit key, no additional data, 120-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 120-bit tag Reached unreachable code 198 FAIL importKey step: AES-GCM 192-bit key, 128-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 128-bit tag Reached unreachable code 199 FAIL importKey step: AES-GCM 192-bit key, no additional data, 128-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 128-bit tag Reached unreachable code 200 FAIL importKey step: AES-GCM 256-bit key, 32-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 32-bit tag Reached unreachable code 201 FAIL importKey step: AES-GCM 256-bit key, no additional data, 32-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 32-bit tag Reached unreachable code 202 FAIL importKey step: AES-GCM 256-bit key, 64-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 64-bit tag Reached unreachable code 203 FAIL importKey step: AES-GCM 256-bit key, no additional data, 64-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 64-bit tag Reached unreachable code 204 FAIL importKey step: AES-GCM 256-bit key, 96-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 96-bit tag Reached unreachable code 205 FAIL importKey step: AES-GCM 256-bit key, no additional data, 96-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 96-bit tag Reached unreachable code 206 FAIL importKey step: AES-GCM 256-bit key, 104-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 104-bit tag Reached unreachable code 207 FAIL importKey step: AES-GCM 256-bit key, no additional data, 104-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 104-bit tag Reached unreachable code 208 FAIL importKey step: AES-GCM 256-bit key, 112-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 112-bit tag Reached unreachable code 209 FAIL importKey step: AES-GCM 256-bit key, no additional data, 112-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 112-bit tag Reached unreachable code 210 FAIL importKey step: AES-GCM 256-bit key, 120-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 120-bit tag Reached unreachable code 211 FAIL importKey step: AES-GCM 256-bit key, no additional data, 120-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 120-bit tag Reached unreachable code 212 FAIL importKey step: AES-GCM 256-bit key, 128-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 128-bit tag Reached unreachable code 213 FAIL importKey step: AES-GCM 256-bit key, no additional data, 128-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 128-bit tag Reached unreachable code 214 FAIL importKey step: AES-GCM 128-bit key, 32-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, 32-bit tag Reached unreachable code 215 FAIL importKey step: AES-GCM 128-bit key, no additional data, 32-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 32-bit tag Reached unreachable code 216 FAIL importKey step: AES-GCM 128-bit key, 64-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, 64-bit tag Reached unreachable code 217 FAIL importKey step: AES-GCM 128-bit key, no additional data, 64-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 64-bit tag Reached unreachable code 218 FAIL importKey step: AES-GCM 128-bit key, 96-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, 96-bit tag Reached unreachable code 219 FAIL importKey step: AES-GCM 128-bit key, no additional data, 96-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 96-bit tag Reached unreachable code 220 FAIL importKey step: AES-GCM 128-bit key, 104-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, 104-bit tag Reached unreachable code 221 FAIL importKey step: AES-GCM 128-bit key, no additional data, 104-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 104-bit tag Reached unreachable code 222 FAIL importKey step: AES-GCM 128-bit key, 112-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, 112-bit tag Reached unreachable code 223 FAIL importKey step: AES-GCM 128-bit key, no additional data, 112-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 112-bit tag Reached unreachable code 224 FAIL importKey step: AES-GCM 128-bit key, 120-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, 120-bit tag Reached unreachable code 225 FAIL importKey step: AES-GCM 128-bit key, no additional data, 120-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 120-bit tag Reached unreachable code 226 FAIL importKey step: AES-GCM 128-bit key, 128-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, 128-bit tag Reached unreachable code 227 FAIL importKey step: AES-GCM 128-bit key, no additional data, 128-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 128-bit tag Reached unreachable code 228 FAIL importKey step: AES-GCM 192-bit key, 32-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, 32-bit tag Reached unreachable code 229 FAIL importKey step: AES-GCM 192-bit key, no additional data, 32-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 32-bit tag Reached unreachable code 230 FAIL importKey step: AES-GCM 192-bit key, 64-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, 64-bit tag Reached unreachable code 231 FAIL importKey step: AES-GCM 192-bit key, no additional data, 64-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 64-bit tag Reached unreachable code 232 FAIL importKey step: AES-GCM 192-bit key, 96-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, 96-bit tag Reached unreachable code 233 FAIL importKey step: AES-GCM 192-bit key, no additional data, 96-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 96-bit tag Reached unreachable code 234 FAIL importKey step: AES-GCM 192-bit key, 104-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, 104-bit tag Reached unreachable code 235 FAIL importKey step: AES-GCM 192-bit key, no additional data, 104-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 104-bit tag Reached unreachable code 236 FAIL importKey step: AES-GCM 192-bit key, 112-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, 112-bit tag Reached unreachable code 237 FAIL importKey step: AES-GCM 192-bit key, no additional data, 112-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 112-bit tag Reached unreachable code 238 FAIL importKey step: AES-GCM 192-bit key, 120-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, 120-bit tag Reached unreachable code 239 FAIL importKey step: AES-GCM 192-bit key, no additional data, 120-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 120-bit tag Reached unreachable code 240 FAIL importKey step: AES-GCM 192-bit key, 128-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, 128-bit tag Reached unreachable code 241 FAIL importKey step: AES-GCM 192-bit key, no additional data, 128-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 128-bit tag Reached unreachable code 242 FAIL importKey step: AES-GCM 256-bit key, 32-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, 32-bit tag Reached unreachable code 243 FAIL importKey step: AES-GCM 256-bit key, no additional data, 32-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 32-bit tag Reached unreachable code 244 FAIL importKey step: AES-GCM 256-bit key, 64-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, 64-bit tag Reached unreachable code 245 FAIL importKey step: AES-GCM 256-bit key, no additional data, 64-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 64-bit tag Reached unreachable code 246 FAIL importKey step: AES-GCM 256-bit key, 96-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, 96-bit tag Reached unreachable code 247 FAIL importKey step: AES-GCM 256-bit key, no additional data, 96-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 96-bit tag Reached unreachable code 248 FAIL importKey step: AES-GCM 256-bit key, 104-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, 104-bit tag Reached unreachable code 249 FAIL importKey step: AES-GCM 256-bit key, no additional data, 104-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 104-bit tag Reached unreachable code 250 FAIL importKey step: AES-GCM 256-bit key, 112-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, 112-bit tag Reached unreachable code 251 FAIL importKey step: AES-GCM 256-bit key, no additional data, 112-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 112-bit tag Reached unreachable code 252 FAIL importKey step: AES-GCM 256-bit key, 120-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, 120-bit tag Reached unreachable code 253 FAIL importKey step: AES-GCM 256-bit key, no additional data, 120-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 120-bit tag Reached unreachable code 254 FAIL importKey step: AES-GCM 256-bit key, 128-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, 128-bit tag Reached unreachable code 255 FAIL importKey step: AES-GCM 256-bit key, no additional data, 128-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 128-bit tag Reached unreachable code 256 FAIL importKey step: AES-GCM 128-bit key, 32-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 32-bit tag Reached unreachable code 257 FAIL importKey step: AES-GCM 128-bit key, no additional data, 32-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 32-bit tag Reached unreachable code 258 FAIL importKey step: AES-GCM 128-bit key, 64-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 64-bit tag Reached unreachable code 259 FAIL importKey step: AES-GCM 128-bit key, no additional data, 64-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 64-bit tag Reached unreachable code 260 FAIL importKey step: AES-GCM 128-bit key, 96-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 96-bit tag Reached unreachable code 261 FAIL importKey step: AES-GCM 128-bit key, no additional data, 96-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 96-bit tag Reached unreachable code 262 FAIL importKey step: AES-GCM 128-bit key, 104-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 104-bit tag Reached unreachable code 263 FAIL importKey step: AES-GCM 128-bit key, no additional data, 104-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 104-bit tag Reached unreachable code 264 FAIL importKey step: AES-GCM 128-bit key, 112-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 112-bit tag Reached unreachable code 265 FAIL importKey step: AES-GCM 128-bit key, no additional data, 112-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 112-bit tag Reached unreachable code 266 FAIL importKey step: AES-GCM 128-bit key, 120-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 120-bit tag Reached unreachable code 267 FAIL importKey step: AES-GCM 128-bit key, no additional data, 120-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 120-bit tag Reached unreachable code 268 FAIL importKey step: AES-GCM 128-bit key, 128-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 128-bit tag Reached unreachable code 269 FAIL importKey step: AES-GCM 128-bit key, no additional data, 128-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 128-bit tag Reached unreachable code 270 FAIL importKey step: AES-GCM 192-bit key, 32-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 32-bit tag Reached unreachable code 271 FAIL importKey step: AES-GCM 192-bit key, no additional data, 32-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 32-bit tag Reached unreachable code 272 FAIL importKey step: AES-GCM 192-bit key, 64-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 64-bit tag Reached unreachable code 273 FAIL importKey step: AES-GCM 192-bit key, no additional data, 64-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 64-bit tag Reached unreachable code 274 FAIL importKey step: AES-GCM 192-bit key, 96-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 96-bit tag Reached unreachable code 275 FAIL importKey step: AES-GCM 192-bit key, no additional data, 96-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 96-bit tag Reached unreachable code 276 FAIL importKey step: AES-GCM 192-bit key, 104-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 104-bit tag Reached unreachable code 277 FAIL importKey step: AES-GCM 192-bit key, no additional data, 104-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 104-bit tag Reached unreachable code 278 FAIL importKey step: AES-GCM 192-bit key, 112-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 112-bit tag Reached unreachable code 279 FAIL importKey step: AES-GCM 192-bit key, no additional data, 112-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 112-bit tag Reached unreachable code 280 FAIL importKey step: AES-GCM 192-bit key, 120-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 120-bit tag Reached unreachable code 281 FAIL importKey step: AES-GCM 192-bit key, no additional data, 120-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 120-bit tag Reached unreachable code 282 FAIL importKey step: AES-GCM 192-bit key, 128-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 128-bit tag Reached unreachable code 283 FAIL importKey step: AES-GCM 192-bit key, no additional data, 128-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 128-bit tag Reached unreachable code 284 FAIL importKey step: AES-GCM 256-bit key, 32-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 32-bit tag Reached unreachable code 285 FAIL importKey step: AES-GCM 256-bit key, no additional data, 32-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 32-bit tag Reached unreachable code 286 FAIL importKey step: AES-GCM 256-bit key, 64-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 64-bit tag Reached unreachable code 287 FAIL importKey step: AES-GCM 256-bit key, no additional data, 64-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 64-bit tag Reached unreachable code 288 FAIL importKey step: AES-GCM 256-bit key, 96-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 96-bit tag Reached unreachable code 289 FAIL importKey step: AES-GCM 256-bit key, no additional data, 96-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 96-bit tag Reached unreachable code 290 FAIL importKey step: AES-GCM 256-bit key, 104-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 104-bit tag Reached unreachable code 291 FAIL importKey step: AES-GCM 256-bit key, no additional data, 104-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 104-bit tag Reached unreachable code 292 FAIL importKey step: AES-GCM 256-bit key, 112-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 112-bit tag Reached unreachable code 293 FAIL importKey step: AES-GCM 256-bit key, no additional data, 112-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 112-bit tag Reached unreachable code 294 FAIL importKey step: AES-GCM 256-bit key, 120-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 120-bit tag Reached unreachable code 295 FAIL importKey step: AES-GCM 256-bit key, no additional data, 120-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 120-bit tag Reached unreachable code 296 FAIL importKey step: AES-GCM 256-bit key, 128-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 128-bit tag Reached unreachable code 297 FAIL importKey step: AES-GCM 256-bit key, no additional data, 128-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 128-bit tag Reached unreachable code 298 FAIL importKey step: AES-GCM 128-bit key, illegal tag length 24-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 24-bits Reached unreachable code 299 FAIL importKey step: AES-GCM 128-bit key, illegal tag length 48-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 48-bits Reached unreachable code 300 FAIL importKey step: AES-GCM 128-bit key, illegal tag length 72-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 72-bits Reached unreachable code 301 FAIL importKey step: AES-GCM 128-bit key, illegal tag length 95-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 95-bits Reached unreachable code 302 FAIL importKey step: AES-GCM 128-bit key, illegal tag length 129-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 129-bits Reached unreachable code 303 FAIL importKey step: AES-GCM 128-bit key, illegal tag length 256-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 256-bits Reached unreachable code 304 FAIL importKey step: AES-GCM 192-bit key, illegal tag length 24-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 24-bits Reached unreachable code 305 FAIL importKey step: AES-GCM 192-bit key, illegal tag length 48-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 48-bits Reached unreachable code 306 FAIL importKey step: AES-GCM 192-bit key, illegal tag length 72-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 72-bits Reached unreachable code 307 FAIL importKey step: AES-GCM 192-bit key, illegal tag length 95-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 95-bits Reached unreachable code 308 FAIL importKey step: AES-GCM 192-bit key, illegal tag length 129-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 129-bits Reached unreachable code 309 FAIL importKey step: AES-GCM 192-bit key, illegal tag length 256-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 256-bits Reached unreachable code 310 FAIL importKey step: AES-GCM 256-bit key, illegal tag length 24-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 24-bits Reached unreachable code 311 FAIL importKey step: AES-GCM 256-bit key, illegal tag length 48-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 48-bits Reached unreachable code 312 FAIL importKey step: AES-GCM 256-bit key, illegal tag length 72-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 72-bits Reached unreachable code 313 FAIL importKey step: AES-GCM 256-bit key, illegal tag length 95-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 95-bits Reached unreachable code 314 FAIL importKey step: AES-GCM 256-bit key, illegal tag length 129-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 129-bits Reached unreachable code 315 FAIL importKey step: AES-GCM 256-bit key, illegal tag length 256-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 256-bits Reached unreachable code 316 FAIL importKey step: decryption AES-GCM 128-bit key, illegal tag length 24-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 24-bits Reached unreachable code 317 FAIL importKey step: decryption AES-GCM 128-bit key, illegal tag length 48-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 48-bits Reached unreachable code 318 FAIL importKey step: decryption AES-GCM 128-bit key, illegal tag length 72-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 72-bits Reached unreachable code 319 FAIL importKey step: decryption AES-GCM 128-bit key, illegal tag length 95-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 95-bits Reached unreachable code 320 FAIL importKey step: decryption AES-GCM 128-bit key, illegal tag length 129-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 129-bits Reached unreachable code 321 FAIL importKey step: decryption AES-GCM 128-bit key, illegal tag length 256-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 256-bits Reached unreachable code 322 FAIL importKey step: decryption AES-GCM 192-bit key, illegal tag length 24-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 24-bits Reached unreachable code 323 FAIL importKey step: decryption AES-GCM 192-bit key, illegal tag length 48-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 48-bits Reached unreachable code 324 FAIL importKey step: decryption AES-GCM 192-bit key, illegal tag length 72-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 72-bits Reached unreachable code 325 FAIL importKey step: decryption AES-GCM 192-bit key, illegal tag length 95-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 95-bits Reached unreachable code 326 FAIL importKey step: decryption AES-GCM 192-bit key, illegal tag length 129-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 129-bits Reached unreachable code 327 FAIL importKey step: decryption AES-GCM 192-bit key, illegal tag length 256-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 256-bits Reached unreachable code 328 FAIL importKey step: decryption AES-GCM 256-bit key, illegal tag length 24-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 24-bits Reached unreachable code 329 FAIL importKey step: decryption AES-GCM 256-bit key, illegal tag length 48-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 48-bits Reached unreachable code 330 FAIL importKey step: decryption AES-GCM 256-bit key, illegal tag length 72-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 72-bits Reached unreachable code 331 FAIL importKey step: decryption AES-GCM 256-bit key, illegal tag length 95-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 95-bits Reached unreachable code 332 FAIL importKey step: decryption AES-GCM 256-bit key, illegal tag length 129-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 129-bits Reached unreachable code 333 FAIL importKey step: decryption AES-GCM 256-bit key, illegal tag length 256-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 256-bits Reached unreachable code 334 -
trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt
r203201 r208891 1 CONSOLE MESSAGE: line 313: TypeError: undefined is not an object (evaluating 'subtle.importKey') 2 FAIL: Timed out waiting for notifyDone to be called 1 encrypt Tests for RSA-OAEP 3 2 3 4 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code 5 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code 6 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code 7 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code 8 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 9 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 10 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 11 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 12 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code 13 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code 14 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code 15 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code 16 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code 17 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code 18 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code 19 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code 20 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 21 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 22 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 23 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 24 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code 25 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code 26 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code 27 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code 28 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code 29 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code 30 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code 31 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code 32 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 33 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 34 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 35 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 36 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code 37 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code 38 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code 39 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code 40 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code 41 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code 42 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code 43 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code 44 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 45 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 46 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 47 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 48 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code 49 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code 50 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code 51 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code 52 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code 53 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code 54 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code 55 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code 56 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 57 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 58 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 59 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 60 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code 61 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code 62 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code 63 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code 64 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code 65 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code 66 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code 67 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code 68 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 69 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 70 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 71 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 72 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code 73 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code 74 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code 75 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code 76 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code 77 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code 78 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code 79 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code 80 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 81 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 82 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 83 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 84 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code 85 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code 86 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code 87 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code 88 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code 89 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code 90 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code 91 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code 92 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 93 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 94 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 95 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 96 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code 97 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code 98 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code 99 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code 100 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code 101 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code 102 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code 103 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code 104 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 105 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 106 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 107 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code 108 FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code 109 FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code 110 FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code 111 FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code 112 -
trunk/LayoutTests/imported/w3c/WebCryptoAPI/idlharness-expected.txt
r208737 r208891 44 44 FAIL SubtleCrypto must be primary interface of crypto.subtle assert_own_property: self does not have own property "SubtleCrypto" expected property "SubtleCrypto" missing 45 45 PASS Stringification of crypto.subtle 46 FAIL SubtleCrypto interface: crypto.subtle must inherit property "encrypt" with the proper type (0) assert_inherits: property "encrypt" not found in prototype chain 47 FAIL SubtleCrypto interface: calling encrypt(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "encrypt" not found in prototype chain 46 PASS SubtleCrypto interface: crypto.subtle must inherit property "encrypt" with the proper type (0) 47 PASS SubtleCrypto interface: calling encrypt(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError 48 48 FAIL SubtleCrypto interface: crypto.subtle must inherit property "decrypt" with the proper type (1) assert_inherits: property "decrypt" not found in prototype chain 49 49 FAIL SubtleCrypto interface: calling decrypt(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "decrypt" not found in prototype chain -
trunk/Source/WebCore/CMakeLists.txt
r208872 r208891 334 334 crypto/WebKitSubtleCrypto.idl 335 335 336 crypto/parameters/AesCbcParams.idl 336 337 crypto/parameters/AesKeyGenParams.idl 337 338 crypto/parameters/HmacKeyParams.idl … … 339 340 crypto/parameters/RsaHashedKeyGenParams.idl 340 341 crypto/parameters/RsaKeyGenParams.idl 342 crypto/parameters/RsaOaepParams.idl 341 343 342 344 css/CSSFontFaceLoadEvent.idl -
trunk/Source/WebCore/ChangeLog
r208890 r208891 1 2016-11-17 Jiewen Tan <jiewen_tan@apple.com> 2 3 Update SubtleCrypto::encrypt to match the latest spec 4 https://bugs.webkit.org/show_bug.cgi?id=164738 5 <rdar://problem/29257812> 6 7 Reviewed by Brent Fulgham. 8 9 This patch does following few things: 10 1. It updates the SubtleCrypto::encrypt method to match the latest spec: 11 https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-encrypt. 12 It also refers to the latest Editor's Draft to a certain degree: 13 https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-encrypt. 14 2. It implements encrypt operations of the following algorithms: AES-CBC, 15 RSAES-PKCS1-V1_5, and RSA-OAEP. 16 3. It addes ASSERT(parameters) for every method that accepts a 17 std::unique_ptr<CryptoAlgorithmParameters>&& type parameter. 18 4. It changes RefPtr<CryptoKey>&& to Ref<CryptoKey>&& for every method that 19 accepts a CryptoKey. 20 21 Tests: crypto/subtle/aes-cbc-encrypt-malformed-parameters.html 22 crypto/subtle/aes-cbc-import-key-encrypt.html 23 crypto/subtle/encrypt-malformed-parameters.html 24 crypto/subtle/rsa-oaep-encrypt-malformed-parameters.html 25 crypto/subtle/rsa-oaep-import-key-encrypt-label.html 26 crypto/subtle/rsa-oaep-import-key-encrypt.html 27 crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html 28 crypto/workers/subtle/aes-cbc-import-key-encrypt.html 29 crypto/workers/subtle/rsa-oaep-import-key-encrypt.html 30 crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html 31 32 * CMakeLists.txt: 33 * DerivedSources.make: 34 * WebCore.xcodeproj/project.pbxproj: 35 * bindings/js/BufferSource.h: 36 (WebCore::BufferSource::BufferSource): 37 Add a default constructor for initializing an empty BufferSource object. 38 * bindings/js/JSSubtleCryptoCustom.cpp: 39 (WebCore::normalizeCryptoAlgorithmParameters): 40 (WebCore::jsSubtleCryptoFunctionEncryptPromise): 41 (WebCore::JSSubtleCrypto::encrypt): 42 * crypto/CryptoAlgorithm.cpp: 43 (WebCore::CryptoAlgorithm::encrypt): 44 (WebCore::CryptoAlgorithm::exportKey): 45 * crypto/CryptoAlgorithm.h: 46 * crypto/CryptoAlgorithmParameters.h: 47 * crypto/CryptoKey.h: 48 * crypto/SubtleCrypto.cpp: 49 (WebCore::SubtleCrypto::SubtleCrypto): 50 * crypto/SubtleCrypto.h: 51 (WebCore::SubtleCrypto::workQueue): 52 * crypto/SubtleCrypto.idl: 53 * crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp: 54 (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt): 55 * crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp: 56 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt): 57 * crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp: 58 (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt): 59 * crypto/gnutls/CryptoKeyRSAGnuTLS.cpp: 60 (WebCore::CryptoKeyRSA::generatePair): 61 * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: 62 (WebCore::CryptoAlgorithmAES_CBC::encrypt): 63 (WebCore::CryptoAlgorithmAES_CBC::generateKey): 64 (WebCore::CryptoAlgorithmAES_CBC::importKey): 65 (WebCore::CryptoAlgorithmAES_CBC::exportKey): 66 * crypto/algorithms/CryptoAlgorithmAES_CBC.h: 67 * crypto/algorithms/CryptoAlgorithmAES_KW.cpp: 68 (WebCore::CryptoAlgorithmAES_KW::generateKey): 69 (WebCore::CryptoAlgorithmAES_KW::importKey): 70 (WebCore::CryptoAlgorithmAES_KW::exportKey): 71 * crypto/algorithms/CryptoAlgorithmAES_KW.h: 72 * crypto/algorithms/CryptoAlgorithmHMAC.cpp: 73 (WebCore::CryptoAlgorithmHMAC::generateKey): 74 (WebCore::CryptoAlgorithmHMAC::importKey): 75 (WebCore::CryptoAlgorithmHMAC::exportKey): 76 * crypto/algorithms/CryptoAlgorithmHMAC.h: 77 * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp: 78 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt): 79 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey): 80 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey): 81 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::exportKey): 82 * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h: 83 * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: 84 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey): 85 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey): 86 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey): 87 * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: 88 * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp: 89 (WebCore::CryptoAlgorithmRSA_OAEP::encrypt): 90 (WebCore::CryptoAlgorithmRSA_OAEP::generateKey): 91 (WebCore::CryptoAlgorithmRSA_OAEP::importKey): 92 (WebCore::CryptoAlgorithmRSA_OAEP::exportKey): 93 * crypto/algorithms/CryptoAlgorithmRSA_OAEP.h: 94 * crypto/keys/CryptoKeyRSA.h: 95 * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp: 96 (WebCore::transformAES_CBC): 97 (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt): 98 (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt): 99 * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp: 100 (WebCore::encryptRSAES_PKCS1_v1_5): 101 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt): 102 * crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp: 103 (WebCore::encryptRSA_OAEP): 104 (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt): 105 * crypto/mac/CryptoKeyRSAMac.cpp: 106 (WebCore::CryptoKeyRSA::generatePair): 107 * crypto/parameters/AesCbcParams.idl: Added. 108 * crypto/parameters/CryptoAlgorithmAesCbcParams.h: Added. 109 * crypto/parameters/CryptoAlgorithmAesCbcParamsDeprecated.h: 110 * crypto/parameters/CryptoAlgorithmRsaOaepParams.h: Added. 111 * crypto/parameters/RsaOaepParams.idl: Added. 112 1 113 2016-11-18 Ryan Haddad <ryanhaddad@apple.com> 2 114 -
trunk/Source/WebCore/DerivedSources.make
r208872 r208891 255 255 $(WebCore)/crypto/CryptoKeyUsage.idl \ 256 256 $(WebCore)/crypto/JsonWebKey.idl \ 257 $(WebCore)/crypto/parameters/AesCbcParams.idl \ 257 258 $(WebCore)/crypto/parameters/AesKeyGenParams.idl \ 258 259 $(WebCore)/crypto/parameters/HmacKeyParams.idl \ … … 260 261 $(WebCore)/crypto/parameters/RsaHashedKeyGenParams.idl \ 261 262 $(WebCore)/crypto/parameters/RsaKeyGenParams.idl \ 263 $(WebCore)/crypto/parameters/RsaOaepParams.idl \ 262 264 $(WebCore)/crypto/RsaOtherPrimesInfo.idl \ 263 265 $(WebCore)/crypto/SubtleCrypto.idl \ -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r208872 r208891 2354 2354 55A336F71D8209F40022C4C7 /* NativeImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 55A336F61D8209F40022C4C7 /* NativeImage.h */; }; 2355 2355 55A336F91D821E3C0022C4C7 /* ImageBackingStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 55A336F81D821E3C0022C4C7 /* ImageBackingStore.h */; settings = {ATTRIBUTES = (Private, ); }; }; 2356 5706A6961DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 5706A6951DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h */; }; 2357 5706A6981DDE5E4600A03B14 /* JSRsaOaepParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 5706A6971DDE5E4600A03B14 /* JSRsaOaepParams.h */; }; 2358 5706A69A1DDE5E8500A03B14 /* JSRsaOaepParams.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5706A6991DDE5E8500A03B14 /* JSRsaOaepParams.cpp */; }; 2356 2359 5709E8CD1D413D47003244AC /* WebKitSubtleCrypto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5709E8CA1D413CE3003244AC /* WebKitSubtleCrypto.cpp */; }; 2357 2360 5709E8CE1D413D5B003244AC /* JSWebKitSubtleCryptoCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1FF8F661807460800132674 /* JSWebKitSubtleCryptoCustom.cpp */; }; … … 2361 2364 571F21891DA57C54005C9EFD /* JSSubtleCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = 571F21881DA57C54005C9EFD /* JSSubtleCrypto.h */; }; 2362 2365 571F218B1DA57C7B005C9EFD /* JSSubtleCrypto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 571F218A1DA57C7A005C9EFD /* JSSubtleCrypto.cpp */; }; 2366 572093D31DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 572093D21DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcParams.h */; }; 2367 572093D51DDCED8E00310AB0 /* JSAesCbcParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 572093D41DDCED8E00310AB0 /* JSAesCbcParams.h */; }; 2368 572093D71DDCEDA700310AB0 /* JSAesCbcParams.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 572093D61DDCEDA700310AB0 /* JSAesCbcParams.cpp */; }; 2363 2369 572A7F211C6E5719009C6149 /* SimulatedClick.h in Headers */ = {isa = PBXBuildFile; fileRef = 572A7F201C6E5719009C6149 /* SimulatedClick.h */; }; 2364 2370 572A7F231C6E5A66009C6149 /* SimulatedClick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 572A7F221C6E5A66009C6149 /* SimulatedClick.cpp */; }; … … 9585 9591 55A336F81D821E3C0022C4C7 /* ImageBackingStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageBackingStore.h; sourceTree = "<group>"; }; 9586 9592 55D408F71A7C631800C78450 /* SVGImageClients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageClients.h; sourceTree = "<group>"; }; 9593 5706A6941DDE5BF800A03B14 /* RsaOaepParams.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = RsaOaepParams.idl; sourceTree = "<group>"; }; 9594 5706A6951DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmRsaOaepParams.h; sourceTree = "<group>"; }; 9595 5706A6971DDE5E4600A03B14 /* JSRsaOaepParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRsaOaepParams.h; sourceTree = "<group>"; }; 9596 5706A6991DDE5E8500A03B14 /* JSRsaOaepParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRsaOaepParams.cpp; sourceTree = "<group>"; }; 9587 9597 5709E8CA1D413CE3003244AC /* WebKitSubtleCrypto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitSubtleCrypto.cpp; sourceTree = "<group>"; }; 9588 9598 5709E8CB1D413CE3003244AC /* WebKitSubtleCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitSubtleCrypto.h; sourceTree = "<group>"; }; … … 9590 9600 571F21881DA57C54005C9EFD /* JSSubtleCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSubtleCrypto.h; sourceTree = "<group>"; }; 9591 9601 571F218A1DA57C7A005C9EFD /* JSSubtleCrypto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSubtleCrypto.cpp; sourceTree = "<group>"; }; 9602 572093D11DDCEA4B00310AB0 /* AesCbcParams.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AesCbcParams.idl; sourceTree = "<group>"; }; 9603 572093D21DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmAesCbcParams.h; sourceTree = "<group>"; }; 9604 572093D41DDCED8E00310AB0 /* JSAesCbcParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAesCbcParams.h; sourceTree = "<group>"; }; 9605 572093D61DDCEDA700310AB0 /* JSAesCbcParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAesCbcParams.cpp; sourceTree = "<group>"; }; 9592 9606 572A7F201C6E5719009C6149 /* SimulatedClick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimulatedClick.h; sourceTree = "<group>"; }; 9593 9607 572A7F221C6E5A66009C6149 /* SimulatedClick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimulatedClick.cpp; sourceTree = "<group>"; }; … … 22958 22972 isa = PBXGroup; 22959 22973 children = ( 22974 572093D11DDCEA4B00310AB0 /* AesCbcParams.idl */, 22960 22975 577483101DADC49900716EF9 /* AesKeyGenParams.idl */, 22976 572093D21DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcParams.h */, 22961 22977 E125F8391824104800D84CD9 /* CryptoAlgorithmAesCbcParamsDeprecated.h */, 22962 22978 577483111DADC55D00716EF9 /* CryptoAlgorithmAesKeyGenParams.h */, … … 22970 22986 E1BD331D182D8F4200C05D9F /* CryptoAlgorithmRsaKeyGenParamsDeprecated.h */, 22971 22987 E1C266DA18319935003F8B33 /* CryptoAlgorithmRsaKeyParamsWithHashDeprecated.h */, 22988 5706A6951DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h */, 22972 22989 E1FE1376184D1E3300892F13 /* CryptoAlgorithmRsaOaepParamsDeprecated.h */, 22973 22990 E1BD331B182D8EE900C05D9F /* CryptoAlgorithmRsaSsaParamsDeprecated.h */, … … 22976 22993 57F827391DB72C22009D2BF4 /* RsaHashedKeyGenParams.idl */, 22977 22994 57FEDD3D1DB6D47F00EB96F5 /* RsaKeyGenParams.idl */, 22995 5706A6941DDE5BF800A03B14 /* RsaOaepParams.idl */, 22978 22996 ); 22979 22997 path = parameters; … … 23130 23148 isa = PBXGroup; 23131 23149 children = ( 23150 572093D61DDCEDA700310AB0 /* JSAesCbcParams.cpp */, 23151 572093D41DDCED8E00310AB0 /* JSAesCbcParams.h */, 23132 23152 577483151DAEC32200716EF9 /* JSAesKeyGenParams.cpp */, 23133 23153 577483131DAEC2EA00716EF9 /* JSAesKeyGenParams.h */, … … 23150 23170 57FEDD421DB6D76000EB96F5 /* JSRsaKeyGenParams.cpp */, 23151 23171 57FEDD401DB6D73A00EB96F5 /* JSRsaKeyGenParams.h */, 23172 5706A6991DDE5E8500A03B14 /* JSRsaOaepParams.cpp */, 23173 5706A6971DDE5E4600A03B14 /* JSRsaOaepParams.h */, 23152 23174 57E233601DC7D6AA00F28D01 /* JSRsaOtherPrimesInfo.cpp */, 23153 23175 57E2335C1DC7D60800F28D01 /* JSRsaOtherPrimesInfo.h */, … … 25019 25041 7C93F34E1AA6BF0700A98BAB /* ContentExtensionCompiler.h in Headers */, 25020 25042 7CFDC57D1AC1D80500E24A57 /* ContentExtensionError.h in Headers */, 25043 572093D31DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcParams.h in Headers */, 25021 25044 26F0C8981A2E724B002794F8 /* ContentExtensionParser.h in Headers */, 25022 25045 26F0C89C1A2EC110002794F8 /* ContentExtensionRule.h in Headers */, … … 25344 25367 A9C6E4E40D745E05006442E9 /* DOMMimeType.h in Headers */, 25345 25368 A9C6E4E80D745E18006442E9 /* DOMMimeTypeArray.h in Headers */, 25369 5706A6961DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h in Headers */, 25346 25370 52B6C9C315E3F4DF00690B05 /* DOMNamedFlowCollection.h in Headers */, 25347 25371 1ACE53E80A8D18E70022947D /* DOMParser.h in Headers */, … … 26139 26163 BC305C7A0C076BB300CD20F0 /* JSHTMLObjectElement.h in Headers */, 26140 26164 1A85B1EB0A1B240500D8C87C /* JSHTMLOListElement.h in Headers */, 26165 5706A6981DDE5E4600A03B14 /* JSRsaOaepParams.h in Headers */, 26141 26166 A80E7E9B0A1A83E3007FB8C5 /* JSHTMLOptGroupElement.h in Headers */, 26167 572093D51DDCED8E00310AB0 /* JSAesCbcParams.h in Headers */, 26142 26168 A80E7E990A1A83E3007FB8C5 /* JSHTMLOptionElement.h in Headers */, 26143 26169 448A29BF0A46D9CB0030759F /* JSHTMLOptionsCollection.h in Headers */, … … 28591 28617 buildActionMask = 2147483647; 28592 28618 files = ( 28619 5706A69A1DDE5E8500A03B14 /* JSRsaOaepParams.cpp in Sources */, 28620 572093D71DDCEDA700310AB0 /* JSAesCbcParams.cpp in Sources */, 28593 28621 57D0018F1DD5415300ED19D9 /* JSCryptoKeyUsage.cpp in Sources */, 28594 28622 41E1B1D00FF5986900576B3B /* AbstractWorker.cpp in Sources */, -
trunk/Source/WebCore/bindings/js/BufferSource.h
r208539 r208891 37 37 using VariantType = WTF::Variant<RefPtr<JSC::ArrayBufferView>, RefPtr<JSC::ArrayBuffer>>; 38 38 39 BufferSource() { } 39 40 BufferSource(VariantType&& variant) 40 41 : m_variant(WTFMove(variant)) -
trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp
r208757 r208891 31 31 #include "CryptoAlgorithm.h" 32 32 #include "CryptoAlgorithmRegistry.h" 33 #include "JSAesCbcParams.h" 33 34 #include "JSAesKeyGenParams.h" 34 35 #include "JSCryptoAlgorithmParameters.h" … … 41 42 #include "JSRsaHashedKeyGenParams.h" 42 43 #include "JSRsaKeyGenParams.h" 44 #include "JSRsaOaepParams.h" 43 45 #include "ScriptState.h" 44 46 #include <runtime/Error.h> … … 51 53 52 54 enum class Operations { 55 Encrypt, 53 56 Digest, 54 57 GenerateKey, … … 91 94 std::unique_ptr<CryptoAlgorithmParameters> result; 92 95 switch (operation) { 96 case Operations::Encrypt: 97 switch (*identifier) { 98 case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5: 99 result = std::make_unique<CryptoAlgorithmParameters>(params); 100 break; 101 case CryptoAlgorithmIdentifier::RSA_OAEP: { 102 auto params = convertDictionary<CryptoAlgorithmRsaOaepParams>(state, value); 103 RETURN_IF_EXCEPTION(scope, nullptr); 104 result = std::make_unique<CryptoAlgorithmRsaOaepParams>(params); 105 break; 106 } 107 case CryptoAlgorithmIdentifier::AES_CBC: { 108 auto params = convertDictionary<CryptoAlgorithmAesCbcParams>(state, value); 109 RETURN_IF_EXCEPTION(scope, nullptr); 110 result = std::make_unique<CryptoAlgorithmAesCbcParams>(params); 111 break; 112 } 113 default: 114 setDOMException(&state, NOT_SUPPORTED_ERR); 115 return nullptr; 116 } 117 break; 93 118 case Operations::Digest: 94 119 switch (*identifier) { … … 364 389 } 365 390 391 static void jsSubtleCryptoFunctionEncryptPromise(ExecState& state, Ref<DeferredPromise>&& promise) 392 { 393 VM& vm = state.vm(); 394 auto scope = DECLARE_THROW_SCOPE(vm); 395 396 if (UNLIKELY(state.argumentCount() < 3)) { 397 promise->reject<JSValue>(createNotEnoughArgumentsError(&state)); 398 return; 399 } 400 401 auto params = normalizeCryptoAlgorithmParameters(state, state.uncheckedArgument(0), Operations::Encrypt); 402 RETURN_IF_EXCEPTION(scope, void()); 403 404 RefPtr<CryptoKey> key = JSCryptoKey::toWrapped(state.uncheckedArgument(1)); 405 if (!key) { 406 promise->reject(TypeError, ASCIILiteral("Invalid CryptoKey")); 407 return; 408 } 409 410 BufferSource data = convert<IDLBufferSource>(state, state.uncheckedArgument(2)); 411 RETURN_IF_EXCEPTION(scope, void()); 412 Vector<uint8_t> dataVector; 413 dataVector.append(data.data(), data.length()); 414 415 if (params->identifier != key->algorithmIdentifier()) { 416 promise->reject(INVALID_ACCESS_ERR, ASCIILiteral("CryptoKey doesn't match AlgorithmIdentifier")); 417 return; 418 } 419 420 if (!key->allows(CryptoKeyUsageEncrypt)) { 421 promise->reject(INVALID_ACCESS_ERR, ASCIILiteral("CryptoKey doesn't support encryption")); 422 return; 423 } 424 425 auto algorithm = createAlgorithm(state, key->algorithmIdentifier()); 426 RETURN_IF_EXCEPTION(scope, void()); 427 428 auto callback = [capturedPromise = promise.copyRef()](const Vector<uint8_t>& cipherText) mutable { 429 fulfillPromiseWithArrayBuffer(WTFMove(capturedPromise), cipherText.data(), cipherText.size()); 430 return; 431 }; 432 auto exceptionCallback = [capturedPromise = promise.copyRef()](ExceptionCode ec) mutable { 433 rejectWithException(WTFMove(capturedPromise), ec); 434 }; 435 436 JSSubtleCrypto* subtle = jsDynamicDowncast<JSSubtleCrypto*>(state.thisValue()); 437 ASSERT(subtle); 438 algorithm->encrypt(WTFMove(params), key.releaseNonNull(), WTFMove(dataVector), WTFMove(callback), WTFMove(exceptionCallback), *scriptExecutionContextFromExecState(&state), subtle->wrapped().workQueue()); 439 } 440 366 441 static void jsSubtleCryptoFunctionGenerateKeyPromise(ExecState& state, Ref<DeferredPromise>&& promise) 367 442 { … … 525 600 // https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-exportKey 526 601 // It is not beneficial for less time consuming operations. Therefore, we perform it synchronously. 527 algorithm->exportKey(format, WTFMove(key), WTFMove(callback), WTFMove(exceptionCallback)); 602 algorithm->exportKey(format, key.releaseNonNull(), WTFMove(callback), WTFMove(exceptionCallback)); 603 } 604 605 JSValue JSSubtleCrypto::encrypt(ExecState& state) 606 { 607 return callPromiseFunction<jsSubtleCryptoFunctionEncryptPromise, PromiseExecutionScope::WindowOrWorker>(state); 528 608 } 529 609 -
trunk/Source/WebCore/crypto/CryptoAlgorithm.cpp
r208737 r208891 33 33 namespace WebCore { 34 34 35 void CryptoAlgorithm::encrypt(std::unique_ptr<CryptoAlgorithmParameters>&&, Ref<CryptoKey>&&, Vector<uint8_t>&&, VectorCallback&&, ExceptionCallback&& exceptionCallback, ScriptExecutionContext&, WorkQueue&) 36 { 37 exceptionCallback(NOT_SUPPORTED_ERR); 38 } 39 35 40 void CryptoAlgorithm::generateKey(const std::unique_ptr<CryptoAlgorithmParameters>&&, bool, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&&, ExceptionCallback&& exceptionCallback, ScriptExecutionContext&) 36 41 { … … 43 48 } 44 49 45 void CryptoAlgorithm::exportKey(SubtleCrypto::KeyFormat, Ref Ptr<WebCore::CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&& exceptionCallback)50 void CryptoAlgorithm::exportKey(SubtleCrypto::KeyFormat, Ref<CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&& exceptionCallback) 46 51 { 47 52 exceptionCallback(NOT_SUPPORTED_ERR); -
trunk/Source/WebCore/crypto/CryptoAlgorithm.h
r208737 r208891 33 33 #include <wtf/Function.h> 34 34 #include <wtf/Vector.h> 35 #include <wtf/WorkQueue.h> 35 36 36 37 #if ENABLE(SUBTLE_CRYPTO) … … 64 65 using KeyDataCallback = WTF::Function<void(SubtleCrypto::KeyFormat, KeyData&&)>; 65 66 67 virtual void encrypt(std::unique_ptr<CryptoAlgorithmParameters>&&, Ref<CryptoKey>&&, Vector<uint8_t>&&, VectorCallback&&, ExceptionCallback&&, ScriptExecutionContext&, WorkQueue&); 66 68 virtual void generateKey(const std::unique_ptr<CryptoAlgorithmParameters>&&, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&&, ExceptionCallback&&, ScriptExecutionContext&); 67 69 virtual void importKey(SubtleCrypto::KeyFormat, KeyData&&, const std::unique_ptr<CryptoAlgorithmParameters>&&, bool extractable, CryptoKeyUsageBitmap, KeyCallback&&, ExceptionCallback&&); 68 virtual void exportKey(SubtleCrypto::KeyFormat, Ref Ptr<CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&&);70 virtual void exportKey(SubtleCrypto::KeyFormat, Ref<CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&&); 69 71 70 72 // The following will be deprecated. -
trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h
r208548 r208891 38 38 enum class Class { 39 39 None, 40 AesCbcParams, 40 41 AesKeyGenParams, 41 42 HmacKeyParams, … … 43 44 RsaHashedImportParams, 44 45 RsaKeyGenParams, 46 RsaOaepParams, 45 47 }; 46 48 -
trunk/Source/WebCore/crypto/CryptoKey.h
r208646 r208891 32 32 #include "CryptoKeyUsage.h" 33 33 #include <wtf/Forward.h> 34 #include <wtf/ RefCounted.h>34 #include <wtf/ThreadSafeRefCounted.h> 35 35 #include <wtf/TypeCasts.h> 36 36 #include <wtf/Vector.h> … … 75 75 }; 76 76 77 class CryptoKey : public RefCounted<CryptoKey> {77 class CryptoKey : public ThreadSafeRefCounted<CryptoKey> { 78 78 public: 79 79 using Type = CryptoKeyType; -
trunk/Source/WebCore/crypto/SubtleCrypto.cpp
r206883 r208891 33 33 SubtleCrypto::SubtleCrypto(ScriptExecutionContext& context) 34 34 : ContextDestructionObserver(&context) 35 , m_workQueue(WorkQueue::create("com.apple.WebKit.CryptoQueue")) 35 36 { 36 37 } -
trunk/Source/WebCore/crypto/SubtleCrypto.h
r208548 r208891 29 29 #include <wtf/Ref.h> 30 30 #include <wtf/RefCounted.h> 31 #include <wtf/WorkQueue.h> 31 32 32 33 #if ENABLE(SUBTLE_CRYPTO) … … 40 41 static Ref<SubtleCrypto> create(ScriptExecutionContext& context) { return adoptRef(*new SubtleCrypto(context)); } 41 42 43 WorkQueue& workQueue() { return m_workQueue.get(); }; 44 42 45 private: 43 46 SubtleCrypto(ScriptExecutionContext&); 47 48 Ref<WorkQueue> m_workQueue; 44 49 }; 45 50 -
trunk/Source/WebCore/crypto/SubtleCrypto.idl
r208737 r208891 32 32 NoInterfaceObject, 33 33 ] interface SubtleCrypto { 34 [Custom] Promise<any> encrypt(AlgorithmIdentifier algorithm, CryptoKey key, BufferSource data); 34 35 // FIXME: Should this return a Promise<(CryptoKey or CryptoKeyPair)>? 35 36 [Custom] Promise<any> generateKey(AlgorithmIdentifier algorithm, boolean extractable, sequence<CryptoKeyUsage> keyUsages); -
trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp
r208737 r208891 29 29 #if ENABLE(SUBTLE_CRYPTO) 30 30 31 #include "CryptoAlgorithmAesCbcParams.h" 31 32 #include "CryptoAlgorithmAesCbcParamsDeprecated.h" 32 33 #include "CryptoAlgorithmAesKeyGenParams.h" … … 41 42 static const char* const ALG192 = "A192CBC"; 42 43 static const char* const ALG256 = "A256CBC"; 44 static const size_t IVSIZE = 16; 43 45 44 46 static inline bool usagesAreInvalidForCryptoAlgorithmAES_CBC(CryptoKeyUsageBitmap usages) … … 65 67 } 66 68 69 void CryptoAlgorithmAES_CBC::encrypt(std::unique_ptr<CryptoAlgorithmParameters>&& parameters, Ref<CryptoKey>&& key, Vector<uint8_t>&& plainText, VectorCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext& context, WorkQueue& workQueue) 70 { 71 ASSERT(parameters); 72 auto& aesParameters = downcast<CryptoAlgorithmAesCbcParams>(*parameters); 73 if (aesParameters.ivVector().size() != IVSIZE) { 74 exceptionCallback(OperationError); 75 return; 76 } 77 platformEncrypt(WTFMove(parameters), WTFMove(key), WTFMove(plainText), WTFMove(callback), WTFMove(exceptionCallback), context, workQueue); 78 } 79 67 80 void CryptoAlgorithmAES_CBC::generateKey(const std::unique_ptr<CryptoAlgorithmParameters>&& parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyOrKeyPairCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext&) 68 81 { 82 ASSERT(parameters); 69 83 auto& aesParameters = downcast<CryptoAlgorithmAesKeyGenParams>(*parameters); 70 84 … … 85 99 void CryptoAlgorithmAES_CBC::importKey(SubtleCrypto::KeyFormat format, KeyData&& data, const std::unique_ptr<CryptoAlgorithmParameters>&& parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyCallback&& callback, ExceptionCallback&& exceptionCallback) 86 100 { 101 ASSERT(parameters); 87 102 if (usagesAreInvalidForCryptoAlgorithmAES_CBC(usages)) { 88 103 exceptionCallback(SYNTAX_ERR); … … 122 137 } 123 138 124 void CryptoAlgorithmAES_CBC::exportKey(SubtleCrypto::KeyFormat format, Ref Ptr<CryptoKey>&& key, KeyDataCallback&& callback, ExceptionCallback&& exceptionCallback)125 { 126 const auto& aesKey = downcast<CryptoKeyAES>( *key);139 void CryptoAlgorithmAES_CBC::exportKey(SubtleCrypto::KeyFormat format, Ref<CryptoKey>&& key, KeyDataCallback&& callback, ExceptionCallback&& exceptionCallback) 140 { 141 const auto& aesKey = downcast<CryptoKeyAES>(key.get()); 127 142 128 143 if (aesKey.key().isEmpty()) { -
trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.h
r208737 r208891 45 45 CryptoAlgorithmIdentifier identifier() const final; 46 46 47 void encrypt(std::unique_ptr<CryptoAlgorithmParameters>&&, Ref<CryptoKey>&&, Vector<uint8_t>&&, VectorCallback&&, ExceptionCallback&&, ScriptExecutionContext&, WorkQueue&) final; 47 48 void generateKey(const std::unique_ptr<CryptoAlgorithmParameters>&&, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&&, ExceptionCallback&&, ScriptExecutionContext&) final; 48 49 void importKey(SubtleCrypto::KeyFormat, KeyData&&, const std::unique_ptr<CryptoAlgorithmParameters>&&, bool extractable, CryptoKeyUsageBitmap, KeyCallback&&, ExceptionCallback&&) final; 49 void exportKey(SubtleCrypto::KeyFormat, Ref Ptr<CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&&) final;50 void exportKey(SubtleCrypto::KeyFormat, Ref<CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&&) final; 50 51 51 52 ExceptionOr<void> encrypt(const CryptoAlgorithmParametersDeprecated&, const CryptoKey&, const CryptoOperationData&, VectorCallback&&, VoidCallback&& failureCallback) final; … … 55 56 56 57 bool keyAlgorithmMatches(const CryptoAlgorithmAesCbcParamsDeprecated& algorithmParameters, const CryptoKey&) const; 58 void platformEncrypt(std::unique_ptr<CryptoAlgorithmParameters>&&, Ref<CryptoKey>&&, Vector<uint8_t>&&, VectorCallback&&, ExceptionCallback&&, ScriptExecutionContext&, WorkQueue&); 57 59 ExceptionOr<void> platformEncrypt(const CryptoAlgorithmAesCbcParamsDeprecated&, const CryptoKeyAES&, const CryptoOperationData&, VectorCallback&&, VoidCallback&& failureCallback); 58 60 ExceptionOr<void> platformDecrypt(const CryptoAlgorithmAesCbcParamsDeprecated&, const CryptoKeyAES&, const CryptoOperationData&, VectorCallback&&, VoidCallback&& failureCallback); -
trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_KW.cpp
r208737 r208891 66 66 void CryptoAlgorithmAES_KW::generateKey(const std::unique_ptr<CryptoAlgorithmParameters>&& parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyOrKeyPairCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext&) 67 67 { 68 ASSERT(parameters); 68 69 if (usagesAreInvalidForCryptoAlgorithmAES_KW(usages)) { 69 70 exceptionCallback(SYNTAX_ERR); … … 82 83 void CryptoAlgorithmAES_KW::importKey(SubtleCrypto::KeyFormat format, KeyData&& data, const std::unique_ptr<CryptoAlgorithmParameters>&& parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyCallback&& callback, ExceptionCallback&& exceptionCallback) 83 84 { 85 ASSERT(parameters); 84 86 if (usagesAreInvalidForCryptoAlgorithmAES_KW(usages)) { 85 87 exceptionCallback(SYNTAX_ERR); … … 118 120 } 119 121 120 void CryptoAlgorithmAES_KW::exportKey(SubtleCrypto::KeyFormat format, Ref Ptr<CryptoKey>&& key, KeyDataCallback&& callback, ExceptionCallback&& exceptionCallback)122 void CryptoAlgorithmAES_KW::exportKey(SubtleCrypto::KeyFormat format, Ref<CryptoKey>&& key, KeyDataCallback&& callback, ExceptionCallback&& exceptionCallback) 121 123 { 122 const auto& aesKey = downcast<CryptoKeyAES>( *key);124 const auto& aesKey = downcast<CryptoKeyAES>(key.get()); 123 125 124 126 if (aesKey.key().isEmpty()) { -
trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_KW.h
r208737 r208891 46 46 void generateKey(const std::unique_ptr<CryptoAlgorithmParameters>&&, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&&, ExceptionCallback&&, ScriptExecutionContext&) final; 47 47 void importKey(SubtleCrypto::KeyFormat, KeyData&&, const std::unique_ptr<CryptoAlgorithmParameters>&&, bool extractable, CryptoKeyUsageBitmap, KeyCallback&&, ExceptionCallback&&) final; 48 void exportKey(SubtleCrypto::KeyFormat, Ref Ptr<CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&&) final;48 void exportKey(SubtleCrypto::KeyFormat, Ref<CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&&) final; 49 49 50 50 ExceptionOr<void> encryptForWrapKey(const CryptoAlgorithmParametersDeprecated&, const CryptoKey&, const CryptoOperationData&, VectorCallback&&, VoidCallback&& failureCallback) final; -
trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.cpp
r208737 r208891 72 72 void CryptoAlgorithmHMAC::generateKey(const std::unique_ptr<CryptoAlgorithmParameters>&& parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyOrKeyPairCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext&) 73 73 { 74 ASSERT(parameters); 74 75 const auto& hmacParameters = downcast<CryptoAlgorithmHmacKeyParams>(*parameters); 75 76 … … 95 96 void CryptoAlgorithmHMAC::importKey(SubtleCrypto::KeyFormat format, KeyData&& data, const std::unique_ptr<CryptoAlgorithmParameters>&& parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyCallback&& callback, ExceptionCallback&& exceptionCallback) 96 97 { 98 ASSERT(parameters); 97 99 const auto& hmacParameters = downcast<CryptoAlgorithmHmacKeyParams>(*parameters); 98 100 … … 140 142 } 141 143 142 void CryptoAlgorithmHMAC::exportKey(SubtleCrypto::KeyFormat format, Ref Ptr<CryptoKey>&& key, KeyDataCallback&& callback, ExceptionCallback&& exceptionCallback)143 { 144 const auto& hmacKey = downcast<CryptoKeyHMAC>( *key);144 void CryptoAlgorithmHMAC::exportKey(SubtleCrypto::KeyFormat format, Ref<CryptoKey>&& key, KeyDataCallback&& callback, ExceptionCallback&& exceptionCallback) 145 { 146 const auto& hmacKey = downcast<CryptoKeyHMAC>(key.get()); 145 147 146 148 if (hmacKey.key().isEmpty()) { -
trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.h
r208737 r208891 47 47 void generateKey(const std::unique_ptr<CryptoAlgorithmParameters>&&, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&&, ExceptionCallback&&, ScriptExecutionContext&) final; 48 48 void importKey(SubtleCrypto::KeyFormat, KeyData&&, const std::unique_ptr<CryptoAlgorithmParameters>&&, bool extractable, CryptoKeyUsageBitmap, KeyCallback&&, ExceptionCallback&&) final; 49 void exportKey(SubtleCrypto::KeyFormat, Ref Ptr<CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&&) final;49 void exportKey(SubtleCrypto::KeyFormat, Ref<CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&&) final; 50 50 51 51 // The following will be deprecated. -
trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
r208737 r208891 60 60 } 61 61 62 void CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt(std::unique_ptr<CryptoAlgorithmParameters>&&, Ref<CryptoKey>&& key, Vector<uint8_t>&& plainText, VectorCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext& context, WorkQueue& workQueue) 63 { 64 if (key->type() != CryptoKeyType::Public) { 65 exceptionCallback(INVALID_ACCESS_ERR); 66 return; 67 } 68 platformEncrypt(WTFMove(key), WTFMove(plainText), WTFMove(callback), WTFMove(exceptionCallback), context, workQueue); 69 } 70 62 71 void CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey(const std::unique_ptr<CryptoAlgorithmParameters>&& parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyOrKeyPairCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext& context) 63 72 { 73 ASSERT(parameters); 64 74 const auto& rsaParameters = downcast<CryptoAlgorithmRsaKeyGenParams>(*parameters); 65 75 … … 83 93 void CryptoAlgorithmRSAES_PKCS1_v1_5::importKey(SubtleCrypto::KeyFormat format, KeyData&& data, const std::unique_ptr<CryptoAlgorithmParameters>&& parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyCallback&& callback, ExceptionCallback&& exceptionCallback) 84 94 { 95 ASSERT(parameters); 85 96 RefPtr<CryptoKeyRSA> result; 86 97 switch (format) { … … 114 125 } 115 126 116 void CryptoAlgorithmRSAES_PKCS1_v1_5::exportKey(SubtleCrypto::KeyFormat format, Ref Ptr<CryptoKey>&& key, KeyDataCallback&& callback, ExceptionCallback&& exceptionCallback)127 void CryptoAlgorithmRSAES_PKCS1_v1_5::exportKey(SubtleCrypto::KeyFormat format, Ref<CryptoKey>&& key, KeyDataCallback&& callback, ExceptionCallback&& exceptionCallback) 117 128 { 118 const auto& rsaKey = downcast<CryptoKeyRSA>( *key);129 const auto& rsaKey = downcast<CryptoKeyRSA>(key.get()); 119 130 120 131 if (!rsaKey.keySizeInBits()) { -
trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h
r208737 r208891 45 45 CryptoAlgorithmIdentifier identifier() const final; 46 46 47 void encrypt(std::unique_ptr<CryptoAlgorithmParameters>&&, Ref<CryptoKey>&&, Vector<uint8_t>&&, VectorCallback&&, ExceptionCallback&&, ScriptExecutionContext&, WorkQueue&) final; 47 48 void generateKey(const std::unique_ptr<CryptoAlgorithmParameters>&&, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&&, ExceptionCallback&&, ScriptExecutionContext&) final; 48 49 void importKey(SubtleCrypto::KeyFormat, KeyData&&, const std::unique_ptr<CryptoAlgorithmParameters>&&, bool extractable, CryptoKeyUsageBitmap, KeyCallback&&, ExceptionCallback&&) final; 49 void exportKey(SubtleCrypto::KeyFormat, Ref Ptr<CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&&) final;50 void exportKey(SubtleCrypto::KeyFormat, Ref<CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&&) final; 50 51 51 // The following will be deprecated.52 52 ExceptionOr<void> encrypt(const CryptoAlgorithmParametersDeprecated&, const CryptoKey&, const CryptoOperationData&, VectorCallback&&, VoidCallback&& failureCallback) final; 53 53 ExceptionOr<void> decrypt(const CryptoAlgorithmParametersDeprecated&, const CryptoKey&, const CryptoOperationData&, VectorCallback&&, VoidCallback&& failureCallback) final; … … 56 56 57 57 bool keyAlgorithmMatches(const CryptoKey&) const; 58 void platformEncrypt(Ref<CryptoKey>&&, Vector<uint8_t>&&, VectorCallback&&, ExceptionCallback&&, ScriptExecutionContext&, WorkQueue&); 58 59 ExceptionOr<void> platformEncrypt(const CryptoKeyRSA&, const CryptoOperationData&, VectorCallback&&, VoidCallback&& failureCallback); 59 60 ExceptionOr<void> platformDecrypt(const CryptoKeyRSA&, const CryptoOperationData&, VectorCallback&&, VoidCallback&& failureCallback); -
trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
r208737 r208891 71 71 void CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey(const std::unique_ptr<CryptoAlgorithmParameters>&& parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyOrKeyPairCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext& context) 72 72 { 73 ASSERT(parameters); 73 74 const auto& rsaParameters = downcast<CryptoAlgorithmRsaHashedKeyGenParams>(*parameters); 74 75 … … 91 92 void CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey(SubtleCrypto::KeyFormat format, KeyData&& data, const std::unique_ptr<CryptoAlgorithmParameters>&& parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyCallback&& callback, ExceptionCallback&& exceptionCallback) 92 93 { 94 ASSERT(parameters); 93 95 const auto& rsaParameters = downcast<CryptoAlgorithmRsaHashedImportParams>(*parameters); 94 96 … … 147 149 } 148 150 149 void CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey(SubtleCrypto::KeyFormat format, Ref Ptr<CryptoKey>&& key, KeyDataCallback&& callback, ExceptionCallback&& exceptionCallback)150 { 151 const auto& rsaKey = downcast<CryptoKeyRSA>( *key);151 void CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey(SubtleCrypto::KeyFormat format, Ref<CryptoKey>&& key, KeyDataCallback&& callback, ExceptionCallback&& exceptionCallback) 152 { 153 const auto& rsaKey = downcast<CryptoKeyRSA>(key.get()); 152 154 153 155 if (!rsaKey.keySizeInBits()) { -
trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h
r208737 r208891 47 47 void generateKey(const std::unique_ptr<CryptoAlgorithmParameters>&&, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&&, ExceptionCallback&&, ScriptExecutionContext&) final; 48 48 void importKey(SubtleCrypto::KeyFormat, KeyData&&, const std::unique_ptr<CryptoAlgorithmParameters>&&, bool extractable, CryptoKeyUsageBitmap, KeyCallback&&, ExceptionCallback&&) final; 49 void exportKey(SubtleCrypto::KeyFormat, Ref Ptr<CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&&) final;49 void exportKey(SubtleCrypto::KeyFormat, Ref<CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&&) final; 50 50 51 51 ExceptionOr<void> sign(const CryptoAlgorithmParametersDeprecated&, const CryptoKey&, const CryptoOperationData&, VectorCallback&&, VoidCallback&& failureCallback) final; -
trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp
r208737 r208891 69 69 } 70 70 71 void CryptoAlgorithmRSA_OAEP::encrypt(std::unique_ptr<CryptoAlgorithmParameters>&& parameters, Ref<CryptoKey>&& key, Vector<uint8_t>&& plainText, VectorCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext& context, WorkQueue& workQueue) 72 { 73 ASSERT(parameters); 74 if (key->type() != CryptoKeyType::Public) { 75 exceptionCallback(INVALID_ACCESS_ERR); 76 return; 77 } 78 platformEncrypt(WTFMove(parameters), WTFMove(key), WTFMove(plainText), WTFMove(callback), WTFMove(exceptionCallback), context, workQueue); 79 } 80 81 71 82 void CryptoAlgorithmRSA_OAEP::generateKey(const std::unique_ptr<CryptoAlgorithmParameters>&& parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyOrKeyPairCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext& context) 72 83 { 84 ASSERT(parameters); 73 85 const auto& rsaParameters = downcast<CryptoAlgorithmRsaHashedKeyGenParams>(*parameters); 74 86 … … 91 103 void CryptoAlgorithmRSA_OAEP::importKey(SubtleCrypto::KeyFormat format, KeyData&& data, const std::unique_ptr<CryptoAlgorithmParameters>&& parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyCallback&& callback, ExceptionCallback&& exceptionCallback) 92 104 { 105 ASSERT(parameters); 93 106 const auto& rsaParameters = downcast<CryptoAlgorithmRsaHashedImportParams>(*parameters); 94 107 … … 158 171 } 159 172 160 void CryptoAlgorithmRSA_OAEP::exportKey(SubtleCrypto::KeyFormat format, Ref Ptr<CryptoKey>&& key, KeyDataCallback&& callback, ExceptionCallback&& exceptionCallback)161 { 162 const auto& rsaKey = downcast<CryptoKeyRSA>( *key);173 void CryptoAlgorithmRSA_OAEP::exportKey(SubtleCrypto::KeyFormat format, Ref<CryptoKey>&& key, KeyDataCallback&& callback, ExceptionCallback&& exceptionCallback) 174 { 175 const auto& rsaKey = downcast<CryptoKeyRSA>(key.get()); 163 176 164 177 if (!rsaKey.keySizeInBits()) { -
trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.h
r208737 r208891 45 45 CryptoAlgorithmIdentifier identifier() const final; 46 46 47 void encrypt(std::unique_ptr<CryptoAlgorithmParameters>&&, Ref<CryptoKey>&&, Vector<uint8_t>&&, VectorCallback&&, ExceptionCallback&&, ScriptExecutionContext&, WorkQueue&) final; 47 48 void generateKey(const std::unique_ptr<CryptoAlgorithmParameters>&&, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&&, ExceptionCallback&&, ScriptExecutionContext&) final; 48 49 void importKey(SubtleCrypto::KeyFormat, KeyData&&, const std::unique_ptr<CryptoAlgorithmParameters>&&, bool extractable, CryptoKeyUsageBitmap, KeyCallback&&, ExceptionCallback&&) final; 49 void exportKey(SubtleCrypto::KeyFormat, Ref Ptr<CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&&) final;50 void exportKey(SubtleCrypto::KeyFormat, Ref<CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&&) final; 50 51 51 52 ExceptionOr<void> encrypt(const CryptoAlgorithmParametersDeprecated&, const CryptoKey&, const CryptoOperationData&, VectorCallback&&, VoidCallback&& failureCallback) final; … … 55 56 56 57 bool keyAlgorithmMatches(const CryptoAlgorithmRsaOaepParamsDeprecated& algorithmParameters, const CryptoKey&) const; 58 void platformEncrypt(std::unique_ptr<CryptoAlgorithmParameters>&&, Ref<CryptoKey>&&, Vector<uint8_t>&&, VectorCallback&&, ExceptionCallback&&, ScriptExecutionContext&, WorkQueue&); 57 59 ExceptionOr<void> platformEncrypt(const CryptoAlgorithmRsaOaepParamsDeprecated&, const CryptoKeyRSA&, const CryptoOperationData&, VectorCallback&&, VoidCallback&& failureCallback); 58 60 ExceptionOr<void> platformDecrypt(const CryptoAlgorithmRsaOaepParamsDeprecated&, const CryptoKeyRSA&, const CryptoOperationData&, VectorCallback&&, VoidCallback&& failureCallback); -
trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp
r208669 r208891 34 34 namespace WebCore { 35 35 36 void CryptoAlgorithmAES_CBC::platformEncrypt(std::unique_ptr<CryptoAlgorithmParameters>&&, Ref<CryptoKey>&&, Vector<uint8_t>&&, VectorCallback&&, ExceptionCallback&&, ScriptExecutionContext&, WorkQueue&) 37 { 38 notImplemented(); 39 } 40 36 41 ExceptionOr<void> CryptoAlgorithmAES_CBC::platformEncrypt(const CryptoAlgorithmAesCbcParamsDeprecated&, const CryptoKeyAES&, const CryptoOperationData&, VectorCallback&&, VoidCallback&&) 37 42 { -
trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp
r208669 r208891 35 35 namespace WebCore { 36 36 37 void CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt(Ref<CryptoKey>&&, Vector<uint8_t>&&, VectorCallback&&, ExceptionCallback&&, ScriptExecutionContext&, WorkQueue&) 38 { 39 notImplemented(); 40 } 41 37 42 ExceptionOr<void> CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt(const CryptoKeyRSA&, const CryptoOperationData&, VectorCallback&&, VoidCallback&&) 38 43 { -
trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp
r208669 r208891 34 34 namespace WebCore { 35 35 36 void CryptoAlgorithmRSA_OAEP::platformEncrypt(std::unique_ptr<CryptoAlgorithmParameters>&&, Ref<CryptoKey>&&, Vector<uint8_t>&&, VectorCallback&&, ExceptionCallback&&, ScriptExecutionContext&, WorkQueue&) 37 { 38 notImplemented(); 39 } 40 36 41 ExceptionOr<void> CryptoAlgorithmRSA_OAEP::platformEncrypt(const CryptoAlgorithmRsaOaepParamsDeprecated&, const CryptoKeyRSA&, const CryptoOperationData&, VectorCallback&&, VoidCallback&&) 37 42 { -
trunk/Source/WebCore/crypto/gnutls/CryptoKeyRSAGnuTLS.cpp
r208602 r208891 96 96 } 97 97 98 void CryptoKeyRSA::generatePair(CryptoAlgorithmIdentifier algorithm, CryptoAlgorithmIdentifier hash, bool hasHash, unsigned modulusLength, const Vector<uint8_t>& publicExponent, bool extractable, CryptoKeyUsageBitmap usage, KeyPairCallback callback, VoidCallbackfailureCallback, ScriptExecutionContext* context)98 void CryptoKeyRSA::generatePair(CryptoAlgorithmIdentifier algorithm, CryptoAlgorithmIdentifier hash, bool hasHash, unsigned modulusLength, const Vector<uint8_t>& publicExponent, bool extractable, CryptoKeyUsageBitmap usage, KeyPairCallback&& callback, VoidCallback&& failureCallback, ScriptExecutionContext* context) 99 99 { 100 100 notImplemented(); -
trunk/Source/WebCore/crypto/keys/CryptoKeyRSA.h
r208737 r208891 100 100 using KeyPairCallback = WTF::Function<void(CryptoKeyPair&)>; 101 101 using VoidCallback = WTF::Function<void()>; 102 static void generatePair(CryptoAlgorithmIdentifier, CryptoAlgorithmIdentifier hash, bool hasHash, unsigned modulusLength, const Vector<uint8_t>& publicExponent, bool extractable, CryptoKeyUsageBitmap, KeyPairCallback , VoidCallbackfailureCallback, ScriptExecutionContext*);102 static void generatePair(CryptoAlgorithmIdentifier, CryptoAlgorithmIdentifier hash, bool hasHash, unsigned modulusLength, const Vector<uint8_t>& publicExponent, bool extractable, CryptoKeyUsageBitmap, KeyPairCallback&&, VoidCallback&& failureCallback, ScriptExecutionContext*); 103 103 static RefPtr<CryptoKeyRSA> importJwk(CryptoAlgorithmIdentifier, Optional<CryptoAlgorithmIdentifier> hash, JsonWebKey&&, bool extractable, CryptoKeyUsageBitmap); 104 104 -
trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp
r208669 r208891 29 29 #if ENABLE(SUBTLE_CRYPTO) 30 30 31 #include "CryptoAlgorithmAesCbcParams.h" 31 32 #include "CryptoAlgorithmAesCbcParamsDeprecated.h" 32 33 #include "CryptoKeyAES.h" 34 #include "ExceptionCode.h" 35 #include "ScriptExecutionContext.h" 33 36 #include <CommonCrypto/CommonCrypto.h> 34 37 35 38 namespace WebCore { 36 39 37 static void transformAES_CBC(CCOperation operation, const CryptoAlgorithmAesCbcParamsDeprecated& parameters, const CryptoKeyAES& key, const CryptoOperationData& data, CryptoAlgorithm::VectorCallback&& callback, CryptoAlgorithm::VoidCallback&& failureCallback) 40 // FIXME: We should change iv and data to Vector<uint8_t> type once WebKitSubtleCrypto is deprecated. 41 // https://bugs.webkit.org/show_bug.cgi?id=164939 42 static ExceptionOr<Vector<uint8_t>> transformAES_CBC(CCOperation operation, const uint8_t* iv, const Vector<uint8_t>& key, const uint8_t* data, size_t dataLength) 38 43 { 39 static_assert(sizeof(parameters.iv) == kCCBlockSizeAES128, "Initialization vector size must be the same as algorithm block size"); 40 41 size_t keyLengthInBytes = key.key().size(); 42 if (keyLengthInBytes != 16 && keyLengthInBytes != 24 && keyLengthInBytes != 32) { 43 failureCallback(); 44 return; 45 } 46 44 size_t keyLengthInBytes = key.size(); 47 45 CCCryptorRef cryptor; 48 46 #if PLATFORM(COCOA) … … 51 49 CCAlgorithm aesAlgorithm = kCCAlgorithmAES128; 52 50 #endif 53 CCCryptorStatus status = CCCryptorCreate(operation, aesAlgorithm, kCCOptionPKCS7Padding, key.key().data(), keyLengthInBytes, parameters.iv.data(), &cryptor); 54 if (status) { 55 failureCallback(); 56 return; 57 } 51 CCCryptorStatus status = CCCryptorCreate(operation, aesAlgorithm, kCCOptionPKCS7Padding, key.data(), keyLengthInBytes, iv, &cryptor); 52 if (status) 53 return Exception { OperationError }; 58 54 59 Vector<uint8_t> result(CCCryptorGetOutputLength(cryptor, data .second, true));55 Vector<uint8_t> result(CCCryptorGetOutputLength(cryptor, dataLength, true)); 60 56 61 57 size_t bytesWritten; 62 status = CCCryptorUpdate(cryptor, data.first, data.second, result.data(), result.size(), &bytesWritten); 63 if (status) { 64 failureCallback(); 65 return; 66 } 58 status = CCCryptorUpdate(cryptor, data, dataLength, result.data(), result.size(), &bytesWritten); 59 if (status) 60 return Exception { OperationError }; 67 61 68 62 uint8_t* p = result.data() + bytesWritten; 69 63 status = CCCryptorFinal(cryptor, p, result.end() - p, &bytesWritten); 70 64 p += bytesWritten; 71 if (status) { 72 failureCallback(); 73 return; 74 } 65 if (status) 66 return Exception { OperationError }; 75 67 76 68 ASSERT(p <= result.end()); … … 79 71 CCCryptorRelease(cryptor); 80 72 81 callback(result); 73 return WTFMove(result); 74 } 75 76 void CryptoAlgorithmAES_CBC::platformEncrypt(std::unique_ptr<CryptoAlgorithmParameters>&& parameters, Ref<CryptoKey>&& key, Vector<uint8_t>&& plainText, VectorCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext& context, WorkQueue& workQueue) 77 { 78 context.ref(); 79 workQueue.dispatch([parameters = WTFMove(parameters), key = WTFMove(key), plainText = WTFMove(plainText), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), &context]() mutable { 80 auto& aesParameters = downcast<CryptoAlgorithmAesCbcParams>(*parameters); 81 auto& aesKey = downcast<CryptoKeyAES>(key.get()); 82 ASSERT(aesParameters.ivVector().size() == kCCBlockSizeAES128); 83 auto result = transformAES_CBC(kCCEncrypt, aesParameters.ivVector().data(), aesKey.key(), plainText.data(), plainText.size()); 84 if (result.hasException()) { 85 context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code()](ScriptExecutionContext& context) { 86 exceptionCallback(ec); 87 context.deref(); 88 }); 89 return; 90 } 91 context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue()](ScriptExecutionContext& context) { 92 callback(result); 93 context.deref(); 94 }); 95 }); 82 96 } 83 97 84 98 ExceptionOr<void> CryptoAlgorithmAES_CBC::platformEncrypt(const CryptoAlgorithmAesCbcParamsDeprecated& parameters, const CryptoKeyAES& key, const CryptoOperationData& data, VectorCallback&& callback, VoidCallback&& failureCallback) 85 99 { 86 transformAES_CBC(kCCEncrypt, parameters, key, data, WTFMove(callback), WTFMove(failureCallback)); 100 ASSERT(sizeof(parameters.iv) == kCCBlockSizeAES128); 101 auto result = transformAES_CBC(kCCEncrypt, parameters.iv.data(), key.key(), data.first, data.second); 102 if (result.hasException()) { 103 failureCallback(); 104 return { }; 105 } 106 callback(result.releaseReturnValue()); 87 107 return { }; 88 108 } … … 90 110 ExceptionOr<void> CryptoAlgorithmAES_CBC::platformDecrypt(const CryptoAlgorithmAesCbcParamsDeprecated& parameters, const CryptoKeyAES& key, const CryptoOperationData& data, VectorCallback&& callback, VoidCallback&& failureCallback) 91 111 { 92 transformAES_CBC(kCCDecrypt, parameters, key, data, WTFMove(callback), WTFMove(failureCallback)); 112 ASSERT(sizeof(parameters.iv) == kCCBlockSizeAES128); 113 auto result = transformAES_CBC(kCCDecrypt, parameters.iv.data(), key.key(), data.first, data.second); 114 if (result.hasException()) { 115 failureCallback(); 116 return { }; 117 } 118 callback(result.releaseReturnValue()); 93 119 return { }; 94 120 } -
trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp
r208669 r208891 31 31 #include "CommonCryptoUtilities.h" 32 32 #include "CryptoKeyRSA.h" 33 #include "ExceptionCode.h" 34 #include "ScriptExecutionContext.h" 33 35 34 36 namespace WebCore { 35 37 38 // FIXME: We should change data to Vector<uint8_t> type once WebKitSubtleCrypto is deprecated. 39 // https://bugs.webkit.org/show_bug.cgi?id=164939 40 static ExceptionOr<Vector<uint8_t>> encryptRSAES_PKCS1_v1_5(const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength) 41 { 42 Vector<uint8_t> cipherText(keyLength / 8); // Per Step 3.c of https://tools.ietf.org/html/rfc3447#section-7.2.1 43 size_t cipherTextLength = cipherText.size(); 44 if (CCRSACryptorEncrypt(key, ccPKCS1Padding, data, dataLength, cipherText.data(), &cipherTextLength, 0, 0, kCCDigestNone)) 45 return Exception { OperationError }; 46 47 return WTFMove(cipherText); 48 } 49 50 void CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt(Ref<CryptoKey>&& key, Vector<uint8_t>&& plainText, VectorCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext& context, WorkQueue& workQueue) 51 { 52 context.ref(); 53 workQueue.dispatch([key = WTFMove(key), plainText = WTFMove(plainText), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), &context]() mutable { 54 auto& rsaKey = downcast<CryptoKeyRSA>(key.get()); 55 auto result = encryptRSAES_PKCS1_v1_5(rsaKey.platformKey(), rsaKey.keySizeInBits(), plainText.data(), plainText.size()); 56 if (result.hasException()) { 57 context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code()](ScriptExecutionContext& context) { 58 exceptionCallback(ec); 59 context.deref(); 60 }); 61 return; 62 } 63 context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue()](ScriptExecutionContext& context) { 64 callback(result); 65 context.deref(); 66 }); 67 }); 68 } 69 36 70 ExceptionOr<void> CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt(const CryptoKeyRSA& key, const CryptoOperationData& data, VectorCallback&& callback, VoidCallback&& failureCallback) 37 71 { 38 Vector<uint8_t> cipherText(1024); 39 size_t cipherTextLength = cipherText.size(); 40 CCCryptorStatus status = CCRSACryptorEncrypt(key.platformKey(), ccPKCS1Padding, data.first, data.second, cipherText.data(), &cipherTextLength, 0, 0, kCCDigestNone); 41 if (status) { 72 auto result = encryptRSAES_PKCS1_v1_5(key.platformKey(), key.keySizeInBits(), data.first, data.second); 73 if (result.hasException()) { 42 74 failureCallback(); 43 75 return { }; 44 76 } 45 46 cipherText.resize(cipherTextLength); 47 callback(cipherText); 77 callback(result.releaseReturnValue()); 48 78 return { }; 49 79 } 50 80 81 // FIXME: We should get rid of the magic number 1024. It only makes sense when key length < 8192 bits 51 82 ExceptionOr<void> CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt(const CryptoKeyRSA& key, const CryptoOperationData& data, VectorCallback&& callback, VoidCallback&& failureCallback) 52 83 { -
trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp
r208669 r208891 30 30 31 31 #include "CommonCryptoUtilities.h" 32 #include "CryptoAlgorithmRsaOaepParams.h" 32 33 #include "CryptoAlgorithmRsaOaepParamsDeprecated.h" 33 34 #include "CryptoKeyRSA.h" 34 35 #include "ExceptionCode.h" 36 #include "ScriptExecutionContext.h" 35 37 36 38 namespace WebCore { 37 39 40 // FIXME: We should change data to Vector<uint8_t> type once WebKitSubtleCrypto is deprecated. 41 // https://bugs.webkit.org/show_bug.cgi?id=164939 42 static ExceptionOr<Vector<uint8_t>> encryptRSA_OAEP(CryptoAlgorithmIdentifier hash, const Vector<uint8_t>& label, const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength) 43 { 44 CCDigestAlgorithm digestAlgorithm; 45 if (!getCommonCryptoDigestAlgorithm(hash, digestAlgorithm)) 46 return Exception { OperationError }; 47 48 Vector<uint8_t> cipherText(keyLength / 8); // Per Step 3.c of https://tools.ietf.org/html/rfc3447#section-7.1.1 49 size_t cipherTextLength = cipherText.size(); 50 if (CCRSACryptorEncrypt(key, ccOAEPPadding, data, dataLength, cipherText.data(), &cipherTextLength, label.data(), label.size(), digestAlgorithm)) 51 return Exception { OperationError }; 52 53 return WTFMove(cipherText); 54 } 55 56 void CryptoAlgorithmRSA_OAEP::platformEncrypt(std::unique_ptr<CryptoAlgorithmParameters>&& parameters, Ref<CryptoKey>&& key, Vector<uint8_t>&& plainText, VectorCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext& context, WorkQueue& workQueue) 57 { 58 context.ref(); 59 workQueue.dispatch([parameters = WTFMove(parameters), key = WTFMove(key), plainText = WTFMove(plainText), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), &context]() mutable { 60 auto& rsaParameters = downcast<CryptoAlgorithmRsaOaepParams>(*parameters); 61 auto& rsaKey = downcast<CryptoKeyRSA>(key.get()); 62 auto result = encryptRSA_OAEP(rsaKey.hashAlgorithmIdentifier(), rsaParameters.labelVector(), rsaKey.platformKey(), rsaKey.keySizeInBits(), plainText.data(), plainText.size()); 63 if (result.hasException()) { 64 context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code()](ScriptExecutionContext& context) { 65 exceptionCallback(ec); 66 context.deref(); 67 }); 68 return; 69 } 70 context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue()](ScriptExecutionContext& context) { 71 callback(result); 72 context.deref(); 73 }); 74 }); 75 } 76 38 77 ExceptionOr<void> CryptoAlgorithmRSA_OAEP::platformEncrypt(const CryptoAlgorithmRsaOaepParamsDeprecated& parameters, const CryptoKeyRSA& key, const CryptoOperationData& data, VectorCallback&& callback, VoidCallback&& failureCallback) 39 78 { 40 CCDigestAlgorithm digestAlgorithm;41 if (!getCommonCryptoDigestAlgorithm(parameters.hash, digestAlgorithm))42 return Exception { NOT_SUPPORTED_ERR };43 44 Vector<uint8_t> cipherText(1024);45 size_t cipherTextLength = cipherText.size();46 79 ASSERT(parameters.hasLabel || parameters.label.isEmpty()); 47 CCCryptorStatus status = CCRSACryptorEncrypt(key.platformKey(), ccOAEPPadding, data.first, data.second, cipherText.data(), &cipherTextLength, parameters.label.data(), parameters.label.size(), digestAlgorithm);48 if ( status) {80 auto result = encryptRSA_OAEP(parameters.hash, parameters.label, key.platformKey(), key.keySizeInBits(), data.first, data.second); 81 if (result.hasException()) { 49 82 failureCallback(); 50 83 return { }; 51 84 } 52 53 cipherText.resize(cipherTextLength); 54 callback(cipherText); 85 callback(result.releaseReturnValue()); 55 86 return { }; 56 87 } 57 88 89 // FIXME: We should get rid of the magic number 1024. It only makes sense when key length < 8192 bits 58 90 ExceptionOr<void> CryptoAlgorithmRSA_OAEP::platformDecrypt(const CryptoAlgorithmRsaOaepParamsDeprecated& parameters, const CryptoKeyRSA& key, const CryptoOperationData& data, VectorCallback&& callback, VoidCallback&& failureCallback) 59 91 { -
trunk/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp
r208801 r208891 38 38 namespace WebCore { 39 39 40 // FIXME: We should get rid of magic number 16384. It assumes that the length of provided key will not exceed 16KB. 41 // https://bugs.webkit.org/show_bug.cgi?id=164942 40 42 static CCCryptorStatus getPublicKeyComponents(CCRSACryptorRef rsaKey, Vector<uint8_t>& modulus, Vector<uint8_t>& publicExponent) 41 43 { … … 234 236 } 235 237 236 void CryptoKeyRSA::generatePair(CryptoAlgorithmIdentifier algorithm, CryptoAlgorithmIdentifier hash, bool hasHash, unsigned modulusLength, const Vector<uint8_t>& publicExponent, bool extractable, CryptoKeyUsageBitmap usage, KeyPairCallback callback, VoidCallback failureCallback, ScriptExecutionContext* context) 238 // FIXME: We should use WorkQueue here instead of dispatch_async once WebKitSubtleCrypto is deprecated. 239 // https://bugs.webkit.org/show_bug.cgi?id=164943 240 void CryptoKeyRSA::generatePair(CryptoAlgorithmIdentifier algorithm, CryptoAlgorithmIdentifier hash, bool hasHash, unsigned modulusLength, const Vector<uint8_t>& publicExponent, bool extractable, CryptoKeyUsageBitmap usage, KeyPairCallback&& callback, VoidCallback&& failureCallback, ScriptExecutionContext* context) 237 241 { 238 242 uint32_t e; -
trunk/Source/WebCore/crypto/parameters/AesCbcParams.idl
r208890 r208891 24 24 */ 25 25 26 #include "config.h" 27 #include "SubtleCrypto.h" 28 29 #if ENABLE(SUBTLE_CRYPTO) 30 31 namespace WebCore { 32 33 SubtleCrypto::SubtleCrypto(ScriptExecutionContext& context) 34 : ContextDestructionObserver(&context) 35 { 36 } 37 38 } 39 40 #endif 26 [ 27 Conditional=SUBTLE_CRYPTO, 28 ImplementedAs=CryptoAlgorithmAesCbcParams 29 ] dictionary AesCbcParams : CryptoAlgorithmParameters { 30 // The initialization vector. MUST be 16 bytes. 31 required BufferSource iv; 32 }; -
trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParams.h
r208890 r208891 26 26 #pragma once 27 27 28 #include " ContextDestructionObserver.h"29 #include <wtf/Ref.h>30 #include <wtf/ RefCounted.h>28 #include "BufferSource.h" 29 #include "CryptoAlgorithmParameters.h" 30 #include <wtf/Vector.h> 31 31 32 32 #if ENABLE(SUBTLE_CRYPTO) … … 34 34 namespace WebCore { 35 35 36 class SubtleCrypto : public ContextDestructionObserver, public RefCounted<SubtleCrypto>{36 class CryptoAlgorithmAesCbcParams final : public CryptoAlgorithmParameters { 37 37 public: 38 enum class KeyFormat { Raw, Spki, Pkcs8, Jwk };38 BufferSource iv; 39 39 40 static Ref<SubtleCrypto> create(ScriptExecutionContext& context) { return adoptRef(*new SubtleCrypto(context)); } 40 Class parametersClass() const final { return Class::AesCbcParams; } 41 42 const Vector<uint8_t>& ivVector() 43 { 44 if (!m_ivVector.isEmpty() || !iv.length()) 45 return m_ivVector; 46 47 m_ivVector.append(iv.data(), iv.length()); 48 return m_ivVector; 49 } 41 50 42 51 private: 43 SubtleCrypto(ScriptExecutionContext&);52 Vector<uint8_t> m_ivVector; 44 53 }; 45 54 46 } 55 } // namespace WebCore 47 56 48 #endif 57 SPECIALIZE_TYPE_TRAITS_CRYPTO_ALGORITHM_PARAMETERS(AesCbcParams) 58 59 #endif // ENABLE(SUBTLE_CRYPTO) -
trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParamsDeprecated.h
r207809 r208891 36 36 public: 37 37 // The initialization vector. MUST be 16 bytes. 38 std::array< char, 16> iv;38 std::array<uint8_t, 16> iv; 39 39 40 40 Class parametersClass() const override { return Class::AesCbcParams; } -
trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmRsaOaepParams.h
r208890 r208891 26 26 #pragma once 27 27 28 #include " CryptoAlgorithmIdentifier.h"29 #include <wtf/TypeCasts.h>30 #include <wtf/ text/WTFString.h>28 #include "BufferSource.h" 29 #include "CryptoAlgorithmParameters.h" 30 #include <wtf/Vector.h> 31 31 32 32 #if ENABLE(SUBTLE_CRYPTO) … … 34 34 namespace WebCore { 35 35 36 class CryptoAlgorithm Parameters {36 class CryptoAlgorithmRsaOaepParams final : public CryptoAlgorithmParameters { 37 37 public: 38 enum class Class { 39 None, 40 AesKeyGenParams, 41 HmacKeyParams, 42 RsaHashedKeyGenParams, 43 RsaHashedImportParams, 44 RsaKeyGenParams, 45 }; 38 // Use labelVector() instead of label. The label will be gone once labelVector() is called. 39 Optional<BufferSource::VariantType> label; 46 40 47 // FIXME: Consider merging name and identifier. 48 String name; 49 CryptoAlgorithmIdentifier identifier; 41 Class parametersClass() const final { return Class::RsaOaepParams; } 50 42 51 virtual ~CryptoAlgorithmParameters() { } 43 const Vector<uint8_t>& labelVector() 44 { 45 if (!m_labelVector.isEmpty() || !label) 46 return m_labelVector; 52 47 53 virtual Class parametersClass() const { return Class::None; } 48 m_labelBuffer = WTFMove(*label); 49 label = Nullopt; 50 if (!m_labelBuffer.length()) 51 return m_labelVector; 52 53 m_labelVector.append(m_labelBuffer.data(), m_labelBuffer.length()); 54 return m_labelVector; 55 } 56 57 private: 58 Vector<uint8_t> m_labelVector; 59 BufferSource m_labelBuffer; 54 60 }; 55 61 56 62 } // namespace WebCore 57 63 58 #define SPECIALIZE_TYPE_TRAITS_CRYPTO_ALGORITHM_PARAMETERS(ToClassName) \ 59 SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::CryptoAlgorithm##ToClassName) \ 60 static bool isType(const WebCore::CryptoAlgorithmParameters& parameters) { return parameters.parametersClass() == WebCore::CryptoAlgorithmParameters::Class::ToClassName; } \ 61 SPECIALIZE_TYPE_TRAITS_END() 64 SPECIALIZE_TYPE_TRAITS_CRYPTO_ALGORITHM_PARAMETERS(RsaOaepParams) 62 65 63 66 #endif // ENABLE(SUBTLE_CRYPTO)
Note: See TracChangeset
for help on using the changeset viewer.