Changeset 206883 in webkit
- Timestamp:
- Oct 6, 2016 2:32:02 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 21 added
- 11 deleted
- 21 edited
- 5 copied
- 118 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r206880 r206883 1 2016-10-06 Jiewen Tan <jiewen_tan@apple.com> 2 3 Add a dummy SubtleCrypto interface 4 https://bugs.webkit.org/show_bug.cgi?id=162992 5 <rdar://problem/28643573> 6 7 Reviewed by Brent Fulgham. 8 9 * crypto/resources/common.js: 10 * crypto/subtle/gc-2-expected.txt: Added. 11 * crypto/subtle/gc-2.html: Added. 12 * crypto/subtle/gc-3-expected.txt: Added. 13 * crypto/subtle/gc-3.html: Added. 14 * crypto/subtle/gc-expected.txt: Added. 15 * crypto/subtle/gc.html: Added. 16 * crypto/webkitSubtle/aes-cbc-192-encrypt-decrypt-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt-expected.txt. 17 * crypto/webkitSubtle/aes-cbc-192-encrypt-decrypt.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt.html. 18 * crypto/webkitSubtle/aes-cbc-256-encrypt-decrypt-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt-expected.txt. 19 * crypto/webkitSubtle/aes-cbc-256-encrypt-decrypt.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt.html. 20 * crypto/webkitSubtle/aes-cbc-encrypt-decrypt-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-expected.txt. 21 * crypto/webkitSubtle/aes-cbc-encrypt-decrypt-with-padding-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding-expected.txt. 22 * crypto/webkitSubtle/aes-cbc-encrypt-decrypt-with-padding.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html. 23 * crypto/webkitSubtle/aes-cbc-encrypt-decrypt.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt.html. 24 * crypto/webkitSubtle/aes-cbc-generate-key-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-generate-key-expected.txt. 25 * crypto/webkitSubtle/aes-cbc-generate-key.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-generate-key.html. 26 * crypto/webkitSubtle/aes-cbc-import-jwk-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-import-jwk-expected.txt. 27 * crypto/webkitSubtle/aes-cbc-import-jwk.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-import-jwk.html. 28 * crypto/webkitSubtle/aes-cbc-invalid-length-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-invalid-length-expected.txt. 29 * crypto/webkitSubtle/aes-cbc-invalid-length.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-invalid-length.html. 30 * crypto/webkitSubtle/aes-cbc-unwrap-failure-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-unwrap-failure-expected.txt. 31 * crypto/webkitSubtle/aes-cbc-unwrap-failure.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-unwrap-failure.html. 32 * crypto/webkitSubtle/aes-cbc-unwrap-rsa-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-unwrap-rsa-expected.txt. 33 * crypto/webkitSubtle/aes-cbc-unwrap-rsa.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-unwrap-rsa.html. 34 * crypto/webkitSubtle/aes-cbc-wrap-rsa-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrap-rsa-expected.txt. 35 * crypto/webkitSubtle/aes-cbc-wrap-rsa-non-extractable-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrap-rsa-non-extractable-expected.txt. 36 * crypto/webkitSubtle/aes-cbc-wrap-rsa-non-extractable.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html. 37 * crypto/webkitSubtle/aes-cbc-wrap-rsa.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrap-rsa.html. 38 * crypto/webkitSubtle/aes-cbc-wrong-key-class-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrong-key-class-expected.txt. 39 * crypto/webkitSubtle/aes-cbc-wrong-key-class.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrong-key-class.html. 40 * crypto/webkitSubtle/aes-export-key-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-export-key-expected.txt. 41 * crypto/webkitSubtle/aes-export-key.html: Renamed from LayoutTests/crypto/subtle/aes-export-key.html. 42 * crypto/webkitSubtle/aes-kw-key-manipulation-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-kw-key-manipulation-expected.txt. 43 * crypto/webkitSubtle/aes-kw-key-manipulation.html: Renamed from LayoutTests/crypto/subtle/aes-kw-key-manipulation.html. 44 * crypto/webkitSubtle/aes-kw-wrap-unwrap-aes-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes-expected.txt. 45 * crypto/webkitSubtle/aes-kw-wrap-unwrap-aes.html: Renamed from LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes.html. 46 * crypto/webkitSubtle/aes-postMessage-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-postMessage-expected.txt. 47 * crypto/webkitSubtle/aes-postMessage.html: Renamed from LayoutTests/crypto/subtle/aes-postMessage.html. 48 * crypto/webkitSubtle/argument-conversion-expected.txt: Renamed from LayoutTests/crypto/subtle/argument-conversion-expected.txt. 49 * crypto/webkitSubtle/argument-conversion.html: Renamed from LayoutTests/crypto/subtle/argument-conversion.html. 50 * crypto/webkitSubtle/array-buffer-view-offset-expected.txt: Renamed from LayoutTests/crypto/subtle/array-buffer-view-offset-expected.txt. 51 * crypto/webkitSubtle/array-buffer-view-offset.html: Renamed from LayoutTests/crypto/subtle/array-buffer-view-offset.html. 52 * crypto/webkitSubtle/crypto-key-algorithm-gc-expected.txt: Renamed from LayoutTests/crypto/subtle/crypto-key-algorithm-gc-expected.txt. 53 * crypto/webkitSubtle/crypto-key-algorithm-gc.html: Renamed from LayoutTests/crypto/subtle/crypto-key-algorithm-gc.html. 54 * crypto/webkitSubtle/crypto-key-usages-gc-expected.txt: Renamed from LayoutTests/crypto/subtle/crypto-key-usages-gc-expected.txt. 55 * crypto/webkitSubtle/crypto-key-usages-gc.html: Renamed from LayoutTests/crypto/subtle/crypto-key-usages-gc.html. 56 * crypto/webkitSubtle/hmac-check-algorithm-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-check-algorithm-expected.txt. 57 * crypto/webkitSubtle/hmac-check-algorithm.html: Renamed from LayoutTests/crypto/subtle/hmac-check-algorithm.html. 58 * crypto/webkitSubtle/hmac-export-key-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-export-key-expected.txt. 59 * crypto/webkitSubtle/hmac-export-key.html: Renamed from LayoutTests/crypto/subtle/hmac-export-key.html. 60 * crypto/webkitSubtle/hmac-generate-key-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-export-key.html. 61 * crypto/webkitSubtle/hmac-generate-key.html: Renamed from LayoutTests/crypto/subtle/hmac-generate-key.html. 62 * crypto/webkitSubtle/hmac-import-jwk-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-import-jwk-expected.txt. 63 * crypto/webkitSubtle/hmac-import-jwk.html: Renamed from LayoutTests/crypto/subtle/hmac-import-jwk.html. 64 * crypto/webkitSubtle/hmac-postMessage-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-postMessage-expected.txt. 65 * crypto/webkitSubtle/hmac-postMessage.html: Renamed from LayoutTests/crypto/subtle/hmac-postMessage.html. 66 * crypto/webkitSubtle/hmac-sign-verify-empty-key-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-sign-verify-empty-key-expected.txt. 67 * crypto/webkitSubtle/hmac-sign-verify-empty-key.html: Renamed from LayoutTests/crypto/subtle/hmac-sign-verify-empty-key.html. 68 * crypto/webkitSubtle/hmac-sign-verify-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-sign-verify-expected.txt. 69 * crypto/webkitSubtle/hmac-sign-verify.html: Renamed from LayoutTests/crypto/subtle/hmac-sign-verify.html. 70 * crypto/webkitSubtle/import-jwk-expected.txt: Renamed from LayoutTests/crypto/subtle/import-jwk-expected.txt. 71 * crypto/webkitSubtle/import-jwk.html: Renamed from LayoutTests/crypto/subtle/import-jwk-expected.html. 72 * crypto/webkitSubtle/jwk-export-use-values-expected.txt: Renamed from LayoutTests/crypto/subtle/jwk-export-use-values-expected.txt. 73 * crypto/webkitSubtle/jwk-export-use-values.html: Renamed from LayoutTests/crypto/subtle/jwk-export-use-values.html. 74 * crypto/webkitSubtle/jwk-import-use-values-expected.txt: Renamed from LayoutTests/crypto/subtle/jwk-import-use-values-expected.txt. 75 * crypto/webkitSubtle/jwk-import-use-values.html: Renamed from LayoutTests/crypto/subtle/jwk-import-use-values.html. 76 * crypto/webkitSubtle/resources/rsa-indexeddb-non-exportable.js: Renamed from LayoutTests/crypto/subtle/resources/rsa-indexeddb-non-exportable.js. 77 * crypto/webkitSubtle/resources/rsa-indexeddb.js: Renamed from LayoutTests/crypto/subtle/resources/rsa-indexeddb.js. 78 * crypto/webkitSubtle/rsa-export-generated-keys-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-export-generated-keys-expected.txt. 79 * crypto/webkitSubtle/rsa-export-generated-keys.html: Renamed from LayoutTests/crypto/subtle/rsa-export-generated-keys.html. 80 * crypto/webkitSubtle/rsa-export-key-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-export-key-expected.txt. 81 * crypto/webkitSubtle/rsa-export-key.html: Renamed from LayoutTests/crypto/subtle/rsa-export-key.html. 82 * crypto/webkitSubtle/rsa-export-private-key-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-export-private-key-expected.txt. 83 * crypto/webkitSubtle/rsa-export-private-key.html: Renamed from LayoutTests/crypto/subtle/rsa-export-private-key.html. 84 * crypto/webkitSubtle/rsa-indexeddb-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-expected.txt. 85 * crypto/webkitSubtle/rsa-indexeddb-non-exportable-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable-expected.txt. 86 * crypto/webkitSubtle/rsa-indexeddb-non-exportable-private-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable-private-expected.txt. 87 * crypto/webkitSubtle/rsa-indexeddb-non-exportable-private.html: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable-private.html. 88 * crypto/webkitSubtle/rsa-indexeddb-non-exportable.html: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable.html. 89 * crypto/webkitSubtle/rsa-indexeddb-private-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-private-expected.txt. 90 * crypto/webkitSubtle/rsa-indexeddb-private.html: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-private.html. 91 * crypto/webkitSubtle/rsa-indexeddb.html: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb.html. 92 * crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-oaep-generate-non-extractable-key-expected.txt. 93 * crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key.html: Renamed from LayoutTests/crypto/subtle/rsa-oaep-generate-non-extractable-key.html. 94 * crypto/webkitSubtle/rsa-oaep-key-manipulation-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-oaep-key-manipulation-expected.txt. 95 * crypto/webkitSubtle/rsa-oaep-key-manipulation.html: Renamed from LayoutTests/crypto/subtle/rsa-oaep-key-manipulation.html. 96 * crypto/webkitSubtle/rsa-oaep-plaintext-length-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-oaep-plaintext-length-expected.txt. 97 * crypto/webkitSubtle/rsa-oaep-plaintext-length.html: Renamed from LayoutTests/crypto/subtle/rsa-oaep-plaintext-length.html. 98 * crypto/webkitSubtle/rsa-oaep-wrap-unwrap-aes-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes-expected.txt. 99 * crypto/webkitSubtle/rsa-oaep-wrap-unwrap-aes.html: Renamed from LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes.html. 100 * crypto/webkitSubtle/rsa-postMessage-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-postMessage-expected.txt. 101 * crypto/webkitSubtle/rsa-postMessage.html: Renamed from LayoutTests/crypto/subtle/rsa-postMessage.html. 102 * crypto/webkitSubtle/rsaes-pkcs1-v1_5-decrypt-expected.txt: Renamed from LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-decrypt-expected.txt. 103 * crypto/webkitSubtle/rsaes-pkcs1-v1_5-decrypt.html: Renamed from LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-decrypt.html. 104 * crypto/webkitSubtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt: Renamed from LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt. 105 * crypto/webkitSubtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html: Renamed from LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html. 106 * crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-expected.txt: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key-expected.txt. 107 * crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent-expected.txt: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent-expected.txt. 108 * crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html. 109 * crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key.html: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html. 110 * crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt. 111 * crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk-small-key-expected.txt: Added. 112 * crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html. 113 * crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk.html: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html. 114 * crypto/webkitSubtle/rsassa-pkcs1-v1_5-sign-verify-expected.txt: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-sign-verify-expected.txt. 115 * crypto/webkitSubtle/rsassa-pkcs1-v1_5-sign-verify.html: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-sign-verify.html. 116 * crypto/webkitSubtle/sha-1-expected.txt: Renamed from LayoutTests/crypto/subtle/sha-1-expected.txt. 117 * crypto/webkitSubtle/sha-1.html: Renamed from LayoutTests/crypto/subtle/sha-1.html. 118 * crypto/webkitSubtle/sha-224-expected.txt: Renamed from LayoutTests/crypto/subtle/sha-224-expected.txt. 119 * crypto/webkitSubtle/sha-224.html: Renamed from LayoutTests/crypto/subtle/sha-224.html. 120 * crypto/webkitSubtle/sha-256-expected.txt: Renamed from LayoutTests/crypto/subtle/sha-256-expected.txt. 121 * crypto/webkitSubtle/sha-256.html: Renamed from LayoutTests/crypto/subtle/sha-256.html. 122 * crypto/webkitSubtle/sha-384-expected.txt: Renamed from LayoutTests/crypto/subtle/sha-384-expected.txt. 123 * crypto/webkitSubtle/sha-384.html: Renamed from LayoutTests/crypto/subtle/sha-384.html. 124 * crypto/webkitSubtle/sha-512-expected.txt: Renamed from LayoutTests/crypto/subtle/sha-512-expected.txt. 125 * crypto/webkitSubtle/sha-512.html: Renamed from LayoutTests/crypto/subtle/sha-512.html. 126 * crypto/webkitSubtle/unimplemented-unwrap-crash-expected.txt: Renamed from LayoutTests/crypto/subtle/unimplemented-unwrap-crash-expected.txt. 127 * crypto/webkitSubtle/unimplemented-unwrap-crash.html: Renamed from LayoutTests/crypto/subtle/unimplemented-unwrap-crash.html. 128 * crypto/webkitSubtle/unwrapKey-check-usage-expected.txt: Renamed from LayoutTests/crypto/subtle/unwrapKey-check-usage-expected.txt. 129 * crypto/webkitSubtle/unwrapKey-check-usage.html: Renamed from LayoutTests/crypto/subtle/unwrapKey-check-usage.html. 130 * crypto/webkitSubtle/wrapKey-check-usage-expected.txt: Renamed from LayoutTests/crypto/subtle/wrapKey-check-usage-expected.txt. 131 * crypto/webkitSubtle/wrapKey-check-usage.html: Renamed from LayoutTests/crypto/subtle/wrapKey-check-usage.html. 132 * crypto/workers/subtle/aes-postMessage-worker-expected.txt: Renamed from LayoutTests/crypto/workers/aes-postMessage-worker-expected.txt. 133 * crypto/workers/subtle/aes-postMessage-worker.html: Renamed from LayoutTests/crypto/workers/aes-postMessage-worker.html. 134 * crypto/workers/subtle/gc-worker-expected.txt: Added. 135 * crypto/workers/subtle/gc-worker.html: Added. 136 * crypto/workers/subtle/hmac-postMessage-worker-expected.txt: Renamed from LayoutTests/crypto/workers/hmac-postMessage-worker-expected.txt. 137 * crypto/workers/subtle/hmac-postMessage-worker.html: Renamed from LayoutTests/crypto/workers/hmac-postMessage-worker.html. 138 * crypto/workers/subtle/hrsa-postMessage-worker-expected.txt: Renamed from LayoutTests/crypto/workers/hrsa-postMessage-worker-expected.txt. 139 * crypto/workers/subtle/hrsa-postMessage-worker.html: Renamed from LayoutTests/crypto/workers/hrsa-postMessage-worker.html. 140 * crypto/workers/subtle/multiple-postMessage-worker-expected.txt: Renamed from LayoutTests/crypto/workers/multiple-postMessage-worker-expected.txt. 141 * crypto/workers/subtle/multiple-postMessage-worker.html: Renamed from LayoutTests/crypto/workers/multiple-postMessage-worker.html. 142 * crypto/workers/subtle/resources/aes-postMessage-worker.js: Renamed from LayoutTests/crypto/workers/resources/aes-postMessage-worker.js. 143 * crypto/workers/subtle/resources/gc-worker.js: Added. 144 * crypto/workers/subtle/resources/hmac-postMessage-worker.js: Renamed from LayoutTests/crypto/workers/resources/hmac-postMessage-worker.js. 145 * crypto/workers/subtle/resources/hrsa-postMessage-worker.js: Renamed from LayoutTests/crypto/workers/resources/hrsa-postMessage-worker.js. 146 * crypto/workers/subtle/resources/rsa-postMessage-worker.js: Renamed from LayoutTests/crypto/workers/resources/rsa-postMessage-worker.js. 147 * crypto/workers/subtle/rsa-postMessage-worker-expected.txt: Renamed from LayoutTests/crypto/workers/rsa-postMessage-worker-expected.txt. 148 * crypto/workers/subtle/rsa-postMessage-worker.html: Renamed from LayoutTests/crypto/workers/rsa-postMessage-worker.html. 149 * platform/efl/TestExpectations: 150 * platform/gtk/TestExpectations: 151 * platform/ios-simulator-wk1/TestExpectations: 152 * platform/win/TestExpectations: 153 1 154 2016-10-06 Antti Koivisto <antti@apple.com> 2 155 -
trunk/LayoutTests/crypto/resources/common.js
r206627 r206883 81 81 } 82 82 }; 83 84 if (!(typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) && !crypto.subtle)85 crypto.subtle = crypto.webkitSubtle; -
trunk/LayoutTests/crypto/subtle/gc-expected.txt
r206882 r206883 1 Make sure that unwrap does not cause a crash.1 Test that window.crypto.subtle wrapper preserves custom properties. 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 4 5 5 6 PASS window.crypto.subtle.foo is "bar" 6 7 PASS successfullyParsed is true 7 8 -
trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-192-encrypt-decrypt.html
r206882 r206883 20 20 21 21 debug("Importing a raw AES key from string literal..."); 22 crypto. subtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) {22 crypto.webkitSubtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) { 23 23 key = result; 24 24 shouldBe("key.type", "'secret'"); … … 29 29 30 30 debug("Using the key to encrypt plaintext..."); 31 return crypto. subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);31 return crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext); 32 32 }).then(function(result) { 33 33 encryptionResult = result; … … 35 35 36 36 debug("Decrypting it back..."); 37 return crypto. subtle.decrypt({name: "aes-cbc", iv: iv}, key, result);37 return crypto.webkitSubtle.decrypt({name: "aes-cbc", iv: iv}, key, result); 38 38 }).then(function(result) { 39 39 decryptionResult = result; -
trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-256-encrypt-decrypt.html
r206882 r206883 20 20 21 21 debug("Importing a raw AES key from string literal..."); 22 crypto. subtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) {22 crypto.webkitSubtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) { 23 23 key = result; 24 24 shouldBe("key.type", "'secret'"); … … 29 29 30 30 debug("Using the key to encrypt plaintext..."); 31 return crypto. subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);31 return crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext); 32 32 }).then(function(result) { 33 33 encryptionResult = result; … … 35 35 36 36 debug("Decrypting it back..."); 37 return crypto. subtle.decrypt({name: "aes-cbc", iv: iv}, key, result);37 return crypto.webkitSubtle.decrypt({name: "aes-cbc", iv: iv}, key, result); 38 38 }).then(function(result) { 39 39 decryptionResult = result; -
trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-encrypt-decrypt-expected.txt
r206882 r206883 15 15 PASS new Uint8Array(decryptionResult) is plaintext 16 16 Testing initialization vector bindings... 17 PASS crypto. subtle.encrypt({name: 'AES-CBC', iv: null}, key, plaintext) threw exception TypeError: Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData.18 PASS crypto. subtle.encrypt({name: 'AES-CBC'}, key, plaintext) threw exception TypeError: Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData.19 PASS crypto. subtle.encrypt({name: 'AES-CBC', iv: 3}, key, plaintext) threw exception TypeError: Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData.20 PASS crypto. subtle.encrypt({name: 'AES-CBC', iv: new Uint8Array([0])}, key, plaintext) threw exception Error: AES-CBC initialization data must be 16 bytes.17 PASS crypto.webkitSubtle.encrypt({name: 'AES-CBC', iv: null}, key, plaintext) threw exception TypeError: Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData. 18 PASS crypto.webkitSubtle.encrypt({name: 'AES-CBC'}, key, plaintext) threw exception TypeError: Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData. 19 PASS crypto.webkitSubtle.encrypt({name: 'AES-CBC', iv: 3}, key, plaintext) threw exception TypeError: Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData. 20 PASS crypto.webkitSubtle.encrypt({name: 'AES-CBC', iv: new Uint8Array([0])}, key, plaintext) threw exception Error: AES-CBC initialization data must be 16 bytes. 21 21 PASS successfullyParsed is true 22 22 -
trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-encrypt-decrypt-with-padding.html
r206882 r206883 20 20 21 21 debug("Importing a raw AES key from string literal..."); 22 crypto. subtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) {22 crypto.webkitSubtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) { 23 23 key = result; 24 24 shouldBe("key.type", "'secret'"); … … 29 29 30 30 debug("Using the key to encrypt plaintext..."); 31 return crypto. subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);31 return crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext); 32 32 }).then(function(result) { 33 33 cyphertext = result; … … 35 35 36 36 debug("Decrypting it back..."); 37 return crypto. subtle.decrypt({name: "aes-cbc", iv: iv}, key, result);37 return crypto.webkitSubtle.decrypt({name: "aes-cbc", iv: iv}, key, result); 38 38 }).then(function(result) { 39 39 decryptionResult = result; -
trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-encrypt-decrypt.html
r206882 r206883 20 20 21 21 debug("Importing a raw AES key from string literal..."); 22 crypto. subtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) {22 crypto.webkitSubtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) { 23 23 key = result; 24 24 shouldBe("key.type", "'secret'"); … … 29 29 30 30 debug("Using the key to encrypt plaintext..."); 31 return crypto. subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);31 return crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext); 32 32 }).then(function(result) { 33 33 encryptionResult = result; … … 35 35 36 36 debug("Decrypting it back..."); 37 return crypto. subtle.decrypt({name: "aes-cbc", iv: iv}, key, result);37 return crypto.webkitSubtle.decrypt({name: "aes-cbc", iv: iv}, key, result); 38 38 }).then(function(result) { 39 39 decryptionResult = result; … … 41 41 42 42 debug("Testing initialization vector bindings..."); 43 shouldThrow("crypto. subtle.encrypt({name: 'AES-CBC', iv: null}, key, plaintext)");44 shouldThrow("crypto. subtle.encrypt({name: 'AES-CBC'}, key, plaintext)");45 shouldThrow("crypto. subtle.encrypt({name: 'AES-CBC', iv: 3}, key, plaintext)");46 shouldThrow("crypto. subtle.encrypt({name: 'AES-CBC', iv: new Uint8Array([0])}, key, plaintext)");43 shouldThrow("crypto.webkitSubtle.encrypt({name: 'AES-CBC', iv: null}, key, plaintext)"); 44 shouldThrow("crypto.webkitSubtle.encrypt({name: 'AES-CBC'}, key, plaintext)"); 45 shouldThrow("crypto.webkitSubtle.encrypt({name: 'AES-CBC', iv: 3}, key, plaintext)"); 46 shouldThrow("crypto.webkitSubtle.encrypt({name: 'AES-CBC', iv: new Uint8Array([0])}, key, plaintext)"); 47 47 48 48 finishJSTest(); -
trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-generate-key.html
r206882 r206883 16 16 var extractable = true; 17 17 18 shouldThrow('crypto. subtle.generateKey("aes-cbc", extractable, ["encrypt", "decrypt"])');19 shouldThrow('crypto. subtle.generateKey({name: "aes-cbc"}, extractable, ["encrypt", "decrypt"])');20 shouldThrow('crypto. subtle.generateKey({name: "aes-cbc", length: undefined}, extractable, ["encrypt", "decrypt"])');21 shouldThrow('crypto. subtle.generateKey({name: "aes-cbc", length: {}}, extractable, ["encrypt", "decrypt"])');18 shouldThrow('crypto.webkitSubtle.generateKey("aes-cbc", extractable, ["encrypt", "decrypt"])'); 19 shouldThrow('crypto.webkitSubtle.generateKey({name: "aes-cbc"}, extractable, ["encrypt", "decrypt"])'); 20 shouldThrow('crypto.webkitSubtle.generateKey({name: "aes-cbc", length: undefined}, extractable, ["encrypt", "decrypt"])'); 21 shouldThrow('crypto.webkitSubtle.generateKey({name: "aes-cbc", length: {}}, extractable, ["encrypt", "decrypt"])'); 22 22 23 23 debug("Generating a key..."); 24 crypto. subtle.generateKey({name: "aes-cbc", length: 128}, extractable, ["encrypt", "decrypt"]).then(function(result) {24 crypto.webkitSubtle.generateKey({name: "aes-cbc", length: 128}, extractable, ["encrypt", "decrypt"]).then(function(result) { 25 25 key = result; 26 26 -
trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-import-jwk.html
r206882 r206883 30 30 31 31 debug("Importing a key...\n"); 32 crypto. subtle.importKey("jwk", jwkKeyAsArrayBuffer, null, false, ["encrypt"]).then(function(result) {32 crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, null, false, ["encrypt"]).then(function(result) { 33 33 key = result; 34 34 … … 40 40 41 41 debug("\nUsing the key to encrypt plaintext..."); 42 return crypto. subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);42 return crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext); 43 43 }).then(function(result) { 44 44 encryptionResult = result; -
trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-invalid-length.html
r206882 r206883 20 20 21 21 debug("Importing a raw AES key from string literal..."); 22 crypto. subtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) {22 crypto.webkitSubtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) { 23 23 key = result; 24 24 shouldBe("key.type", "'secret'"); … … 29 29 30 30 debug("Using the key to encrypt plaintext..."); 31 return crypto. subtle.encrypt({name: "aes-cbc", iv: iv}, key, [plaintext]);31 return crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, [plaintext]); 32 32 }).then(undefined, function(result) { 33 33 debug("Failed, as expected. Note that the spec doesn't appear to clearly define which step should fail."); -
trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-unwrap-failure.html
r206882 r206883 21 21 22 22 debug("Importing an unwrapping key..."); 23 crypto. subtle.importKey("raw", unwrappingKeyOctets, "AES-CBC", nonExtractable, ["unwrapKey"]).then(function(result) {23 crypto.webkitSubtle.importKey("raw", unwrappingKeyOctets, "AES-CBC", nonExtractable, ["unwrapKey"]).then(function(result) { 24 24 unwrappingKey = result; 25 25 shouldBe("unwrappingKey.algorithm.name", "'AES-CBC'"); 26 26 var unwrapAlgorithm = {name: "AES-CBC", iv: hexStringToUint8Array("000102030405060708090a0b0c0d0e0f")}; 27 27 debug("Unwrapping a key..."); 28 return crypto. subtle.unwrapKey("jwk", wrappedKey, unwrappingKey, unwrapAlgorithm, null, extractable, ["sign", "verify", "encrypt", "decrypt", "wrap", "unwrap"]);28 return crypto.webkitSubtle.unwrapKey("jwk", wrappedKey, unwrappingKey, unwrapAlgorithm, null, extractable, ["sign", "verify", "encrypt", "decrypt", "wrap", "unwrap"]); 29 29 }).then(undefined, function(result) { 30 30 testPassed("Promise rejected"); -
trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-unwrap-rsa.html
r206882 r206883 30 30 31 31 debug("Importing an unwrapping key..."); 32 crypto. subtle.importKey("raw", unwrappingKeyOctets, "AES-CBC", nonExtractable, ["unwrapKey"]).then(function(result) {32 crypto.webkitSubtle.importKey("raw", unwrappingKeyOctets, "AES-CBC", nonExtractable, ["unwrapKey"]).then(function(result) { 33 33 unwrappingKey = result; 34 34 shouldBe("unwrappingKey.algorithm.name", "'AES-CBC'"); 35 35 var unwrapAlgorithm = {name: "AES-CBC", iv: hexStringToUint8Array("000102030405060708090a0b0c0d0e0f")}; 36 36 debug("Unwrapping a key..."); 37 return crypto. subtle.unwrapKey("jwk", wrappedKey, unwrappingKey, unwrapAlgorithm, null, extractable, ["sign", "verify", "encrypt", "decrypt", "wrap", "unwrap"]);37 return crypto.webkitSubtle.unwrapKey("jwk", wrappedKey, unwrappingKey, unwrapAlgorithm, null, extractable, ["sign", "verify", "encrypt", "decrypt", "wrap", "unwrap"]); 38 38 }).then(function(result) { 39 39 unwrappedKey = result; -
trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-wrap-rsa-non-extractable.html
r206882 r206883 30 30 31 31 debug("Importing a key to wrap..."); 32 crypto. subtle.importKey("jwk", jwkKeyAsArrayBuffer, null, extractable, ["sign", "verify"]).then(function(result) {32 crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, null, extractable, ["sign", "verify"]).then(function(result) { 33 33 key = result; 34 34 shouldBe("key.algorithm.name", "'RSASSA-PKCS1-v1_5'"); 35 35 debug("Importing a key encryption key..."); 36 return crypto. subtle.importKey("raw", wrappingKeyOctets, "AES-CBC", nonExtractable, ["wrapKey"]);36 return crypto.webkitSubtle.importKey("raw", wrappingKeyOctets, "AES-CBC", nonExtractable, ["wrapKey"]); 37 37 }).then(function(result) { 38 38 wrappingKey = result; … … 40 40 var wrapAlgorithm = {name: "AES-CBC", iv: hexStringToUint8Array("000102030405060708090a0b0c0d0e0f")}; 41 41 debug("wrapping the key..."); 42 return crypto. subtle.wrapKey("jwk", key, wrappingKey, wrapAlgorithm);42 return crypto.webkitSubtle.wrapKey("jwk", key, wrappingKey, wrapAlgorithm); 43 43 }).then(undefined, function() { 44 44 testPassed("Rejected"); -
trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-wrap-rsa.html
r206882 r206883 30 30 31 31 debug("Importing a key to wrap..."); 32 crypto. subtle.importKey("jwk", jwkKeyAsArrayBuffer, null, extractable, ["sign", "verify"]).then(function(result) {32 crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, null, extractable, ["sign", "verify"]).then(function(result) { 33 33 key = result; 34 34 shouldBe("key.algorithm.name", "'RSASSA-PKCS1-v1_5'"); 35 35 debug("Importing a key encryption key..."); 36 return crypto. subtle.importKey("raw", wrappingKeyOctets, "AES-CBC", nonExtractable, ["wrapKey"]);36 return crypto.webkitSubtle.importKey("raw", wrappingKeyOctets, "AES-CBC", nonExtractable, ["wrapKey"]); 37 37 }).then(function(result) { 38 38 wrappingKey = result; 39 39 shouldBe("wrappingKey.algorithm.name", "'AES-CBC'"); 40 40 var wrapAlgorithm = {name: "AES-CBC", iv: hexStringToUint8Array("000102030405060708090a0b0c0d0e0f")}; 41 return crypto. subtle.wrapKey("jwk", key, wrappingKey, wrapAlgorithm);41 return crypto.webkitSubtle.wrapKey("jwk", key, wrappingKey, wrapAlgorithm); 42 42 }).then(function(result) { 43 43 wrappedKey = result; -
trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-wrong-key-class-expected.txt
r206882 r206883 6 6 Importing a raw HMAC key from string literal... 7 7 Using the key to encrypt plaintext... 8 PASS crypto. subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..8 PASS crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext) threw exception NotSupportedError (DOM Exception 9): The operation is not supported.. 9 9 PASS successfullyParsed is true 10 10 -
trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-wrong-key-class.html
r206882 r206883 20 20 21 21 debug("Importing a raw HMAC key from string literal..."); 22 crypto. subtle.importKey("raw", hmacKey, {name: 'hmac', hash: {name: 'sha-1'}}, extractable, ["sign", "verify", "encrypt", "decrypt"]).then(function(result) {22 crypto.webkitSubtle.importKey("raw", hmacKey, {name: 'hmac', hash: {name: 'sha-1'}}, extractable, ["sign", "verify", "encrypt", "decrypt"]).then(function(result) { 23 23 key = result; 24 24 debug("Using the key to encrypt plaintext..."); 25 shouldThrow('crypto. subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext)')25 shouldThrow('crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext)') 26 26 27 27 finishJSTest(); -
trunk/LayoutTests/crypto/webkitSubtle/aes-export-key.html
r206882 r206883 24 24 var jwkKeyAsArrayBuffer = asciiToUint8Array(JSON.stringify(jwkKey)); 25 25 26 shouldThrow('crypto. subtle.exportKey("raw")');27 shouldThrow('crypto. subtle.exportKey("raw", null)');28 shouldThrow('crypto. subtle.exportKey("raw", undefined)');29 shouldThrow('crypto. subtle.exportKey("raw", {})');30 shouldThrow('crypto. subtle.exportKey("raw", 1)');26 shouldThrow('crypto.webkitSubtle.exportKey("raw")'); 27 shouldThrow('crypto.webkitSubtle.exportKey("raw", null)'); 28 shouldThrow('crypto.webkitSubtle.exportKey("raw", undefined)'); 29 shouldThrow('crypto.webkitSubtle.exportKey("raw", {})'); 30 shouldThrow('crypto.webkitSubtle.exportKey("raw", 1)'); 31 31 32 32 debug("\nImporting a JWK key..."); 33 crypto. subtle.importKey("jwk", jwkKeyAsArrayBuffer, "AES-CBC", extractable, ['encrypt', 'decrypt', 'wrapKey', 'unwrapKey']).then(function(result) {33 crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, "AES-CBC", extractable, ['encrypt', 'decrypt', 'wrapKey', 'unwrapKey']).then(function(result) { 34 34 key = result; 35 35 36 shouldThrow('crypto. subtle.exportKey(null, key)');37 shouldThrow('crypto. subtle.exportKey(undefined, key)');38 shouldThrow('crypto. subtle.exportKey({}, key)');39 shouldThrow('crypto. subtle.exportKey("", key)');40 shouldThrow('crypto. subtle.exportKey("foobar", key)');36 shouldThrow('crypto.webkitSubtle.exportKey(null, key)'); 37 shouldThrow('crypto.webkitSubtle.exportKey(undefined, key)'); 38 shouldThrow('crypto.webkitSubtle.exportKey({}, key)'); 39 shouldThrow('crypto.webkitSubtle.exportKey("", key)'); 40 shouldThrow('crypto.webkitSubtle.exportKey("foobar", key)'); 41 41 42 42 debug("\nExporting the key as raw data..."); 43 return crypto. subtle.exportKey("raw", key);43 return crypto.webkitSubtle.exportKey("raw", key); 44 44 }).then(function(result) { 45 45 exportedData = result; … … 47 47 48 48 debug("Exporting the key as JWK..."); 49 return crypto. subtle.exportKey("jwk", key);49 return crypto.webkitSubtle.exportKey("jwk", key); 50 50 }).then(function(result) { 51 51 exportedJWK = JSON.parse(bytesToASCIIString(result)); … … 58 58 59 59 debug("\nImporting a key that's not extractable..."); 60 return crypto. subtle.importKey("jwk", jwkKeyAsArrayBuffer, "AES-CBC", nonExtractable, ['encrypt', 'decrypt', 'wrapKey', 'unwrapKey'])60 return crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, "AES-CBC", nonExtractable, ['encrypt', 'decrypt', 'wrapKey', 'unwrapKey']) 61 61 }).then(function(result) { 62 62 key = result; 63 63 64 64 debug("\nTrying to export as raw..."); 65 return crypto. subtle.exportKey("raw", key);65 return crypto.webkitSubtle.exportKey("raw", key); 66 66 }).then(function(result) { 67 67 testFailed("Promise wasn't rejected"); … … 71 71 72 72 debug("Trying to export as jwk..."); 73 return crypto. subtle.exportKey("jwk", key);73 return crypto.webkitSubtle.exportKey("jwk", key); 74 74 }).then(function(result) { 75 75 testFailed("Promise wasn't rejected"); -
trunk/LayoutTests/crypto/webkitSubtle/aes-kw-key-manipulation-expected.txt
r206882 r206883 11 11 12 12 Testing that the key can't be used with AES-CBC... 13 PASS crypto. subtle.encrypt({name: "aes-cbc", iv: iv}, key, hexStringToUint8Array("00")) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..13 PASS crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, hexStringToUint8Array("00")) threw exception NotSupportedError (DOM Exception 9): The operation is not supported.. 14 14 15 15 Exporting the key to raw... -
trunk/LayoutTests/crypto/webkitSubtle/aes-kw-key-manipulation.html
r206882 r206883 17 17 18 18 debug("Generating a key..."); 19 crypto. subtle.generateKey({name: "aes-kw", length: 256}, extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]).then(function(result) {19 crypto.webkitSubtle.generateKey({name: "aes-kw", length: 256}, extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]).then(function(result) { 20 20 key = result; 21 21 shouldBe("key.toString()", "'[object CryptoKey]'"); … … 26 26 debug("\nTesting that the key can't be used with AES-CBC..."); 27 27 iv = hexStringToUint8Array("000102030405060708090a0b0c0d0e0f"); 28 shouldThrow('crypto. subtle.encrypt({name: "aes-cbc", iv: iv}, key, hexStringToUint8Array("00"))');28 shouldThrow('crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, hexStringToUint8Array("00"))'); 29 29 30 30 debug("\nExporting the key to raw..."); 31 return crypto. subtle.exportKey('raw', key);31 return crypto.webkitSubtle.exportKey('raw', key); 32 32 }).then(function(result) { 33 33 exportedKey = result; 34 34 shouldBe("exportedKey.toString()", "'[object ArrayBuffer]'"); 35 35 debug("Importing it back..."); 36 return crypto. subtle.importKey('raw', exportedKey, "aes-kw", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]);36 return crypto.webkitSubtle.importKey('raw', exportedKey, "aes-kw", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]); 37 37 }).then(function(result) { 38 38 importedKey = result; -
trunk/LayoutTests/crypto/webkitSubtle/aes-kw-wrap-unwrap-aes.html
r206882 r206883 19 19 20 20 debug("Importing key encryption key..."); 21 crypto. subtle.importKey("raw", kekData, "aes-kw", extractable, ["wrapKey", "unwrapKey"]).then(function(result) {21 crypto.webkitSubtle.importKey("raw", kekData, "aes-kw", extractable, ["wrapKey", "unwrapKey"]).then(function(result) { 22 22 kek = result; 23 23 24 24 debug("Importing a key to be wrapped..."); 25 return crypto. subtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]);25 return crypto.webkitSubtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]); 26 26 }).then(function(result) { 27 27 key = result; 28 28 29 29 debug("Wrapping it..."); 30 return crypto. subtle.wrapKey("raw", key, kek, "aes-kw");30 return crypto.webkitSubtle.wrapKey("raw", key, kek, "aes-kw"); 31 31 }).then(function(result) { 32 32 wrappedKey = result; … … 34 34 35 35 debug("Unwrapping it..."); 36 return crypto. subtle.unwrapKey("raw", wrappedKey, kek, "aes-kw", "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]);36 return crypto.webkitSubtle.unwrapKey("raw", wrappedKey, kek, "aes-kw", "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]); 37 37 }).then(function(result) { 38 38 unwrappedKey = result; … … 45 45 46 46 debug("Exporting it..."); 47 return crypto. subtle.exportKey("raw", unwrappedKey);47 return crypto.webkitSubtle.exportKey("raw", unwrappedKey); 48 48 }).then(function(result) { 49 49 unwrappedKeyData = result; -
trunk/LayoutTests/crypto/webkitSubtle/aes-postMessage.html
r206882 r206883 24 24 }, false); 25 25 26 crypto. subtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: "aes-cbc", length: 128}, true, ["encrypt", "decrypt"]).then(function(key) {26 crypto.webkitSubtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: "aes-cbc", length: 128}, true, ["encrypt", "decrypt"]).then(function(key) { 27 27 postMessage(key, "*"); 28 28 }); -
trunk/LayoutTests/crypto/webkitSubtle/array-buffer-view-offset.html
r206882 r206883 17 17 var originalData = new Uint8Array([0xf, 0xf, 0xf, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0xf, 0xf, 0xf]); 18 18 var slicedData = new Uint8Array(originalData.buffer, 3, 11); 19 return crypto. subtle.digest({name: 'sha-1'}, slicedData);19 return crypto.webkitSubtle.digest({name: 'sha-1'}, slicedData); 20 20 }).then(function(result) { 21 21 digest = result; -
trunk/LayoutTests/crypto/webkitSubtle/crypto-key-algorithm-gc.html
r206882 r206883 13 13 14 14 debug("\nGenerating a HMAC key with default length..."); 15 crypto. subtle.generateKey({name: "hmac", hash: "sha-1"}, true, ["sign", "verify"]).then(function(result) {15 crypto.webkitSubtle.generateKey({name: "hmac", hash: "sha-1"}, true, ["sign", "verify"]).then(function(result) { 16 16 key = result; 17 17 startTest(); -
trunk/LayoutTests/crypto/webkitSubtle/crypto-key-usages-gc.html
r206882 r206883 13 13 14 14 debug("\nGenerating a HMAC key with default length..."); 15 crypto. subtle.generateKey({name: "hmac", hash: "sha-1"}, true, ["sign", "verify"]).then(function(result) {15 crypto.webkitSubtle.generateKey({name: "hmac", hash: "sha-1"}, true, ["sign", "verify"]).then(function(result) { 16 16 key = result; 17 17 startTest(); -
trunk/LayoutTests/crypto/webkitSubtle/hmac-export-key-expected.txt
r206882 r206883 5 5 6 6 Importing a JWK key... 7 PASS crypto. subtle.exportKey(null, key) threw exception TypeError: Unknown key format.8 PASS crypto. subtle.exportKey(undefined, key) threw exception TypeError: Unknown key format.9 PASS crypto. subtle.exportKey({}, key) threw exception TypeError: Unknown key format.10 PASS crypto. subtle.exportKey("", key) threw exception TypeError: Unknown key format.11 PASS crypto. subtle.exportKey("foobar", key) threw exception TypeError: Unknown key format.7 PASS crypto.webkitSubtle.exportKey(null, key) threw exception TypeError: Unknown key format. 8 PASS crypto.webkitSubtle.exportKey(undefined, key) threw exception TypeError: Unknown key format. 9 PASS crypto.webkitSubtle.exportKey({}, key) threw exception TypeError: Unknown key format. 10 PASS crypto.webkitSubtle.exportKey("", key) threw exception TypeError: Unknown key format. 11 PASS crypto.webkitSubtle.exportKey("foobar", key) threw exception TypeError: Unknown key format. 12 12 Exporting the key as raw data... 13 13 PASS bytesToHexString(new Uint8Array(exportedData)) is '6a18e49feff7f3b7e09ec89b7f6deab2f6a18e49feff7f3b7e09ec89b7f6deab' -
trunk/LayoutTests/crypto/webkitSubtle/hmac-export-key.html
r206882 r206883 25 25 26 26 debug("Importing a JWK key..."); 27 crypto. subtle.importKey("jwk", jwkKeyAsArrayBuffer, { name: "HMAC", hash: "SHA-256" }, extractable, ["sign", "verify"]).then(function(result) {27 crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, { name: "HMAC", hash: "SHA-256" }, extractable, ["sign", "verify"]).then(function(result) { 28 28 key = result; 29 29 30 shouldThrow('crypto. subtle.exportKey(null, key)');31 shouldThrow('crypto. subtle.exportKey(undefined, key)');32 shouldThrow('crypto. subtle.exportKey({}, key)');33 shouldThrow('crypto. subtle.exportKey("", key)');34 shouldThrow('crypto. subtle.exportKey("foobar", key)');30 shouldThrow('crypto.webkitSubtle.exportKey(null, key)'); 31 shouldThrow('crypto.webkitSubtle.exportKey(undefined, key)'); 32 shouldThrow('crypto.webkitSubtle.exportKey({}, key)'); 33 shouldThrow('crypto.webkitSubtle.exportKey("", key)'); 34 shouldThrow('crypto.webkitSubtle.exportKey("foobar", key)'); 35 35 36 36 debug("Exporting the key as raw data..."); 37 return crypto. subtle.exportKey("raw", key);37 return crypto.webkitSubtle.exportKey("raw", key); 38 38 }).then(function(result) { 39 39 exportedData = result; … … 41 41 42 42 debug("Exporting the key as JWK..."); 43 return crypto. subtle.exportKey("jwk", key);43 return crypto.webkitSubtle.exportKey("jwk", key); 44 44 }).then(function(result) { 45 45 exportedJWK = JSON.parse(bytesToASCIIString(result)); … … 52 52 53 53 debug("\nImporting a key that's not extractable..."); 54 return crypto. subtle.importKey("jwk", jwkKeyAsArrayBuffer, { name: "HMAC", hash: "SHA-256" }, nonExtractable, ["sign", "verify"]);54 return crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, { name: "HMAC", hash: "SHA-256" }, nonExtractable, ["sign", "verify"]); 55 55 }).then(function(result) { 56 56 key = result; 57 57 58 58 debug("\nTrying to export as raw..."); 59 return crypto. subtle.exportKey("raw", key);59 return crypto.webkitSubtle.exportKey("raw", key); 60 60 }).then(function(result) { 61 61 testFailed("Promise wasn't rejected"); … … 65 65 66 66 debug("Trying to export as jwk..."); 67 return crypto. subtle.exportKey("jwk", key);67 return crypto.webkitSubtle.exportKey("jwk", key); 68 68 }).then(function(result) { 69 69 testFailed("Promise wasn't rejected"); -
trunk/LayoutTests/crypto/webkitSubtle/hmac-generate-key.html
r206882 r206883 16 16 var extractable = true; 17 17 18 shouldThrow('crypto. subtle.generateKey("hmac", extractable, ["sign", "verify"])');19 shouldThrow('crypto. subtle.generateKey({name: "hmac"}, extractable, ["sign", "verify"])');20 shouldThrow('crypto. subtle.generateKey({name: "hmac", length: undefined}, extractable, ["sign", "verify"])');21 shouldThrow('crypto. subtle.generateKey({name: "hmac", length: {}}, extractable, ["sign", "verify"])');18 shouldThrow('crypto.webkitSubtle.generateKey("hmac", extractable, ["sign", "verify"])'); 19 shouldThrow('crypto.webkitSubtle.generateKey({name: "hmac"}, extractable, ["sign", "verify"])'); 20 shouldThrow('crypto.webkitSubtle.generateKey({name: "hmac", length: undefined}, extractable, ["sign", "verify"])'); 21 shouldThrow('crypto.webkitSubtle.generateKey({name: "hmac", length: {}}, extractable, ["sign", "verify"])'); 22 22 23 23 debug("\nGenerating a key with default length..."); 24 crypto. subtle.generateKey({name: "hmac", hash: "sha-1"}, extractable, ["sign", "verify"]).then(function(result) {24 crypto.webkitSubtle.generateKey({name: "hmac", hash: "sha-1"}, extractable, ["sign", "verify"]).then(function(result) { 25 25 key = result; 26 26 … … 33 33 34 34 debug("\nGenerating a key with custom length..."); 35 return crypto. subtle.generateKey({name: "hmac", hash: "sha-1", length: 5}, extractable, ["sign"]);35 return crypto.webkitSubtle.generateKey({name: "hmac", hash: "sha-1", length: 5}, extractable, ["sign"]); 36 36 }).then(function(result) { 37 37 key = result; -
trunk/LayoutTests/crypto/webkitSubtle/hmac-import-jwk.html
r206882 r206883 27 27 28 28 debug("Importing a key...\n"); 29 crypto. subtle.importKey("jwk", hmacKeyAsArrayBuffer, null, extractable, ["sign", "verify"]).then(function(result) {29 crypto.webkitSubtle.importKey("jwk", hmacKeyAsArrayBuffer, null, extractable, ["sign", "verify"]).then(function(result) { 30 30 key = result; 31 31 … … 37 37 38 38 debug("\nUsing the key to sign message 'foo'..."); 39 return crypto. subtle.sign(key.algorithm, key, asciiToUint8Array('foo'));39 return crypto.webkitSubtle.sign(key.algorithm, key, asciiToUint8Array('foo')); 40 40 }).then(function(result) { 41 41 signature = result; … … 43 43 44 44 debug("\nVerifying the signature..."); 45 return crypto. subtle.verify(key.algorithm, key, result, asciiToUint8Array('foo'));45 return crypto.webkitSubtle.verify(key.algorithm, key, result, asciiToUint8Array('foo')); 46 46 }).then(function(result) { 47 47 verificationResult = result; -
trunk/LayoutTests/crypto/webkitSubtle/hmac-postMessage.html
r206882 r206883 24 24 }, false); 25 25 26 crypto. subtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: 'hmac', hash: {name: 'sha-1'}}, true, ['sign', 'verify']).then(function(key) {26 crypto.webkitSubtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: 'hmac', hash: {name: 'sha-1'}}, true, ['sign', 'verify']).then(function(key) { 27 27 postMessage(key, "*"); 28 28 }); -
trunk/LayoutTests/crypto/webkitSubtle/hmac-sign-verify-empty-key.html
r206882 r206883 18 18 19 19 debug("Importing a raw HMAC key from string literal..."); 20 crypto. subtle.importKey("raw", hmacKey, {name: 'hmac', hash: {name: 'sha-1'}}, extractable, ["sign", "verify"]).then(function(result) {20 crypto.webkitSubtle.importKey("raw", hmacKey, {name: 'hmac', hash: {name: 'sha-1'}}, extractable, ["sign", "verify"]).then(function(result) { 21 21 key = result; 22 22 shouldBe("key.type", "'secret'"); … … 28 28 29 29 debug("Using the key to sign 'foo'..."); 30 return crypto. subtle.sign(key.algorithm, key, asciiToUint8Array('foo'));30 return crypto.webkitSubtle.sign(key.algorithm, key, asciiToUint8Array('foo')); 31 31 }).then(function(result) { 32 32 signature = result; … … 34 34 35 35 debug("Verifying the signature..."); 36 return crypto. subtle.verify(key.algorithm, key, result, asciiToUint8Array('foo'));36 return crypto.webkitSubtle.verify(key.algorithm, key, result, asciiToUint8Array('foo')); 37 37 }).then(function(result) { 38 38 verificationResult = result; -
trunk/LayoutTests/crypto/webkitSubtle/hmac-sign-verify.html
r206882 r206883 18 18 19 19 debug("Importing a raw HMAC key from string literal..."); 20 crypto. subtle.importKey("raw", hmacKey, {name: 'hmac', hash: {name: 'sha-1'}}, extractable, ["sign", "verify"]).then(function(result) {20 crypto.webkitSubtle.importKey("raw", hmacKey, {name: 'hmac', hash: {name: 'sha-1'}}, extractable, ["sign", "verify"]).then(function(result) { 21 21 key = result; 22 22 shouldBe("key.type", "'secret'"); … … 28 28 29 29 debug("Using the key to sign 'foo'..."); 30 return crypto. subtle.sign(key.algorithm, key, asciiToUint8Array('foo'));30 return crypto.webkitSubtle.sign(key.algorithm, key, asciiToUint8Array('foo')); 31 31 }).then(function(result) { 32 32 signature = result; … … 34 34 35 35 debug("Verifying the signature..."); 36 return crypto. subtle.verify(key.algorithm, key, result, asciiToUint8Array('foo'));36 return crypto.webkitSubtle.verify(key.algorithm, key, result, asciiToUint8Array('foo')); 37 37 }).then(function(result) { 38 38 verificationResult = result; -
trunk/LayoutTests/crypto/webkitSubtle/jwk-export-use-values.html
r206882 r206883 21 21 function testWithAESCBC(usages, expectedKeyOps) 22 22 { 23 return crypto. subtle.importKey("raw", aesKeyAsArrayBuffer, "AES-CBC", extractable, usages).then(function(result) {24 return crypto. subtle.exportKey("jwk", result);23 return crypto.webkitSubtle.importKey("raw", aesKeyAsArrayBuffer, "AES-CBC", extractable, usages).then(function(result) { 24 return crypto.webkitSubtle.exportKey("jwk", result); 25 25 }).then(function(result) { 26 26 jwk = JSON.parse(bytesToASCIIString(result)); … … 34 34 function testWithHMAC(usages, expectedKeyOps) 35 35 { 36 return crypto. subtle.importKey("raw", hmacKeyAsArrayBuffer, {name: 'hmac', hash: {name: 'sha-256'}}, extractable, usages).then(function(result) {37 return crypto. subtle.exportKey("jwk", result);36 return crypto.webkitSubtle.importKey("raw", hmacKeyAsArrayBuffer, {name: 'hmac', hash: {name: 'sha-256'}}, extractable, usages).then(function(result) { 37 return crypto.webkitSubtle.exportKey("jwk", result); 38 38 }).then(function(result) { 39 39 jwk = JSON.parse(bytesToASCIIString(result)); -
trunk/LayoutTests/crypto/webkitSubtle/jwk-import-use-values.html
r206882 r206883 40 40 } 41 41 42 return crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(aesKeyAsJSON)), "AES-CBC", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]).then(function(result) {42 return crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(aesKeyAsJSON)), "AES-CBC", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]).then(function(result) { 43 43 key = result; 44 44 debug(JSON.stringify(jwkUsages) + ":"); … … 58 58 } 59 59 60 return crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(hmacKeyAsJSON)), {name: 'hmac', hash: {name: 'sha-256'}}, extractable, ["sign", "verify"]).then(function(result) {60 return crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(hmacKeyAsJSON)), {name: 'hmac', hash: {name: 'sha-256'}}, extractable, ["sign", "verify"]).then(function(result) { 61 61 key = result; 62 62 debug(JSON.stringify(jwkUsages) + ":"); -
trunk/LayoutTests/crypto/webkitSubtle/resources/rsa-indexeddb-non-exportable.js
r206882 r206883 16 16 }; 17 17 18 crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, false, ["sign", "verify"]).then(function(key) {19 var openRequest = indexedDB.open("crypto_ subtle");18 crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, false, ["sign", "verify"]).then(function(key) { 19 var openRequest = indexedDB.open("crypto_webkitSubtle"); 20 20 openRequest.onupgradeneeded = function(event) { 21 21 var objectStore = event.target.result.createObjectStore("rsa-indexeddb"); -
trunk/LayoutTests/crypto/webkitSubtle/resources/rsa-indexeddb.js
r206882 r206883 16 16 }; 17 17 18 crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, true, ["sign", "verify"]).then(function(key) {19 var openRequest = indexedDB.open("crypto_ subtle");18 crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, true, ["sign", "verify"]).then(function(key) { 19 var openRequest = indexedDB.open("crypto_webkitSubtle"); 20 20 openRequest.onupgradeneeded = function(event) { 21 21 var objectStore = event.target.result.createObjectStore("rsa-indexeddb"); -
trunk/LayoutTests/crypto/webkitSubtle/rsa-export-generated-keys-expected.txt
r206882 r206883 6 6 7 7 Generating RSA-PKCS1-v1.5 keyPair... 8 PASS crypto. subtle.exportKey(null, key) threw exception TypeError: Unknown key format.9 PASS crypto. subtle.exportKey(undefined, key) threw exception TypeError: Unknown key format.10 PASS crypto. subtle.exportKey({}, key) threw exception TypeError: Unknown key format.11 PASS crypto. subtle.exportKey("", key) threw exception TypeError: Unknown key format.12 PASS crypto. subtle.exportKey("foobar", key) threw exception TypeError: Unknown key format.8 PASS crypto.webkitSubtle.exportKey(null, key) threw exception TypeError: Unknown key format. 9 PASS crypto.webkitSubtle.exportKey(undefined, key) threw exception TypeError: Unknown key format. 10 PASS crypto.webkitSubtle.exportKey({}, key) threw exception TypeError: Unknown key format. 11 PASS crypto.webkitSubtle.exportKey("", key) threw exception TypeError: Unknown key format. 12 PASS crypto.webkitSubtle.exportKey("foobar", key) threw exception TypeError: Unknown key format. 13 13 PASS key.publicKey.algorithm.hash.name is defined. 14 14 PASS key.privateKey.algorithm.hash.name is defined. -
trunk/LayoutTests/crypto/webkitSubtle/rsa-export-generated-keys.html
r206882 r206883 24 24 25 25 debug("\nGenerating RSA-PKCS1-v1.5 keyPair..."); 26 crypto. subtle.generateKey(algorithm, extractable, ['sign', 'verify'])26 crypto.webkitSubtle.generateKey(algorithm, extractable, ['sign', 'verify']) 27 27 .then(function(result) { 28 28 key = result; 29 29 30 shouldThrow('crypto. subtle.exportKey(null, key)');31 shouldThrow('crypto. subtle.exportKey(undefined, key)');32 shouldThrow('crypto. subtle.exportKey({}, key)');33 shouldThrow('crypto. subtle.exportKey("", key)');34 shouldThrow('crypto. subtle.exportKey("foobar", key)');30 shouldThrow('crypto.webkitSubtle.exportKey(null, key)'); 31 shouldThrow('crypto.webkitSubtle.exportKey(undefined, key)'); 32 shouldThrow('crypto.webkitSubtle.exportKey({}, key)'); 33 shouldThrow('crypto.webkitSubtle.exportKey("", key)'); 34 shouldThrow('crypto.webkitSubtle.exportKey("foobar", key)'); 35 35 shouldBeDefined('key.publicKey.algorithm.hash.name'); 36 36 shouldBeDefined('key.privateKey.algorithm.hash.name'); 37 37 38 38 debug("\nExporting public key as JWK..."); 39 return crypto. subtle.exportKey("jwk", key.publicKey);39 return crypto.webkitSubtle.exportKey("jwk", key.publicKey); 40 40 }).then(function(result) { 41 41 exportedJWK = JSON.parse(bytesToASCIIString(result)); … … 48 48 49 49 debug("\nExporting private key as JWK..."); 50 return crypto. subtle.exportKey("jwk", key.privateKey);50 return crypto.webkitSubtle.exportKey("jwk", key.privateKey); 51 51 }).then(function(result) { 52 52 exportedJWK = JSON.parse(bytesToASCIIString(result)); -
trunk/LayoutTests/crypto/webkitSubtle/rsa-export-key-expected.txt
r206882 r206883 6 6 7 7 Importing a JWK key... 8 PASS crypto. subtle.exportKey(null, key) threw exception TypeError: Unknown key format.9 PASS crypto. subtle.exportKey(undefined, key) threw exception TypeError: Unknown key format.10 PASS crypto. subtle.exportKey({}, key) threw exception TypeError: Unknown key format.11 PASS crypto. subtle.exportKey("", key) threw exception TypeError: Unknown key format.12 PASS crypto. subtle.exportKey("foobar", key) threw exception TypeError: Unknown key format.8 PASS crypto.webkitSubtle.exportKey(null, key) threw exception TypeError: Unknown key format. 9 PASS crypto.webkitSubtle.exportKey(undefined, key) threw exception TypeError: Unknown key format. 10 PASS crypto.webkitSubtle.exportKey({}, key) threw exception TypeError: Unknown key format. 11 PASS crypto.webkitSubtle.exportKey("", key) threw exception TypeError: Unknown key format. 12 PASS crypto.webkitSubtle.exportKey("foobar", key) threw exception TypeError: Unknown key format. 13 13 14 14 Exporting the key as JWK... -
trunk/LayoutTests/crypto/webkitSubtle/rsa-export-key.html
r206882 r206883 27 27 28 28 debug("\nImporting a JWK key..."); 29 crypto. subtle.importKey("jwk", jwkKeyAsArrayBuffer, "RSASSA-PKCS1-v1_5", extractable, ['sign', 'verify']).then(function(result) {29 crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, "RSASSA-PKCS1-v1_5", extractable, ['sign', 'verify']).then(function(result) { 30 30 key = result; 31 31 32 shouldThrow('crypto. subtle.exportKey(null, key)');33 shouldThrow('crypto. subtle.exportKey(undefined, key)');34 shouldThrow('crypto. subtle.exportKey({}, key)');35 shouldThrow('crypto. subtle.exportKey("", key)');36 shouldThrow('crypto. subtle.exportKey("foobar", key)');32 shouldThrow('crypto.webkitSubtle.exportKey(null, key)'); 33 shouldThrow('crypto.webkitSubtle.exportKey(undefined, key)'); 34 shouldThrow('crypto.webkitSubtle.exportKey({}, key)'); 35 shouldThrow('crypto.webkitSubtle.exportKey("", key)'); 36 shouldThrow('crypto.webkitSubtle.exportKey("foobar", key)'); 37 37 38 38 debug("\nExporting the key as JWK..."); 39 return crypto. subtle.exportKey("jwk", key);39 return crypto.webkitSubtle.exportKey("jwk", key); 40 40 }).then(function(result) { 41 41 exportedJWK = JSON.parse(bytesToASCIIString(result)); -
trunk/LayoutTests/crypto/webkitSubtle/rsa-export-private-key.html
r206882 r206883 34 34 35 35 debug("\nImporting a JWK key..."); 36 crypto. subtle.importKey("jwk", jwkKeyAsArrayBuffer, "RSASSA-PKCS1-v1_5", extractable, ['sign', 'verify']).then(function(result) {36 crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, "RSASSA-PKCS1-v1_5", extractable, ['sign', 'verify']).then(function(result) { 37 37 key = result; 38 38 39 39 debug("\nExporting the key as JWK..."); 40 return crypto. subtle.exportKey("jwk", key);40 return crypto.webkitSubtle.exportKey("jwk", key); 41 41 }).then(function(result) { 42 42 exportedJWK = JSON.parse(bytesToASCIIString(result)); -
trunk/LayoutTests/crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key-expected.txt
r206882 r206883 5 5 6 6 Generating a key pair... 7 PASS keyPair.toString() is '[object KeyPair]'7 PASS keyPair.toString() is '[object CryptoKeyPair]' 8 8 PASS keyPair.publicKey.type is 'public' 9 9 PASS keyPair.publicKey.extractable is true -
trunk/LayoutTests/crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key.html
r206882 r206883 23 23 24 24 debug("Generating a key pair..."); 25 crypto. subtle.generateKey(algorithmKeyGen, nonExtractable, []).then(function(result) {25 crypto.webkitSubtle.generateKey(algorithmKeyGen, nonExtractable, []).then(function(result) { 26 26 keyPair = result; 27 shouldBe("keyPair.toString()", "'[object KeyPair]'");27 shouldBe("keyPair.toString()", "'[object CryptoKeyPair]'"); 28 28 shouldBe("keyPair.publicKey.type", "'public'"); 29 29 shouldBe("keyPair.publicKey.extractable", "true"); -
trunk/LayoutTests/crypto/webkitSubtle/rsa-oaep-key-manipulation-expected.txt
r206882 r206883 5 5 6 6 Generating a key pair... 7 PASS keyPair.toString() is '[object KeyPair]'7 PASS keyPair.toString() is '[object CryptoKeyPair]' 8 8 PASS keyPair.publicKey.type is 'public' 9 9 PASS keyPair.publicKey.algorithm.name is 'RSA-OAEP' … … 18 18 19 19 Testing that the keys can't be used with different algorithms... 20 PASS crypto. subtle.encrypt({name: "aes-cbc", iv: iv}, keyPair.privateKey, hexStringToUint8Array("00")) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..21 PASS crypto. subtle.encrypt({name: "aes-cbc", iv: iv}, keyPair.publicKey, hexStringToUint8Array("00")) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..20 PASS crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, keyPair.privateKey, hexStringToUint8Array("00")) threw exception NotSupportedError (DOM Exception 9): The operation is not supported.. 21 PASS crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, keyPair.publicKey, hexStringToUint8Array("00")) threw exception NotSupportedError (DOM Exception 9): The operation is not supported.. 22 22 23 23 Trying to export keys to raw... -
trunk/LayoutTests/crypto/webkitSubtle/rsa-oaep-key-manipulation.html
r206882 r206883 23 23 24 24 debug("Generating a key pair..."); 25 crypto. subtle.generateKey(algorithmKeyGen, extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]).then(function(result) {25 crypto.webkitSubtle.generateKey(algorithmKeyGen, extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]).then(function(result) { 26 26 keyPair = result; 27 shouldBe("keyPair.toString()", "'[object KeyPair]'");27 shouldBe("keyPair.toString()", "'[object CryptoKeyPair]'"); 28 28 shouldBe("keyPair.publicKey.type", "'public'"); 29 29 shouldBe("keyPair.publicKey.algorithm.name", "'RSA-OAEP'"); … … 39 39 debug("\nTesting that the keys can't be used with different algorithms..."); 40 40 iv = hexStringToUint8Array("000102030405060708090a0b0c0d0e0f"); 41 shouldThrow('crypto. subtle.encrypt({name: "aes-cbc", iv: iv}, keyPair.privateKey, hexStringToUint8Array("00"))');42 shouldThrow('crypto. subtle.encrypt({name: "aes-cbc", iv: iv}, keyPair.publicKey, hexStringToUint8Array("00"))');41 shouldThrow('crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, keyPair.privateKey, hexStringToUint8Array("00"))'); 42 shouldThrow('crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, keyPair.publicKey, hexStringToUint8Array("00"))'); 43 43 44 44 debug("\nTrying to export keys to raw..."); 45 return crypto. subtle.exportKey('raw', keyPair.publicKey);45 return crypto.webkitSubtle.exportKey('raw', keyPair.publicKey); 46 46 }).then(undefined, function(result) { 47 47 testPassed("Promise rejected for exporting public key"); 48 return crypto. subtle.exportKey('raw', keyPair.privateKey);48 return crypto.webkitSubtle.exportKey('raw', keyPair.privateKey); 49 49 }).then(undefined, function(result) { 50 50 testPassed("Promise rejected for exporting private key"); 51 51 52 52 debug("\nExporting public key to JWK..."); 53 return crypto. subtle.exportKey("jwk", keyPair.publicKey);53 return crypto.webkitSubtle.exportKey("jwk", keyPair.publicKey); 54 54 }).then(function(result) { 55 55 jwkPublicKeyArray = result; … … 63 63 64 64 debug("\nImporting it back..."); 65 return crypto. subtle.importKey("jwk", jwkPublicKeyArray, null, extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]);65 return crypto.webkitSubtle.importKey("jwk", jwkPublicKeyArray, null, extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]); 66 66 }).then(function(result) { 67 67 exportedPublicKey = result; -
trunk/LayoutTests/crypto/webkitSubtle/rsa-oaep-plaintext-length.html
r206882 r206883 38 38 39 39 debug("Importing RSA keys..."); 40 crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["encrypt", "decrypt"]).then(function(result) {40 crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["encrypt", "decrypt"]).then(function(result) { 41 41 publicKey = result; 42 return crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["encrypt", "decrypt"]);42 return crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["encrypt", "decrypt"]); 43 43 }).then(function(result) { 44 44 privateKey = result; 45 45 46 46 debug("Encrypting a 214 byte buffer with RSA-OAEP SHA-1, 2048 bit key..."); 47 return crypto. subtle.encrypt({name: "RSA-OAEP", hash: "SHA-1"}, publicKey, new Uint8Array(214));47 return crypto.webkitSubtle.encrypt({name: "RSA-OAEP", hash: "SHA-1"}, publicKey, new Uint8Array(214)); 48 48 }).then(function(result) { 49 49 testPassed("Succeeded"); 50 50 debug("Encrypting a 215 byte buffer..."); 51 return crypto. subtle.encrypt({name: "RSA-OAEP", hash: "SHA-1"}, publicKey, new Uint8Array(215));51 return crypto.webkitSubtle.encrypt({name: "RSA-OAEP", hash: "SHA-1"}, publicKey, new Uint8Array(215)); 52 52 }).then(function(result) { 53 53 testFailed("Succeeded"); -
trunk/LayoutTests/crypto/webkitSubtle/rsa-oaep-wrap-unwrap-aes.html
r206882 r206883 38 38 39 39 debug("Importing RSA keys..."); 40 crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["wrapKey", "unwrapKey"]).then(function(result) {40 crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["wrapKey", "unwrapKey"]).then(function(result) { 41 41 publicKey = result; 42 return crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["wrapKey", "unwrapKey"]);42 return crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["wrapKey", "unwrapKey"]); 43 43 }).then(function(result) { 44 44 privateKey = result; … … 46 46 debug("Importing an AES key..."); 47 47 aesKeyData = hexStringToUint8Array("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"); 48 return crypto. subtle.importKey("raw", aesKeyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"])48 return crypto.webkitSubtle.importKey("raw", aesKeyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) 49 49 }).then(function(result) { 50 50 aesKey = result; 51 51 debug("Wrapping it..."); 52 52 53 return crypto. subtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm);53 return crypto.webkitSubtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm); 54 54 }).then(function(result) { 55 55 wrappedKey = result; … … 57 57 58 58 debug("Unwrapping it..."); 59 return crypto. subtle.unwrapKey("raw", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]);59 return crypto.webkitSubtle.unwrapKey("raw", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]); 60 60 }).then(function(result) { 61 61 unwrappedKey = result; … … 68 68 69 69 debug("Exporting it..."); 70 return crypto. subtle.exportKey("raw", unwrappedKey);70 return crypto.webkitSubtle.exportKey("raw", unwrappedKey); 71 71 }).then(function(result) { 72 72 unwrappedKeyData = result; … … 74 74 75 75 debug("\nWrapping the same key as JWK..."); 76 return crypto. subtle.wrapKey("jwk", aesKey, publicKey, wrapAlgorithm);76 return crypto.webkitSubtle.wrapKey("jwk", aesKey, publicKey, wrapAlgorithm); 77 77 }).then(function(result) { 78 78 wrappedKey = result; … … 80 80 81 81 debug("Unwrapping it..."); 82 return crypto. subtle.unwrapKey("jwk", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]);82 return crypto.webkitSubtle.unwrapKey("jwk", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]); 83 83 }).then(function(result) { 84 84 unwrappedKey = result; … … 91 91 92 92 debug("Exporting it..."); 93 return crypto. subtle.exportKey("raw", unwrappedKey);93 return crypto.webkitSubtle.exportKey("raw", unwrappedKey); 94 94 }).then(function(result) { 95 95 unwrappedKeyData = result; -
trunk/LayoutTests/crypto/webkitSubtle/rsa-postMessage.html
r206882 r206883 36 36 shouldBe("key.usages", '["sign", "verify"]'); 37 37 38 crypto. subtle.exportKey("jwk", key).then(function(result) {38 crypto.webkitSubtle.exportKey("jwk", key).then(function(result) { 39 39 exportedJWK = JSON.parse(bytesToASCIIString(result)); 40 40 debug("\nExported back to JWK:"); … … 58 58 }, false); 59 59 60 crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, true, ["sign", "verify"]).then(function(result) {60 crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, true, ["sign", "verify"]).then(function(result) { 61 61 postMessage(result, "*"); 62 62 }); -
trunk/LayoutTests/crypto/webkitSubtle/rsaes-pkcs1-v1_5-decrypt.html
r206882 r206883 31 31 32 32 debug("Importing an RSA key..."); 33 crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["decrypt"]).then(function(result) {33 crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["decrypt"]).then(function(result) { 34 34 privateKey = result; 35 35 36 36 debug("Decrypting..."); 37 37 encryptedMessage = hexStringToUint8Array("6042e745589af03af87520f93c45d8c35985ada1161a37d822e9f9460fc75fcf0179d8491b8f5d1e4de8ceb31e07c4865c5a3efdbbb69a8803b89ee65a430a5809c707569150b580bb686a94c5541c46adcd827960ce244ff688387d1616e85b4d1780c6483606cf924b54f080cf4154e66829bf6e532481048ec41fadc07d755bb34bb28145219cb30d47d0d618709180e90303ff9ef09018bed3da75761da794811f96bc9e8d7c4ba1b5946bda0bd313faec4c993ed2748eed8cce4bdb520ba7db165f9fe56aa8454d6ff33874feeebf29de2df5b7f00aa1d9fb073fc4067b58dc50624e127f711dde2cc2cfdab4919ccf28c83660dfc227b0f500ec1f904f"); 38 return crypto. subtle.decrypt("RSAES-PKCS1-v1_5", privateKey, encryptedMessage);38 return crypto.webkitSubtle.decrypt("RSAES-PKCS1-v1_5", privateKey, encryptedMessage); 39 39 }).then(function(result) { 40 40 message = result; -
trunk/LayoutTests/crypto/webkitSubtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html
r206882 r206883 38 38 39 39 debug("Importing RSA keys..."); 40 crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["wrapKey", "unwrapKey"]).then(function(result) {40 crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["wrapKey", "unwrapKey"]).then(function(result) { 41 41 publicKey = result; 42 return crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["wrapKey", "unwrapKey"]);42 return crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["wrapKey", "unwrapKey"]); 43 43 }).then(function(result) { 44 44 privateKey = result; … … 46 46 debug("Importing an AES key..."); 47 47 aesKeyData = hexStringToUint8Array("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"); 48 return crypto. subtle.importKey("raw", aesKeyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"])48 return crypto.webkitSubtle.importKey("raw", aesKeyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) 49 49 }).then(function(result) { 50 50 aesKey = result; 51 51 debug("Wrapping it..."); 52 52 53 return crypto. subtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm);53 return crypto.webkitSubtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm); 54 54 }).then(function(result) { 55 55 wrappedKey = result; … … 57 57 58 58 debug("Unwrapping it..."); 59 return crypto. subtle.unwrapKey("raw", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]);59 return crypto.webkitSubtle.unwrapKey("raw", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]); 60 60 }).then(function(result) { 61 61 unwrappedKey = result; … … 68 68 69 69 debug("Exporting it..."); 70 return crypto. subtle.exportKey("raw", unwrappedKey);70 return crypto.webkitSubtle.exportKey("raw", unwrappedKey); 71 71 }).then(function(result) { 72 72 unwrappedKeyData = result; … … 74 74 75 75 debug("\nWrapping the same key as JWK..."); 76 return crypto. subtle.wrapKey("jwk", aesKey, publicKey, wrapAlgorithm);76 return crypto.webkitSubtle.wrapKey("jwk", aesKey, publicKey, wrapAlgorithm); 77 77 }).then(function(result) { 78 78 wrappedKey = result; … … 80 80 81 81 debug("Unwrapping it..."); 82 return crypto. subtle.unwrapKey("jwk", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]);82 return crypto.webkitSubtle.unwrapKey("jwk", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]); 83 83 }).then(function(result) { 84 84 unwrappedKey = result; … … 91 91 92 92 debug("Exporting it..."); 93 return crypto. subtle.exportKey("raw", unwrappedKey);93 return crypto.webkitSubtle.exportKey("raw", unwrappedKey); 94 94 }).then(function(result) { 95 95 unwrappedKeyData = result; -
trunk/LayoutTests/crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-expected.txt
r206882 r206883 5 5 6 6 Generating a key pair... 7 PASS keyPair.toString() is '[object KeyPair]'7 PASS keyPair.toString() is '[object CryptoKeyPair]' 8 8 PASS keyPair.publicKey.type is 'public' 9 9 PASS keyPair.publicKey.algorithm.name is 'RSASSA-PKCS1-v1_5' -
trunk/LayoutTests/crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent-expected.txt
r206882 r206883 5 5 6 6 Generating a key pair... 7 PASS keyPair.toString() is '[object KeyPair]'7 PASS keyPair.toString() is '[object CryptoKeyPair]' 8 8 PASS keyPair.publicKey.type is 'public' 9 9 PASS keyPair.publicKey.algorithm.name is 'RSASSA-PKCS1-v1_5' -
trunk/LayoutTests/crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html
r206882 r206883 23 23 24 24 debug("Generating a key pair..."); 25 crypto. subtle.generateKey(algorithmKeyGen, extractable, ["sign", "verify"]).then(function(result) {25 crypto.webkitSubtle.generateKey(algorithmKeyGen, extractable, ["sign", "verify"]).then(function(result) { 26 26 keyPair = result; 27 shouldBe("keyPair.toString()", "'[object KeyPair]'");27 shouldBe("keyPair.toString()", "'[object CryptoKeyPair]'"); 28 28 shouldBe("keyPair.publicKey.type", "'public'"); 29 29 shouldBe("keyPair.publicKey.algorithm.name", "'RSASSA-PKCS1-v1_5'"); -
trunk/LayoutTests/crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key.html
r206882 r206883 23 23 24 24 debug("Generating a key pair..."); 25 crypto. subtle.generateKey(algorithmKeyGen, extractable, ["sign", "verify"]).then(function(result) {25 crypto.webkitSubtle.generateKey(algorithmKeyGen, extractable, ["sign", "verify"]).then(function(result) { 26 26 keyPair = result; 27 shouldBe("keyPair.toString()", "'[object KeyPair]'");27 shouldBe("keyPair.toString()", "'[object CryptoKeyPair]'"); 28 28 shouldBe("keyPair.publicKey.type", "'public'"); 29 29 shouldBe("keyPair.publicKey.algorithm.name", "'RSASSA-PKCS1-v1_5'"); -
trunk/LayoutTests/crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html
r206882 r206883 36 36 }; 37 37 38 shouldThrow('crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["sign", "verify"])');39 shouldThrow('crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["sign", "verify"])');38 shouldThrow('crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["sign", "verify"])'); 39 shouldThrow('crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["sign", "verify"])'); 40 40 </script> 41 41 -
trunk/LayoutTests/crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk.html
r206882 r206883 37 37 38 38 debug("Importing a public key..."); 39 crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["sign", "verify"]).then(function(result) {39 crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["sign", "verify"]).then(function(result) { 40 40 publicKey = result; 41 41 shouldBe("publicKey.toString()", "'[object CryptoKey]'"); … … 47 47 shouldBe("publicKey.algorithm.hash.name", "'SHA-256'"); 48 48 debug("\nImporting a private key..."); 49 return crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["sign", "verify"]);49 return crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["sign", "verify"]); 50 50 }).then(function(result) { 51 51 privateKey = result; -
trunk/LayoutTests/crypto/webkitSubtle/rsassa-pkcs1-v1_5-sign-verify.html
r206882 r206883 39 39 40 40 debug("Importing a public key..."); 41 crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["sign", "verify"]).then(function(result) {41 crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["sign", "verify"]).then(function(result) { 42 42 publicKey = result; 43 43 debug("\nImporting a private key..."); 44 return crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["sign", "verify"]);44 return crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["sign", "verify"]); 45 45 }).then(function(result) { 46 46 privateKey = result; 47 47 debug("\nSigning some text..."); 48 return crypto. subtle.sign({ name: "RSASSA-PKCS1-v1_5", hash: "SHA-256" }, privateKey, data);48 return crypto.webkitSubtle.sign({ name: "RSASSA-PKCS1-v1_5", hash: "SHA-256" }, privateKey, data); 49 49 }).then(function(result) { 50 50 signature = result; … … 52 52 53 53 debug("\nVerifying the signature..."); 54 return crypto. subtle.verify({ name: "RSASSA-PKCS1-v1_5", hash: "SHA-256" }, publicKey, signature, data);54 return crypto.webkitSubtle.verify({ name: "RSASSA-PKCS1-v1_5", hash: "SHA-256" }, publicKey, signature, data); 55 55 }).then(function(result) { 56 56 verificationResult = result; 57 57 shouldBe("verificationResult", "true"); 58 58 debug("\nVerifying a bad signature..."); 59 return crypto. subtle.verify({ name: "RSASSA-PKCS1-v1_5", hash: "SHA-256" }, publicKey, new Uint8Array(256), data);59 return crypto.webkitSubtle.verify({ name: "RSASSA-PKCS1-v1_5", hash: "SHA-256" }, publicKey, new Uint8Array(256), data); 60 60 }).then(function(result) { 61 61 verificationResult = result; -
trunk/LayoutTests/crypto/webkitSubtle/sha-1-expected.txt
r206882 r206883 1 Test crypto. subtle.digest.1 Test crypto.webkitSubtle.digest. 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". … … 10 10 SHA1 of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] 11 11 PASS bytesToHexString(new Uint8Array(digest)) is '2c7e7c384f7829694282b1e3a6216def8082d055' 12 PASS crypto. subtle.generateKey('sha-1') threw exception NotSupportedError (DOM Exception 9): The operation is not supported..12 PASS crypto.webkitSubtle.generateKey('sha-1') threw exception NotSupportedError (DOM Exception 9): The operation is not supported.. 13 13 PASS successfullyParsed is true 14 14 -
trunk/LayoutTests/crypto/webkitSubtle/sha-1.html
r206882 r206883 10 10 11 11 <script> 12 description("Test crypto. subtle.digest.");12 description("Test crypto.webkitSubtle.digest."); 13 13 14 14 jsTestIsAsync = true; … … 16 16 Promise.resolve(null).then(function() { 17 17 debug("SHA1 of []"); 18 return crypto. subtle.digest('sha-1', new Uint8Array([]));18 return crypto.webkitSubtle.digest('sha-1', new Uint8Array([])); 19 19 }).then(function(result) { 20 20 digest = result; … … 22 22 23 23 debug("SHA1 of [0x0]") 24 return crypto. subtle.digest({name: 'sha-1'}, new Uint8Array([0]));24 return crypto.webkitSubtle.digest({name: 'sha-1'}, new Uint8Array([0])); 25 25 }).then(function(result) { 26 26 digest = result; … … 29 29 debug("SHA1 of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"); 30 30 var data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); 31 return crypto. subtle.digest({name: 'sha-1'}, data);31 return crypto.webkitSubtle.digest({name: 'sha-1'}, data); 32 32 }).then(function(result) { 33 33 digest = result; … … 35 35 36 36 // All SHA-1 can do is digest. 37 shouldThrow("crypto. subtle.generateKey('sha-1')");37 shouldThrow("crypto.webkitSubtle.generateKey('sha-1')"); 38 38 finishJSTest(); 39 39 }); -
trunk/LayoutTests/crypto/webkitSubtle/sha-224-expected.txt
r206882 r206883 1 Test crypto. subtle.digest.1 Test crypto.webkitSubtle.digest. 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". -
trunk/LayoutTests/crypto/webkitSubtle/sha-224.html
r206882 r206883 10 10 11 11 <script> 12 description("Test crypto. subtle.digest.");12 description("Test crypto.webkitSubtle.digest."); 13 13 14 14 jsTestIsAsync = true; … … 16 16 Promise.resolve(null).then(function() { 17 17 debug("SHA224 of []"); 18 return crypto. subtle.digest('sha-224', new Uint8Array([]));18 return crypto.webkitSubtle.digest('sha-224', new Uint8Array([])); 19 19 }).then(function(result) { 20 20 digest = result; … … 22 22 23 23 debug("SHA224 of [0x0]") 24 return crypto. subtle.digest({name: 'sha-224'}, new Uint8Array([0]));24 return crypto.webkitSubtle.digest({name: 'sha-224'}, new Uint8Array([0])); 25 25 }).then(function(result) { 26 26 digest = result; … … 29 29 debug("SHA224 of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"); 30 30 var data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); 31 return crypto. subtle.digest({name: 'sha-224'}, data);31 return crypto.webkitSubtle.digest({name: 'sha-224'}, data); 32 32 }).then(function(result) { 33 33 digest = result; -
trunk/LayoutTests/crypto/webkitSubtle/sha-256-expected.txt
r206882 r206883 1 Test crypto. subtle.digest.1 Test crypto.webkitSubtle.digest. 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". -
trunk/LayoutTests/crypto/webkitSubtle/sha-256.html
r206882 r206883 10 10 11 11 <script> 12 description("Test crypto. subtle.digest.");12 description("Test crypto.webkitSubtle.digest."); 13 13 14 14 jsTestIsAsync = true; … … 16 16 Promise.resolve(null).then(function() { 17 17 debug("SHA256 of []"); 18 return crypto. subtle.digest('sha-256', new Uint8Array([]));18 return crypto.webkitSubtle.digest('sha-256', new Uint8Array([])); 19 19 }).then(function(result) { 20 20 digest = result; … … 22 22 23 23 debug("SHA256 of [0x0]") 24 return crypto. subtle.digest({name: 'sha-256'}, new Uint8Array([0]));24 return crypto.webkitSubtle.digest({name: 'sha-256'}, new Uint8Array([0])); 25 25 }).then(function(result) { 26 26 digest = result; … … 29 29 debug("SHA256 of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"); 30 30 var data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); 31 return crypto. subtle.digest({name: 'sha-256'}, data);31 return crypto.webkitSubtle.digest({name: 'sha-256'}, data); 32 32 }).then(function(result) { 33 33 digest = result; -
trunk/LayoutTests/crypto/webkitSubtle/sha-384-expected.txt
r206882 r206883 1 Test crypto. subtle.digest.1 Test crypto.webkitSubtle.digest. 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". -
trunk/LayoutTests/crypto/webkitSubtle/sha-384.html
r206882 r206883 10 10 11 11 <script> 12 description("Test crypto. subtle.digest.");12 description("Test crypto.webkitSubtle.digest."); 13 13 14 14 jsTestIsAsync = true; … … 16 16 Promise.resolve(null).then(function() { 17 17 debug("SHA384 of []"); 18 return crypto. subtle.digest('sha-384', new Uint8Array([]));18 return crypto.webkitSubtle.digest('sha-384', new Uint8Array([])); 19 19 }).then(function(result) { 20 20 digest = result; … … 22 22 23 23 debug("SHA384 of [0x0]") 24 return crypto. subtle.digest({name: 'sha-384'}, new Uint8Array([0]));24 return crypto.webkitSubtle.digest({name: 'sha-384'}, new Uint8Array([0])); 25 25 }).then(function(result) { 26 26 digest = result; … … 29 29 debug("SHA384 of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"); 30 30 var data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); 31 return crypto. subtle.digest({name: 'sha-384'}, data);31 return crypto.webkitSubtle.digest({name: 'sha-384'}, data); 32 32 }).then(function(result) { 33 33 digest = result; -
trunk/LayoutTests/crypto/webkitSubtle/sha-512-expected.txt
r206882 r206883 1 Test crypto. subtle.digest.1 Test crypto.webkitSubtle.digest. 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". -
trunk/LayoutTests/crypto/webkitSubtle/sha-512.html
r206882 r206883 10 10 11 11 <script> 12 description("Test crypto. subtle.digest.");12 description("Test crypto.webkitSubtle.digest."); 13 13 14 14 jsTestIsAsync = true; … … 16 16 Promise.resolve(null).then(function() { 17 17 debug("SHA512 of []"); 18 return crypto. subtle.digest('sha-512', new Uint8Array([]));18 return crypto.webkitSubtle.digest('sha-512', new Uint8Array([])); 19 19 }).then(function(result) { 20 20 digest = result; … … 22 22 23 23 debug("SHA512 of [0x0]") 24 return crypto. subtle.digest({name: 'sha-512'}, new Uint8Array([0]));24 return crypto.webkitSubtle.digest({name: 'sha-512'}, new Uint8Array([0])); 25 25 }).then(function(result) { 26 26 digest = result; … … 29 29 debug("SHA512 of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"); 30 30 var data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); 31 return crypto. subtle.digest({name: 'sha-512'}, data);31 return crypto.webkitSubtle.digest({name: 'sha-512'}, data); 32 32 }).then(function(result) { 33 33 digest = result; -
trunk/LayoutTests/crypto/webkitSubtle/unimplemented-unwrap-crash.html
r206882 r206883 15 15 jsTestIsAsync = true; 16 16 17 crypto. subtle.generateKey({name: "AES-KW", length: 256}, false, ["wrapKey"]).then(function(wrappingKey) {18 return crypto. subtle.generateKey({name: "HMAC", hash: {name: "SHA-256"}}, true, ["sign", "verify"]).then(function(aesKey) {19 return crypto. subtle.wrapKey("raw", aesKey, wrappingKey, {name: "AES-KW"});17 crypto.webkitSubtle.generateKey({name: "AES-KW", length: 256}, false, ["wrapKey"]).then(function(wrappingKey) { 18 return crypto.webkitSubtle.generateKey({name: "HMAC", hash: {name: "SHA-256"}}, true, ["sign", "verify"]).then(function(aesKey) { 19 return crypto.webkitSubtle.wrapKey("raw", aesKey, wrappingKey, {name: "AES-KW"}); 20 20 }); 21 21 }).then(finishJSTest, finishJSTest); // OK if the browser does not crash. -
trunk/LayoutTests/crypto/webkitSubtle/unwrapKey-check-usage-expected.txt
r206882 r206883 9 9 Wrapping it... 10 10 Unwrapping it... 11 PASS crypto. subtle.unwrapKey("raw", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..11 PASS crypto.webkitSubtle.unwrapKey("raw", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]) threw exception NotSupportedError (DOM Exception 9): The operation is not supported.. 12 12 PASS successfullyParsed is true 13 13 -
trunk/LayoutTests/crypto/webkitSubtle/unwrapKey-check-usage.html
r206882 r206883 38 38 39 39 debug("Importing RSA keys..."); 40 crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["wrapKey"]).then(function(result) {40 crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["wrapKey"]).then(function(result) { 41 41 publicKey = result; 42 return crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["encrypt", "decrypt", "wrapKey"]);42 return crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["encrypt", "decrypt", "wrapKey"]); 43 43 }).then(function(result) { 44 44 privateKey = result; … … 46 46 debug("Importing an AES key..."); 47 47 aesKeyData = hexStringToUint8Array("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"); 48 return crypto. subtle.importKey("raw", aesKeyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"])48 return crypto.webkitSubtle.importKey("raw", aesKeyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) 49 49 }).then(function(result) { 50 50 aesKey = result; 51 51 52 52 debug("Wrapping it..."); 53 return crypto. subtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm);53 return crypto.webkitSubtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm); 54 54 }).then(function(result) { 55 55 wrappedKey = result; … … 57 57 debug("Unwrapping it..."); 58 58 // privateKey lacks unwrapKey usage. 59 shouldThrow('crypto. subtle.unwrapKey("raw", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"])');59 shouldThrow('crypto.webkitSubtle.unwrapKey("raw", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"])'); 60 60 61 61 finishJSTest(); -
trunk/LayoutTests/crypto/webkitSubtle/wrapKey-check-usage-expected.txt
r206882 r206883 8 8 Importing an AES key... 9 9 Wrapping it... 10 PASS crypto. subtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..10 PASS crypto.webkitSubtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm) threw exception NotSupportedError (DOM Exception 9): The operation is not supported.. 11 11 PASS successfullyParsed is true 12 12 -
trunk/LayoutTests/crypto/webkitSubtle/wrapKey-check-usage.html
r206882 r206883 26 26 27 27 debug("Importing an RSA key..."); 28 crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["encrypt", "decrypt", "unwrapKey"]).then(function(result) {28 crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["encrypt", "decrypt", "unwrapKey"]).then(function(result) { 29 29 publicKey = result; 30 30 31 31 debug("Importing an AES key..."); 32 32 aesKeyData = hexStringToUint8Array("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"); 33 return crypto. subtle.importKey("raw", aesKeyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"])33 return crypto.webkitSubtle.importKey("raw", aesKeyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]) 34 34 }).then(function(result) { 35 35 aesKey = result; … … 37 37 debug("Wrapping it..."); 38 38 // publicKey lacks wrapKey usage. 39 shouldThrow('crypto. subtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm)');39 shouldThrow('crypto.webkitSubtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm)'); 40 40 finishJSTest(); 41 41 }); -
trunk/LayoutTests/crypto/workers/subtle/aes-postMessage-worker.html
r206882 r206883 3 3 <head> 4 4 <meta charset="utf-8"> 5 <script src="../../ resources/js-test-pre.js"></script>6 <script src="../ resources/common.js"></script>5 <script src="../../../resources/js-test-pre.js"></script> 6 <script src="../../resources/common.js"></script> 7 7 </head> 8 8 <body> … … 13 13 jsTestIsAsync = true; 14 14 15 crypto. subtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: "aes-cbc", length: 128}, true, ["encrypt", "decrypt"]).then(function(localKey) {15 crypto.webkitSubtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: "aes-cbc", length: 128}, true, ["encrypt", "decrypt"]).then(function(localKey) { 16 16 var worker = new Worker("resources/aes-postMessage-worker.js"); 17 17 worker.onmessage = function(evt) { … … 32 32 }); 33 33 </script> 34 <script src="../../ resources/js-test-post.js"></script>34 <script src="../../../resources/js-test-post.js"></script> 35 35 </body> 36 36 </html> -
trunk/LayoutTests/crypto/workers/subtle/hmac-postMessage-worker.html
r206882 r206883 3 3 <head> 4 4 <meta charset="utf-8"> 5 <script src="../../ resources/js-test-pre.js"></script>6 <script src="../ resources/common.js"></script>5 <script src="../../../resources/js-test-pre.js"></script> 6 <script src="../../resources/common.js"></script> 7 7 </head> 8 8 <body> … … 13 13 jsTestIsAsync = true; 14 14 15 crypto. subtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: 'hmac', hash: {name: 'sha-1'}}, true, ['sign', 'verify']).then(function(localKey) {15 crypto.webkitSubtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: 'hmac', hash: {name: 'sha-1'}}, true, ['sign', 'verify']).then(function(localKey) { 16 16 var worker = new Worker("resources/hmac-postMessage-worker.js"); 17 17 worker.onmessage = function(evt) { … … 33 33 }); 34 34 </script> 35 <script src="../../ resources/js-test-post.js"></script>35 <script src="../../../resources/js-test-post.js"></script> 36 36 </body> 37 37 </html> -
trunk/LayoutTests/crypto/workers/subtle/hrsa-postMessage-worker.html
r206882 r206883 3 3 <head> 4 4 <meta charset="utf-8"> 5 <script src="../../ resources/js-test-pre.js"></script>6 <script src="../ resources/common.js"></script>5 <script src="../../../resources/js-test-pre.js"></script> 6 <script src="../../resources/common.js"></script> 7 7 </head> 8 8 <body> … … 73 73 } 74 74 75 crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), algorithmKeyGen, true, ['encrypt']).then(function(localPublicKey) {75 crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), algorithmKeyGen, true, ['encrypt']).then(function(localPublicKey) { 76 76 worker.postMessage({ publicKey: localPublicKey }); 77 77 }); 78 crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), algorithmKeyGen, false, ['decrypt']).then(function(localPrivateKey) {78 crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), algorithmKeyGen, false, ['decrypt']).then(function(localPrivateKey) { 79 79 worker.postMessage({ privateKey: localPrivateKey }); 80 80 }); 81 81 </script> 82 <script src="../../ resources/js-test-post.js"></script>82 <script src="../../../resources/js-test-post.js"></script> 83 83 </body> 84 84 </html> -
trunk/LayoutTests/crypto/workers/subtle/multiple-postMessage-worker.html
r206882 r206883 3 3 <head> 4 4 <meta charset="utf-8"> 5 <script src="../../ resources/js-test-pre.js"></script>6 <script src="../ resources/common.js"></script>5 <script src="../../../resources/js-test-pre.js"></script> 6 <script src="../../resources/common.js"></script> 7 7 </head> 8 8 <body> … … 39 39 var usages = ["encrypt", "decrypt"] 40 40 for (i = 0; i < 10; i++) 41 crypto. subtle.importKey(keyFormat, keyData, aesKeyGenParams, true, usages).then(function(localKey) {41 crypto.webkitSubtle.importKey(keyFormat, keyData, aesKeyGenParams, true, usages).then(function(localKey) { 42 42 worker.postMessage(localKey); 43 43 }); 44 44 </script> 45 <script src="../../ resources/js-test-post.js"></script>45 <script src="../../../resources/js-test-post.js"></script> 46 46 </body> 47 47 </html> -
trunk/LayoutTests/crypto/workers/subtle/resources/hrsa-postMessage-worker.js
r206882 r206883 1 importScripts("../../ resources/common.js");1 importScripts("../../../resources/common.js"); 2 2 3 3 onmessage = function(evt) -
trunk/LayoutTests/crypto/workers/subtle/resources/rsa-postMessage-worker.js
r206882 r206883 1 importScripts("../../ resources/common.js");1 importScripts("../../../resources/common.js"); 2 2 3 3 onmessage = function(evt) -
trunk/LayoutTests/crypto/workers/subtle/rsa-postMessage-worker.html
r206882 r206883 3 3 <head> 4 4 <meta charset="utf-8"> 5 <script src="../../ resources/js-test-pre.js"></script>6 <script src="../ resources/common.js"></script>5 <script src="../../../resources/js-test-pre.js"></script> 6 <script src="../../resources/common.js"></script> 7 7 </head> 8 8 <body> … … 73 73 } 74 74 75 crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), algorithmKeyGen, true, ['encrypt']).then(function(localPublicKey) {75 crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), algorithmKeyGen, true, ['encrypt']).then(function(localPublicKey) { 76 76 worker.postMessage({ publicKey: localPublicKey }); 77 77 }); 78 crypto. subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), algorithmKeyGen, false, ['decrypt']).then(function(localPrivateKey) {78 crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), algorithmKeyGen, false, ['decrypt']).then(function(localPrivateKey) { 79 79 worker.postMessage({ privateKey: localPrivateKey }); 80 80 }); 81 81 </script> 82 <script src="../../ resources/js-test-post.js"></script>82 <script src="../../../resources/js-test-post.js"></script> 83 83 </body> 84 84 </html> -
trunk/LayoutTests/imported/w3c/ChangeLog
r206882 r206883 1 2016-10-06 Jiewen Tan <jiewen_tan@apple.com> 2 3 Add a dummy SubtleCrypto interface 4 https://bugs.webkit.org/show_bug.cgi?id=162992 5 <rdar://problem/28643573> 6 7 Reviewed by Brent Fulgham. 8 9 * WebCryptoAPI/digest/test_digest-expected.txt: 10 * WebCryptoAPI/idlharness-expected.txt: 11 1 12 2016-10-06 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/WebCryptoAPI/digest/test_digest-expected.txt
r203201 r206883 2 2 3 3 4 FAIL SHA-1 with empty source data undefined is not an object (evaluating 'subtle.digest')5 FAIL sha-1 with empty source data undefined is not an object (evaluating 'subtle.digest')6 FAIL Sha-1 with empty source data undefined is not an object (evaluating 'subtle.digest')7 FAIL SHA-1 with empty source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')8 FAIL SHA-256 with empty source data undefined is not an object (evaluating 'subtle.digest')9 FAIL sha-256 with empty source data undefined is not an object (evaluating 'subtle.digest')10 FAIL Sha-256 with empty source data undefined is not an object (evaluating 'subtle.digest')11 FAIL SHA-256 with empty source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')12 FAIL SHA-384 with empty source data undefined is not an object (evaluating 'subtle.digest')13 FAIL sha-384 with empty source data undefined is not an object (evaluating 'subtle.digest')14 FAIL Sha-384 with empty source data undefined is not an object (evaluating 'subtle.digest')15 FAIL SHA-384 with empty source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')16 FAIL SHA-512 with empty source data undefined is not an object (evaluating 'subtle.digest')17 FAIL sha-512 with empty source data undefined is not an object (evaluating 'subtle.digest')18 FAIL Sha-512 with empty source data undefined is not an object (evaluating 'subtle.digest')19 FAIL SHA-512 with empty source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')20 FAIL SHA-1 with short source data undefined is not an object (evaluating 'subtle.digest')21 FAIL sha-1 with short source data undefined is not an object (evaluating 'subtle.digest')22 FAIL Sha-1 with short source data undefined is not an object (evaluating 'subtle.digest')23 FAIL SHA-1 with short source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')24 FAIL SHA-256 with short source data undefined is not an object (evaluating 'subtle.digest')25 FAIL sha-256 with short source data undefined is not an object (evaluating 'subtle.digest')26 FAIL Sha-256 with short source data undefined is not an object (evaluating 'subtle.digest')27 FAIL SHA-256 with short source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')28 FAIL SHA-384 with short source data undefined is not an object (evaluating 'subtle.digest')29 FAIL sha-384 with short source data undefined is not an object (evaluating 'subtle.digest')30 FAIL Sha-384 with short source data undefined is not an object (evaluating 'subtle.digest')31 FAIL SHA-384 with short source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')32 FAIL SHA-512 with short source data undefined is not an object (evaluating 'subtle.digest')33 FAIL sha-512 with short source data undefined is not an object (evaluating 'subtle.digest')34 FAIL Sha-512 with short source data undefined is not an object (evaluating 'subtle.digest')35 FAIL SHA-512 with short source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')36 FAIL SHA-1 with medium source data undefined is not an object (evaluating 'subtle.digest')37 FAIL sha-1 with medium source data undefined is not an object (evaluating 'subtle.digest')38 FAIL Sha-1 with medium source data undefined is not an object (evaluating 'subtle.digest')39 FAIL SHA-1 with medium source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')40 FAIL SHA-256 with medium source data undefined is not an object (evaluating 'subtle.digest')41 FAIL sha-256 with medium source data undefined is not an object (evaluating 'subtle.digest')42 FAIL Sha-256 with medium source data undefined is not an object (evaluating 'subtle.digest')43 FAIL SHA-256 with medium source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')44 FAIL SHA-384 with medium source data undefined is not an object (evaluating 'subtle.digest')45 FAIL sha-384 with medium source data undefined is not an object (evaluating 'subtle.digest')46 FAIL Sha-384 with medium source data undefined is not an object (evaluating 'subtle.digest')47 FAIL SHA-384 with medium source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')48 FAIL SHA-512 with medium source data undefined is not an object (evaluating 'subtle.digest')49 FAIL sha-512 with medium source data undefined is not an object (evaluating 'subtle.digest')50 FAIL Sha-512 with medium source data undefined is not an object (evaluating 'subtle.digest')51 FAIL SHA-512 with medium source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')52 FAIL SHA-1 with long source data undefined is not an object (evaluating 'subtle.digest')53 FAIL sha-1 with long source data undefined is not an object (evaluating 'subtle.digest')54 FAIL Sha-1 with long source data undefined is not an object (evaluating 'subtle.digest')55 FAIL SHA-1 with long source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')56 FAIL SHA-256 with long source data undefined is not an object (evaluating 'subtle.digest')57 FAIL sha-256 with long source data undefined is not an object (evaluating 'subtle.digest')58 FAIL Sha-256 with long source data undefined is not an object (evaluating 'subtle.digest')59 FAIL SHA-256 with long source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')60 FAIL SHA-384 with long source data undefined is not an object (evaluating 'subtle.digest')61 FAIL sha-384 with long source data undefined is not an object (evaluating 'subtle.digest')62 FAIL Sha-384 with long source data undefined is not an object (evaluating 'subtle.digest')63 FAIL SHA-384 with long source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')64 FAIL SHA-512 with long source data undefined is not an object (evaluating 'subtle.digest')65 FAIL sha-512 with long source data undefined is not an object (evaluating 'subtle.digest')66 FAIL Sha-512 with long source data undefined is not an object (evaluating 'subtle.digest')67 FAIL SHA-512 with long source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')68 FAIL AES-GCM with empty undefined is not an object (evaluating 'subtle.digest')69 FAIL RSA-OAEP with empty undefined is not an object (evaluating 'subtle.digest')70 FAIL PBKDF2 with empty undefined is not an object (evaluating 'subtle.digest')71 FAIL AES-KW with empty undefined is not an object (evaluating 'subtle.digest')72 FAIL AES-GCM with short undefined is not an object (evaluating 'subtle.digest')73 FAIL RSA-OAEP with short undefined is not an object (evaluating 'subtle.digest')74 FAIL PBKDF2 with short undefined is not an object (evaluating 'subtle.digest')75 FAIL AES-KW with short undefined is not an object (evaluating 'subtle.digest')76 FAIL AES-GCM with medium undefined is not an object (evaluating 'subtle.digest')77 FAIL RSA-OAEP with medium undefined is not an object (evaluating 'subtle.digest')78 FAIL PBKDF2 with medium undefined is not an object (evaluating 'subtle.digest')79 FAIL AES-KW with medium undefined is not an object (evaluating 'subtle.digest')80 FAIL AES-GCM with long undefined is not an object (evaluating 'subtle.digest')81 FAIL RSA-OAEP with long undefined is not an object (evaluating 'subtle.digest')82 FAIL PBKDF2 with long undefined is not an object (evaluating 'subtle.digest')83 FAIL AES-KW with long undefined is not an object (evaluating 'subtle.digest')4 FAIL SHA-1 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined) 5 FAIL sha-1 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 6 FAIL Sha-1 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 7 FAIL SHA-1 with empty source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined) 8 FAIL SHA-256 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined) 9 FAIL sha-256 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 10 FAIL Sha-256 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 11 FAIL SHA-256 with empty source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined) 12 FAIL SHA-384 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined) 13 FAIL sha-384 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 14 FAIL Sha-384 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 15 FAIL SHA-384 with empty source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined) 16 FAIL SHA-512 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined) 17 FAIL sha-512 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 18 FAIL Sha-512 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 19 FAIL SHA-512 with empty source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined) 20 FAIL SHA-1 with short source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined) 21 FAIL sha-1 with short source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 22 FAIL Sha-1 with short source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 23 FAIL SHA-1 with short source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined) 24 FAIL SHA-256 with short source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined) 25 FAIL sha-256 with short source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 26 FAIL Sha-256 with short source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 27 FAIL SHA-256 with short source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined) 28 FAIL SHA-384 with short source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined) 29 FAIL sha-384 with short source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 30 FAIL Sha-384 with short source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 31 FAIL SHA-384 with short source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined) 32 FAIL SHA-512 with short source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined) 33 FAIL sha-512 with short source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 34 FAIL Sha-512 with short source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 35 FAIL SHA-512 with short source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined) 36 FAIL SHA-1 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined) 37 FAIL sha-1 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 38 FAIL Sha-1 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 39 FAIL SHA-1 with medium source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined) 40 FAIL SHA-256 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined) 41 FAIL sha-256 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 42 FAIL Sha-256 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 43 FAIL SHA-256 with medium source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined) 44 FAIL SHA-384 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined) 45 FAIL sha-384 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 46 FAIL Sha-384 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 47 FAIL SHA-384 with medium source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined) 48 FAIL SHA-512 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined) 49 FAIL sha-512 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 50 FAIL Sha-512 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 51 FAIL SHA-512 with medium source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined) 52 FAIL SHA-1 with long source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined) 53 FAIL sha-1 with long source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 54 FAIL Sha-1 with long source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 55 FAIL SHA-1 with long source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined) 56 FAIL SHA-256 with long source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined) 57 FAIL sha-256 with long source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 58 FAIL Sha-256 with long source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 59 FAIL SHA-256 with long source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined) 60 FAIL SHA-384 with long source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined) 61 FAIL sha-384 with long source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 62 FAIL Sha-384 with long source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 63 FAIL SHA-384 with long source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined) 64 FAIL SHA-512 with long source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined) 65 FAIL sha-512 with long source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 66 FAIL Sha-512 with long source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined) 67 FAIL SHA-512 with long source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined) 68 FAIL AES-GCM with empty subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined) 69 FAIL RSA-OAEP with empty subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined) 70 FAIL PBKDF2 with empty subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined) 71 FAIL AES-KW with empty subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined) 72 FAIL AES-GCM with short subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined) 73 FAIL RSA-OAEP with short subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined) 74 FAIL PBKDF2 with short subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined) 75 FAIL AES-KW with short subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined) 76 FAIL AES-GCM with medium subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined) 77 FAIL RSA-OAEP with medium subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined) 78 FAIL PBKDF2 with medium subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined) 79 FAIL AES-KW with medium subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined) 80 FAIL AES-GCM with long subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined) 81 FAIL RSA-OAEP with long subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined) 82 FAIL PBKDF2 with long subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined) 83 FAIL AES-KW with long subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined) 84 84 -
trunk/LayoutTests/imported/w3c/WebCryptoAPI/idlharness-expected.txt
r205755 r206883 9 9 PASS Crypto interface: existence and properties of interface prototype object 10 10 PASS Crypto interface: existence and properties of interface prototype object's "constructor" property 11 FAIL Crypto interface: attribute subtle assert_true: The prototype object must have a property "subtle" expected true got false 11 PASS Crypto interface: attribute subtle 12 12 PASS Crypto interface: operation getRandomValues(ArrayBufferView) 13 13 PASS Crypto must be primary interface of crypto 14 14 PASS Stringification of crypto 15 FAIL Crypto interface: crypto must inherit property "subtle" with the proper type (0) assert_inherits: property "subtle" not found in prototype chain 15 PASS Crypto interface: crypto must inherit property "subtle" with the proper type (0) 16 16 PASS Crypto interface: crypto must inherit property "getRandomValues" with the proper type (1) 17 17 PASS Crypto interface: calling getRandomValues(ArrayBufferView) on crypto with too few arguments must throw TypeError … … 42 42 FAIL SubtleCrypto interface: operation wrapKey(KeyFormat,CryptoKey,CryptoKey,AlgorithmIdentifier) assert_own_property: self does not have own property "SubtleCrypto" expected property "SubtleCrypto" missing 43 43 FAIL SubtleCrypto interface: operation unwrapKey(KeyFormat,BufferSource,CryptoKey,AlgorithmIdentifier,AlgorithmIdentifier,boolean,[object Object]) assert_own_property: self does not have own property "SubtleCrypto" expected property "SubtleCrypto" missing 44 FAIL SubtleCrypto must be primary interface of crypto.subtle assert_ equals: wrong typeof object expected "object" but got "undefined"45 FAIL Stringification of crypto.subtle assert_equals: wrong typeof object expected "object" but got "undefined" 46 FAIL SubtleCrypto interface: crypto.subtle must inherit property "encrypt" with the proper type (0) assert_ equals: wrong typeof object expected "object" but got "undefined"47 FAIL SubtleCrypto interface: calling encrypt(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_ equals: wrong typeof object expected "object" but got "undefined"48 FAIL SubtleCrypto interface: crypto.subtle must inherit property "decrypt" with the proper type (1) assert_ equals: wrong typeof object expected "object" but got "undefined"49 FAIL SubtleCrypto interface: calling decrypt(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_ equals: wrong typeof object expected "object" but got "undefined"50 FAIL SubtleCrypto interface: crypto.subtle must inherit property "sign" with the proper type (2) assert_ equals: wrong typeof object expected "object" but got "undefined"51 FAIL SubtleCrypto interface: calling sign(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_ equals: wrong typeof object expected "object" but got "undefined"52 FAIL SubtleCrypto interface: crypto.subtle must inherit property "verify" with the proper type (3) assert_ equals: wrong typeof object expected "object" but got "undefined"53 FAIL SubtleCrypto interface: calling verify(AlgorithmIdentifier,CryptoKey,BufferSource,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_ equals: wrong typeof object expected "object" but got "undefined"54 FAIL SubtleCrypto interface: crypto.subtle must inherit property "digest" with the proper type (4) assert_ equals: wrong typeof object expected "object" but got "undefined"55 FAIL SubtleCrypto interface: calling digest(AlgorithmIdentifier,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_ equals: wrong typeof object expected "object" but got "undefined"56 FAIL SubtleCrypto interface: crypto.subtle must inherit property "generateKey" with the proper type (5) assert_ equals: wrong typeof object expected "object" but got "undefined"57 FAIL SubtleCrypto interface: calling generateKey(AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError assert_ equals: wrong typeof object expected "object" but got "undefined"58 FAIL SubtleCrypto interface: crypto.subtle must inherit property "deriveKey" with the proper type (6) assert_ equals: wrong typeof object expected "object" but got "undefined"59 FAIL SubtleCrypto interface: calling deriveKey(AlgorithmIdentifier,CryptoKey,AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError assert_ equals: wrong typeof object expected "object" but got "undefined"60 FAIL SubtleCrypto interface: crypto.subtle must inherit property "deriveBits" with the proper type (7) assert_ equals: wrong typeof object expected "object" but got "undefined"61 FAIL SubtleCrypto interface: calling deriveBits(AlgorithmIdentifier,CryptoKey,unsigned long) on crypto.subtle with too few arguments must throw TypeError assert_ equals: wrong typeof object expected "object" but got "undefined"62 FAIL SubtleCrypto interface: crypto.subtle must inherit property "importKey" with the proper type (8) assert_ equals: wrong typeof object expected "object" but got "undefined"63 FAIL SubtleCrypto interface: calling importKey(KeyFormat,[object Object],[object Object],AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError assert_ equals: wrong typeof object expected "object" but got "undefined"64 FAIL SubtleCrypto interface: crypto.subtle must inherit property "exportKey" with the proper type (9) assert_ equals: wrong typeof object expected "object" but got "undefined"65 FAIL SubtleCrypto interface: calling exportKey(KeyFormat,CryptoKey) on crypto.subtle with too few arguments must throw TypeError assert_ equals: wrong typeof object expected "object" but got "undefined"66 FAIL SubtleCrypto interface: crypto.subtle must inherit property "wrapKey" with the proper type (10) assert_ equals: wrong typeof object expected "object" but got "undefined"67 FAIL SubtleCrypto interface: calling wrapKey(KeyFormat,CryptoKey,CryptoKey,AlgorithmIdentifier) on crypto.subtle with too few arguments must throw TypeError assert_ equals: wrong typeof object expected "object" but got "undefined"68 FAIL SubtleCrypto interface: crypto.subtle must inherit property "unwrapKey" with the proper type (11) assert_ equals: wrong typeof object expected "object" but got "undefined"69 FAIL SubtleCrypto interface: calling unwrapKey(KeyFormat,BufferSource,CryptoKey,AlgorithmIdentifier,AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError assert_ equals: wrong typeof object expected "object" but got "undefined"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 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 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 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 50 FAIL SubtleCrypto interface: crypto.subtle must inherit property "sign" with the proper type (2) assert_inherits: property "sign" not found in prototype chain 51 FAIL SubtleCrypto interface: calling sign(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "sign" not found in prototype chain 52 FAIL SubtleCrypto interface: crypto.subtle must inherit property "verify" with the proper type (3) assert_inherits: property "verify" not found in prototype chain 53 FAIL SubtleCrypto interface: calling verify(AlgorithmIdentifier,CryptoKey,BufferSource,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "verify" not found in prototype chain 54 FAIL SubtleCrypto interface: crypto.subtle must inherit property "digest" with the proper type (4) assert_inherits: property "digest" not found in prototype chain 55 FAIL SubtleCrypto interface: calling digest(AlgorithmIdentifier,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "digest" not found in prototype chain 56 FAIL SubtleCrypto interface: crypto.subtle must inherit property "generateKey" with the proper type (5) assert_inherits: property "generateKey" not found in prototype chain 57 FAIL SubtleCrypto interface: calling generateKey(AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "generateKey" not found in prototype chain 58 FAIL SubtleCrypto interface: crypto.subtle must inherit property "deriveKey" with the proper type (6) assert_inherits: property "deriveKey" not found in prototype chain 59 FAIL SubtleCrypto interface: calling deriveKey(AlgorithmIdentifier,CryptoKey,AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "deriveKey" not found in prototype chain 60 FAIL SubtleCrypto interface: crypto.subtle must inherit property "deriveBits" with the proper type (7) assert_inherits: property "deriveBits" not found in prototype chain 61 FAIL SubtleCrypto interface: calling deriveBits(AlgorithmIdentifier,CryptoKey,unsigned long) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "deriveBits" not found in prototype chain 62 FAIL SubtleCrypto interface: crypto.subtle must inherit property "importKey" with the proper type (8) assert_inherits: property "importKey" not found in prototype chain 63 FAIL SubtleCrypto interface: calling importKey(KeyFormat,[object Object],[object Object],AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "importKey" not found in prototype chain 64 FAIL SubtleCrypto interface: crypto.subtle must inherit property "exportKey" with the proper type (9) assert_inherits: property "exportKey" not found in prototype chain 65 FAIL SubtleCrypto interface: calling exportKey(KeyFormat,CryptoKey) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "exportKey" not found in prototype chain 66 FAIL SubtleCrypto interface: crypto.subtle must inherit property "wrapKey" with the proper type (10) assert_inherits: property "wrapKey" not found in prototype chain 67 FAIL SubtleCrypto interface: calling wrapKey(KeyFormat,CryptoKey,CryptoKey,AlgorithmIdentifier) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "wrapKey" not found in prototype chain 68 FAIL SubtleCrypto interface: crypto.subtle must inherit property "unwrapKey" with the proper type (11) assert_inherits: property "unwrapKey" not found in prototype chain 69 FAIL SubtleCrypto interface: calling unwrapKey(KeyFormat,BufferSource,CryptoKey,AlgorithmIdentifier,AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "unwrapKey" not found in prototype chain 70 70 -
trunk/LayoutTests/platform/efl/TestExpectations
r206840 r206883 376 376 http/tests/security/cross-origin-worker-indexeddb.html [ Skip ] 377 377 378 webkit.org/b/87661 crypto/ subtle/rsa-indexeddb.html [ Skip ]378 webkit.org/b/87661 crypto/webkitSubtle/rsa-indexeddb.html [ Skip ] 379 379 storage/indexeddb/database-odd-names.html [ Skip ] 380 380 … … 1958 1958 webkit.org/b/133122 crypto/subtle [ Skip ] 1959 1959 webkit.org/b/133122 crypto/webkitSubtle [ Skip ] 1960 webkit.org/b/133319 crypto/ subtle/sha-1.html [ Pass ]1961 webkit.org/b/133319 crypto/ subtle/sha-224.html [ Pass ]1962 webkit.org/b/133319 crypto/ subtle/sha-256.html [ Pass ]1963 webkit.org/b/133319 crypto/ subtle/sha-384.html [ Pass ]1964 webkit.org/b/133319 crypto/ subtle/sha-512.html [ Pass ]1965 webkit.org/b/133320 crypto/ subtle/hmac-check-algorithm.html [ Pass ]1966 webkit.org/b/133320 crypto/ subtle/hmac-export-key.html [ Pass ]1967 webkit.org/b/133320 crypto/ subtle/hmac-generate-key.html [ Pass ]1968 webkit.org/b/133320 crypto/ subtle/hmac-import-jwk.html [ Pass ]1969 webkit.org/b/133320 crypto/ subtle/hmac-sign-verify-empty-key.html [ Pass ]1970 webkit.org/b/133320 crypto/ subtle/hmac-sign-verify.html [ Pass ]1960 webkit.org/b/133319 crypto/webkitSubtle/sha-1.html [ Pass ] 1961 webkit.org/b/133319 crypto/webkitSubtle/sha-224.html [ Pass ] 1962 webkit.org/b/133319 crypto/webkitSubtle/sha-256.html [ Pass ] 1963 webkit.org/b/133319 crypto/webkitSubtle/sha-384.html [ Pass ] 1964 webkit.org/b/133319 crypto/webkitSubtle/sha-512.html [ Pass ] 1965 webkit.org/b/133320 crypto/webkitSubtle/hmac-check-algorithm.html [ Pass ] 1966 webkit.org/b/133320 crypto/webkitSubtle/hmac-export-key.html [ Pass ] 1967 webkit.org/b/133320 crypto/webkitSubtle/hmac-generate-key.html [ Pass ] 1968 webkit.org/b/133320 crypto/webkitSubtle/hmac-import-jwk.html [ Pass ] 1969 webkit.org/b/133320 crypto/webkitSubtle/hmac-sign-verify-empty-key.html [ Pass ] 1970 webkit.org/b/133320 crypto/webkitSubtle/hmac-sign-verify.html [ Pass ] 1971 1971 1972 1972 # Missing EFL's accessibility functions -
trunk/LayoutTests/platform/gtk/TestExpectations
r206261 r206883 378 378 webkit.org/b/133122 crypto/subtle [ Skip ] 379 379 webkit.org/b/133122 crypto/webkitSubtle [ Skip ] 380 webkit.org/b/133319 crypto/ subtle/sha-1.html [ Pass ]381 webkit.org/b/133319 crypto/ subtle/sha-224.html [ Pass ]382 webkit.org/b/133319 crypto/ subtle/sha-256.html [ Pass ]383 webkit.org/b/133319 crypto/ subtle/sha-384.html [ Pass ]384 webkit.org/b/133319 crypto/ subtle/sha-512.html [ Pass ]385 webkit.org/b/133320 crypto/ subtle/hmac-check-algorithm.html [ Pass ]386 webkit.org/b/133320 crypto/ subtle/hmac-export-key.html [ Pass ]387 webkit.org/b/133320 crypto/ subtle/hmac-generate-key.html [ Pass ]388 webkit.org/b/133320 crypto/ subtle/hmac-import-jwk.html [ Pass ]389 webkit.org/b/133320 crypto/ subtle/hmac-sign-verify-empty-key.html [ Pass ]390 webkit.org/b/133320 crypto/ subtle/hmac-sign-verify.html [ Pass ]380 webkit.org/b/133319 crypto/webkitSubtle/sha-1.html [ Pass ] 381 webkit.org/b/133319 crypto/webkitSubtle/sha-224.html [ Pass ] 382 webkit.org/b/133319 crypto/webkitSubtle/sha-256.html [ Pass ] 383 webkit.org/b/133319 crypto/webkitSubtle/sha-384.html [ Pass ] 384 webkit.org/b/133319 crypto/webkitSubtle/sha-512.html [ Pass ] 385 webkit.org/b/133320 crypto/webkitSubtle/hmac-check-algorithm.html [ Pass ] 386 webkit.org/b/133320 crypto/webkitSubtle/hmac-export-key.html [ Pass ] 387 webkit.org/b/133320 crypto/webkitSubtle/hmac-generate-key.html [ Pass ] 388 webkit.org/b/133320 crypto/webkitSubtle/hmac-import-jwk.html [ Pass ] 389 webkit.org/b/133320 crypto/webkitSubtle/hmac-sign-verify-empty-key.html [ Pass ] 390 webkit.org/b/133320 crypto/webkitSubtle/hmac-sign-verify.html [ Pass ] 391 391 392 392 # GTK does not implement setAutomaticLinkDetectionEnabled … … 2262 2262 webkit.org/b/107825 media/video-controls-fullscreen-volume.html [ Failure ] 2263 2263 2264 webkit.org/b/107194 crypto/ subtle/rsa-indexeddb.html [ Skip ]2264 webkit.org/b/107194 crypto/webkitSubtle/rsa-indexeddb.html [ Skip ] 2265 2265 2266 2266 # Test marked in TestExpectations as failing on non-retina displays, passing on GTK port -
trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations
r206659 r206883 997 997 imported/w3c/IndexedDB-private-browsing 998 998 imported/w3c/web-platform-tests/IndexedDB 999 crypto/ subtle/rsa-indexeddb-non-exportable-private.html1000 crypto/ subtle/rsa-indexeddb-non-exportable.html1001 crypto/ subtle/rsa-indexeddb-private.html1002 crypto/ subtle/rsa-indexeddb.html999 crypto/webkitSubtle/rsa-indexeddb-non-exportable-private.html 1000 crypto/webkitSubtle/rsa-indexeddb-non-exportable.html 1001 crypto/webkitSubtle/rsa-indexeddb-private.html 1002 crypto/webkitSubtle/rsa-indexeddb.html 1003 1003 fast/history/page-cache-indexed-closed-db.html 1004 1004 fast/history/page-cache-indexed-opened-db.html -
trunk/LayoutTests/platform/win/TestExpectations
r206659 r206883 258 258 http/tests/security/cross-origin-worker-indexeddb.html [ Skip ] 259 259 http/tests/security/no-indexeddb-from-sandbox.html [ Skip ] 260 crypto/ subtle/rsa-indexeddb-non-exportable-private.html [ Skip ]261 crypto/ subtle/rsa-indexeddb-non-exportable.html [ Skip ]262 crypto/ subtle/rsa-indexeddb-private.html [ Skip ]263 crypto/ subtle/rsa-indexeddb.html [ Skip ]260 crypto/webkitSubtle/rsa-indexeddb-non-exportable-private.html [ Skip ] 261 crypto/webkitSubtle/rsa-indexeddb-non-exportable.html [ Skip ] 262 crypto/webkitSubtle/rsa-indexeddb-private.html [ Skip ] 263 crypto/webkitSubtle/rsa-indexeddb.html [ Skip ] 264 264 fast/history/page-cache-indexed-closed-db.html [ Skip ] 265 265 fast/history/page-cache-indexed-opened-db.html [ Skip ] -
trunk/Source/WebCore/CMakeLists.txt
r206877 r206883 328 328 crypto/CryptoKey.idl 329 329 crypto/CryptoKeyPair.idl 330 crypto/SubtleCrypto.idl 330 331 crypto/WebKitSubtleCrypto.idl 331 332 -
trunk/Source/WebCore/ChangeLog
r206881 r206883 1 2016-10-06 Jiewen Tan <jiewen_tan@apple.com> 2 3 Add a dummy SubtleCrypto interface 4 https://bugs.webkit.org/show_bug.cgi?id=162992 5 <rdar://problem/28643573> 6 7 Reviewed by Brent Fulgham. 8 9 Add a dummy SubtleCrypto interface and rename KeyPair to CryptoKeyPair. 10 11 Tests: crypto/subtle/gc-2.html 12 crypto/subtle/gc-3.html 13 crypto/subtle/gc.html 14 crypto/webkitSubtle/aes-cbc-192-encrypt-decrypt.html 15 crypto/webkitSubtle/aes-cbc-256-encrypt-decrypt.html 16 crypto/webkitSubtle/aes-cbc-encrypt-decrypt-with-padding.html 17 crypto/webkitSubtle/aes-cbc-encrypt-decrypt.html 18 crypto/webkitSubtle/aes-cbc-generate-key.html 19 crypto/webkitSubtle/aes-cbc-import-jwk.html 20 crypto/webkitSubtle/aes-cbc-invalid-length.html 21 crypto/webkitSubtle/aes-cbc-unwrap-failure.html 22 crypto/webkitSubtle/aes-cbc-unwrap-rsa.html 23 crypto/webkitSubtle/aes-cbc-wrap-rsa-non-extractable.html 24 crypto/webkitSubtle/aes-cbc-wrap-rsa.html 25 crypto/webkitSubtle/aes-cbc-wrong-key-class.html 26 crypto/webkitSubtle/aes-export-key.html 27 crypto/webkitSubtle/aes-kw-key-manipulation.html 28 crypto/webkitSubtle/aes-kw-wrap-unwrap-aes.html 29 crypto/webkitSubtle/aes-postMessage.html 30 crypto/webkitSubtle/argument-conversion.html 31 crypto/webkitSubtle/array-buffer-view-offset.html 32 crypto/webkitSubtle/crypto-key-algorithm-gc.html 33 crypto/webkitSubtle/crypto-key-usages-gc.html 34 crypto/webkitSubtle/hmac-check-algorithm.html 35 crypto/webkitSubtle/hmac-export-key.html 36 crypto/webkitSubtle/hmac-generate-key.html 37 crypto/webkitSubtle/hmac-import-jwk.html 38 crypto/webkitSubtle/hmac-postMessage.html 39 crypto/webkitSubtle/hmac-sign-verify-empty-key.html 40 crypto/webkitSubtle/hmac-sign-verify.html 41 crypto/webkitSubtle/import-jwk.html 42 crypto/webkitSubtle/jwk-export-use-values.html 43 crypto/webkitSubtle/jwk-import-use-values.html 44 crypto/webkitSubtle/rsa-export-generated-keys.html 45 crypto/webkitSubtle/rsa-export-key.html 46 crypto/webkitSubtle/rsa-export-private-key.html 47 crypto/webkitSubtle/rsa-indexeddb-non-exportable-private.html 48 crypto/webkitSubtle/rsa-indexeddb-non-exportable.html 49 crypto/webkitSubtle/rsa-indexeddb-private.html 50 crypto/webkitSubtle/rsa-indexeddb.html 51 crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key.html 52 crypto/webkitSubtle/rsa-oaep-key-manipulation.html 53 crypto/webkitSubtle/rsa-oaep-plaintext-length.html 54 crypto/webkitSubtle/rsa-oaep-wrap-unwrap-aes.html 55 crypto/webkitSubtle/rsa-postMessage.html 56 crypto/webkitSubtle/rsaes-pkcs1-v1_5-decrypt.html 57 crypto/webkitSubtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html 58 crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html 59 crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key.html 60 crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html 61 crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk.html 62 crypto/webkitSubtle/rsassa-pkcs1-v1_5-sign-verify.html 63 crypto/webkitSubtle/sha-1.html 64 crypto/webkitSubtle/sha-224.html 65 crypto/webkitSubtle/sha-256.html 66 crypto/webkitSubtle/sha-384.html 67 crypto/webkitSubtle/sha-512.html 68 crypto/webkitSubtle/unimplemented-unwrap-crash.html 69 crypto/webkitSubtle/unwrapKey-check-usage.html 70 crypto/webkitSubtle/wrapKey-check-usage.html 71 crypto/workers/subtle/aes-postMessage-worker.html 72 crypto/workers/subtle/gc-worker.html 73 crypto/workers/subtle/hmac-postMessage-worker.html 74 crypto/workers/subtle/hrsa-postMessage-worker.html 75 crypto/workers/subtle/multiple-postMessage-worker.html 76 crypto/workers/subtle/rsa-postMessage-worker.html 77 78 * CMakeLists.txt: 79 * DerivedSources.cpp: 80 * DerivedSources.make: 81 * PlatformEfl.cmake: 82 * PlatformGTK.cmake: 83 * PlatformMac.cmake: 84 * WebCore.xcodeproj/project.pbxproj: 85 * crypto/CryptoKeyPair.idl: 86 * crypto/SubtleCrypto.cpp: 87 (WebCore::SubtleCrypto::SubtleCrypto): 88 * crypto/SubtleCrypto.h: 89 (WebCore::SubtleCrypto::create): 90 * crypto/SubtleCrypto.idl: Added. 91 * page/Crypto.cpp: 92 (WebCore::Crypto::Crypto): 93 (WebCore::Crypto::subtle): 94 * page/Crypto.h: 95 * page/Crypto.idl: 96 1 97 2016-10-06 Anders Carlsson <andersca@apple.com> 2 98 -
trunk/Source/WebCore/DerivedSources.cpp
r206877 r206883 600 600 #include "JSStyleSheet.cpp" 601 601 #include "JSStyleSheetList.cpp" 602 #include "JSSubtleCrypto.cpp" 602 603 #include "JSText.cpp" 603 604 #include "JSTextEvent.cpp" -
trunk/Source/WebCore/DerivedSources.make
r206877 r206883 239 239 $(WebCore)/crypto/CryptoKey.idl \ 240 240 $(WebCore)/crypto/CryptoKeyPair.idl \ 241 $(WebCore)/crypto/SubtleCrypto.idl \ 241 242 $(WebCore)/crypto/WebKitSubtleCrypto.idl \ 242 243 $(WebCore)/css/CSSCharsetRule.idl \ -
trunk/Source/WebCore/PlatformEfl.cmake
r206779 r206883 408 408 crypto/CryptoKey.cpp 409 409 crypto/CryptoKeyPair.cpp 410 crypto/SubtleCrypto.cpp 410 411 crypto/WebKitSubtleCrypto.cpp 411 412 -
trunk/Source/WebCore/PlatformGTK.cmake
r206779 r206883 401 401 crypto/CryptoKey.cpp 402 402 crypto/CryptoKeyPair.cpp 403 crypto/SubtleCrypto.cpp 403 404 crypto/WebKitSubtleCrypto.cpp 404 405 -
trunk/Source/WebCore/PlatformMac.cmake
r206779 r206883 181 181 crypto/CryptoKey.cpp 182 182 crypto/CryptoKeyPair.cpp 183 crypto/SubtleCrypto.cpp 183 184 crypto/WebKitSubtleCrypto.cpp 184 185 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r206877 r206883 2283 2283 570A99DA1D417408004EC630 /* JSWebKitSubtleCrypto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1FF8F62180745D800132674 /* JSWebKitSubtleCrypto.cpp */; }; 2284 2284 570A99DB1D41A2F3004EC630 /* JSWebKitSubtleCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = E1FF8F63180745D800132674 /* JSWebKitSubtleCrypto.h */; }; 2285 571F21891DA57C54005C9EFD /* JSSubtleCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = 571F21881DA57C54005C9EFD /* JSSubtleCrypto.h */; }; 2286 571F218B1DA57C7B005C9EFD /* JSSubtleCrypto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 571F218A1DA57C7A005C9EFD /* JSSubtleCrypto.cpp */; }; 2285 2287 572A7F211C6E5719009C6149 /* SimulatedClick.h in Headers */ = {isa = PBXBuildFile; fileRef = 572A7F201C6E5719009C6149 /* SimulatedClick.h */; }; 2286 2288 572A7F231C6E5A66009C6149 /* SimulatedClick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 572A7F221C6E5A66009C6149 /* SimulatedClick.cpp */; }; 2289 5778BD821DA4806C009E3009 /* SubtleCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = 5778BD811DA4802C009E3009 /* SubtleCrypto.h */; }; 2290 5778BD841DA4817B009E3009 /* SubtleCrypto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5778BD831DA4817B009E3009 /* SubtleCrypto.cpp */; }; 2287 2291 57EF5E601D20C83900171E60 /* TextCodecReplacement.h in Headers */ = {isa = PBXBuildFile; fileRef = 57EF5E5F1D20C83900171E60 /* TextCodecReplacement.h */; }; 2288 2292 57EF5E621D20D28700171E60 /* TextCodecReplacement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57EF5E611D20D28700171E60 /* TextCodecReplacement.cpp */; }; … … 9324 9328 5709E8CB1D413CE3003244AC /* WebKitSubtleCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitSubtleCrypto.h; sourceTree = "<group>"; }; 9325 9329 5709E8CC1D413CE3003244AC /* WebKitSubtleCrypto.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitSubtleCrypto.idl; sourceTree = "<group>"; }; 9330 571F21881DA57C54005C9EFD /* JSSubtleCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSubtleCrypto.h; sourceTree = "<group>"; }; 9331 571F218A1DA57C7A005C9EFD /* JSSubtleCrypto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSubtleCrypto.cpp; sourceTree = "<group>"; }; 9326 9332 572A7F201C6E5719009C6149 /* SimulatedClick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimulatedClick.h; sourceTree = "<group>"; }; 9327 9333 572A7F221C6E5A66009C6149 /* SimulatedClick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimulatedClick.cpp; sourceTree = "<group>"; }; 9328 9334 574D42791D594FF6002CF50E /* GlobalCrypto.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GlobalCrypto.idl; sourceTree = "<group>"; }; 9335 5778BD801DA4733E009E3009 /* SubtleCrypto.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SubtleCrypto.idl; sourceTree = "<group>"; }; 9336 5778BD811DA4802C009E3009 /* SubtleCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubtleCrypto.h; sourceTree = "<group>"; }; 9337 5778BD831DA4817B009E3009 /* SubtleCrypto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SubtleCrypto.cpp; sourceTree = "<group>"; }; 9329 9338 57EF5E5F1D20C83900171E60 /* TextCodecReplacement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextCodecReplacement.h; sourceTree = "<group>"; }; 9330 9339 57EF5E611D20D28700171E60 /* TextCodecReplacement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextCodecReplacement.cpp; sourceTree = "<group>"; }; … … 22249 22258 E172AF6F180F289500FBADB9 /* CryptoKeyUsage.h */, 22250 22259 E18DF33418AAF12C00773E59 /* SerializedCryptoKeyWrap.h */, 22260 5778BD811DA4802C009E3009 /* SubtleCrypto.h */, 22261 5778BD831DA4817B009E3009 /* SubtleCrypto.cpp */, 22262 5778BD801DA4733E009E3009 /* SubtleCrypto.idl */, 22251 22263 5709E8CA1D413CE3003244AC /* WebKitSubtleCrypto.cpp */, 22252 22264 5709E8CB1D413CE3003244AC /* WebKitSubtleCrypto.h */, … … 22263 22275 E1F80B8B183172B5007885C3 /* JSCryptoKeyPair.cpp */, 22264 22276 E1F80B8C183172B5007885C3 /* JSCryptoKeyPair.h */, 22277 571F218A1DA57C7A005C9EFD /* JSSubtleCrypto.cpp */, 22278 571F21881DA57C54005C9EFD /* JSSubtleCrypto.h */, 22265 22279 E1FF8F62180745D800132674 /* JSWebKitSubtleCrypto.cpp */, 22266 22280 E1FF8F63180745D800132674 /* JSWebKitSubtleCrypto.h */, … … 24503 24517 416E6FE81BBD12DF000A6023 /* FetchInternalsBuiltins.h in Headers */, 24504 24518 41AD753A1CEF6BD100A31486 /* FetchOptions.h in Headers */, 24519 5778BD821DA4806C009E3009 /* SubtleCrypto.h in Headers */, 24505 24520 84730D8B1248F0B300D3A9C9 /* FETile.h in Headers */, 24506 24521 84730D8D1248F0B300D3A9C9 /* FETurbulence.h in Headers */, … … 25171 25186 9752D38E1413104B003305BD /* JSHTMLSpanElement.h in Headers */, 25172 25187 A80E7B0E0A19D606007FB8C5 /* JSHTMLStyleElement.h in Headers */, 25188 571F21891DA57C54005C9EFD /* JSSubtleCrypto.h in Headers */, 25173 25189 BCA169A30BFD55B40019CA76 /* JSHTMLTableCaptionElement.h in Headers */, 25174 25190 BC06EDE40BFD6D0D00856E9D /* JSHTMLTableCellElement.h in Headers */, … … 27551 27567 buildActionMask = 2147483647; 27552 27568 files = ( 27569 571F218B1DA57C7B005C9EFD /* JSSubtleCrypto.cpp in Sources */, 27553 27570 41E1B1D00FF5986900576B3B /* AbstractWorker.cpp in Sources */, 27554 27571 37F57AB91A50726900876F98 /* AccessibilityARIAGrid.cpp in Sources */, … … 30300 30317 26FAE4CE1852E3A5004C8C46 /* SynchronousResourceHandleCFURLConnectionDelegate.cpp in Sources */, 30301 30318 E45390AE0EAFF4B5003695C8 /* SystemMemoryIOS.cpp in Sources */, 30319 5778BD841DA4817B009E3009 /* SubtleCrypto.cpp in Sources */, 30302 30320 CDA07FBD18E0A16A004699FA /* SystemSleepListener.cpp in Sources */, 30303 30321 CDA07FC118E0A22B004699FA /* SystemSleepListenerMac.mm in Sources */, -
trunk/Source/WebCore/crypto/CryptoKeyPair.idl
r189873 r206883 27 27 Conditional=SUBTLE_CRYPTO, 28 28 ImplementationLacksVTable, 29 InterfaceName=KeyPair,30 29 JSCustomMarkFunction, 31 30 NoInterfaceObject -
trunk/Source/WebCore/crypto/SubtleCrypto.cpp
r206882 r206883 1 1 /* 2 * Copyright (C) 201 3Apple Inc. All rights reserved.2 * Copyright (C) 2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 [ 27 Conditional=SUBTLE_CRYPTO, 28 ImplementationLacksVTable, 29 InterfaceName=KeyPair, 30 JSCustomMarkFunction, 31 NoInterfaceObject 32 ] interface CryptoKeyPair { 33 readonly attribute CryptoKey publicKey; 34 readonly attribute CryptoKey privateKey; 35 }; 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 -
trunk/Source/WebCore/crypto/SubtleCrypto.h
r206882 r206883 1 1 /* 2 * Copyright (C) 201 3Apple Inc. All rights reserved.2 * Copyright (C) 2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 [ 27 Conditional=SUBTLE_CRYPTO, 28 ImplementationLacksVTable, 29 InterfaceName=KeyPair, 30 JSCustomMarkFunction, 31 NoInterfaceObject 32 ] interface CryptoKeyPair { 33 readonly attribute CryptoKey publicKey; 34 readonly attribute CryptoKey privateKey; 26 #pragma once 27 28 #include "ContextDestructionObserver.h" 29 #include <wtf/Ref.h> 30 #include <wtf/RefCounted.h> 31 32 #if ENABLE(SUBTLE_CRYPTO) 33 34 namespace WebCore { 35 36 class SubtleCrypto : public ContextDestructionObserver, public RefCounted<SubtleCrypto> { 37 public: 38 static Ref<SubtleCrypto> create(ScriptExecutionContext& context) { return adoptRef(*new SubtleCrypto(context)); } 39 40 private: 41 SubtleCrypto(ScriptExecutionContext&); 35 42 }; 43 44 } 45 46 #endif -
trunk/Source/WebCore/page/Crypto.cpp
r204481 r206883 34 34 #include "Document.h" 35 35 #include "ExceptionCode.h" 36 #include "SubtleCrypto.h" 36 37 #include "WebKitSubtleCrypto.h" 37 38 #include <runtime/ArrayBufferView.h> … … 42 43 Crypto::Crypto(ScriptExecutionContext& context) 43 44 : ContextDestructionObserver(&context) 45 #if ENABLE(SUBTLE_CRYPTO) 46 , m_subtle(SubtleCrypto::create(context)) 47 #endif 44 48 { 45 49 } … … 63 67 64 68 #if ENABLE(SUBTLE_CRYPTO) 69 SubtleCrypto& Crypto::subtle() 70 { 71 return m_subtle; 72 } 73 65 74 WebKitSubtleCrypto* Crypto::webkitSubtle(ExceptionCode& ec) 66 75 { -
trunk/Source/WebCore/page/Crypto.h
r204481 r206883 46 46 class Document; 47 47 class WebKitSubtleCrypto; 48 class SubtleCrypto; 48 49 49 50 class Crypto : public ContextDestructionObserver, public RefCounted<Crypto> { … … 55 56 56 57 #if ENABLE(SUBTLE_CRYPTO) 58 SubtleCrypto& subtle(); 59 60 // Will be deprecated. 57 61 WebKitSubtleCrypto* webkitSubtle(ExceptionCode&); 58 62 #endif … … 62 66 63 67 #if ENABLE(SUBTLE_CRYPTO) 68 Ref<SubtleCrypto> m_subtle; 69 70 // Will be deprecated. 64 71 RefPtr<WebKitSubtleCrypto> m_webkitSubtle; 65 72 #endif -
trunk/Source/WebCore/page/Crypto.idl
r206723 r206883 32 32 GenerateIsReachable=ImplScriptExecutionContext, 33 33 ] interface Crypto { 34 [Conditional=SUBTLE_CRYPTO] readonly attribute SubtleCrypto subtle; 34 35 [Custom, MayThrowLegacyException] ArrayBufferView getRandomValues(ArrayBufferView array); 35 36 37 // Will be deprecated. 36 38 [Conditional=SUBTLE_CRYPTO, GetterMayThrowLegacyException] readonly attribute WebKitSubtleCrypto webkitSubtle; 37 39 };
Note: See TracChangeset
for help on using the changeset viewer.