From f200953adee3ed1059d312ddcf33c65a421ce009 Mon Sep 17 00:00:00 2001 From: Sean Michael Wykes <8363933+SeanWykes@users.noreply.github.com> Date: Sun, 2 Jan 2022 00:23:33 -0300 Subject: [PATCH 1/2] impl fix --- ext/crypto/00_crypto.js | 45 +++++-- tools/wpt/expectation.json | 270 ++++++++++++++++++++++++++++++++++++- 2 files changed, 299 insertions(+), 16 deletions(-) diff --git a/ext/crypto/00_crypto.js b/ext/crypto/00_crypto.js index 0a78bff2f935fb..68a6c5e33a61a8 100644 --- a/ext/crypto/00_crypto.js +++ b/ext/crypto/00_crypto.js @@ -13,6 +13,7 @@ const webidl = window.__bootstrap.webidl; const { DOMException } = window.__bootstrap.domException; const { btoa } = window.__bootstrap.base64; + const { TextEncoder, TextDecoder } = window.__bootstrap.encoding; const { ArrayBuffer, @@ -24,6 +25,8 @@ Int16Array, Int32Array, Int8Array, + JSONParse, + JSONStringify, ObjectAssign, StringFromCharCode, StringPrototypeReplace, @@ -1234,11 +1237,9 @@ if (format !== "jwk") { bytes = new Uint8Array(exportedKey); } else { - // TODO(@littledivy): Implement JWK. - throw new DOMException( - "Not implemented", - "NotSupportedError", - ); + const jwk = JSONStringify(exportedKey); + + bytes = new TextEncoder("utf-8").encode(jwk); } // 14-15. @@ -1253,7 +1254,17 @@ } else if ( supportedAlgorithms["encrypt"][normalizedAlgorithm.name] !== undefined ) { - return await encrypt(normalizedAlgorithm, wrappingKey, bytes); + return await encrypt( + normalizedAlgorithm, + constructKey( + wrappingKey[_type], + wrappingKey[_extractable], + ["encrypt"], + wrappingKey[_algorithm], + wrappingKey[_handle], + ), + bytes, + ); } else { throw new DOMException( "Algorithm not supported", @@ -1365,7 +1376,13 @@ ) { key = await this.decrypt( normalizedAlgorithm, - unwrappingKey, + constructKey( + unwrappingKey[_type], + unwrappingKey[_extractable], + ["decrypt"], + unwrappingKey[_algorithm], + unwrappingKey[_handle], + ), wrappedKey, ); } else { @@ -1375,14 +1392,14 @@ ); } + let bytes; // 14. - const bytes = key; - if (format == "jwk") { - // TODO(@littledivy): Implement JWK. - throw new DOMException( - "Not implemented", - "NotSupportedError", - ); + if (format !== "jwk") { + bytes = key; + } else { + const utf8 = new TextDecoder("utf-8").decode(key); + + bytes = JSONParse(utf8); } // 15. diff --git a/tools/wpt/expectation.json b/tools/wpt/expectation.json index f4d2869f4eb69b..2e877d4e71584e 100644 --- a/tools/wpt/expectation.json +++ b/tools/wpt/expectation.json @@ -1273,8 +1273,274 @@ "rsa_pss.https.any.worker.html": true }, "wrapKey_unwrapKey": { - "wrapKey_unwrapKey.https.any.html": false, - "wrapKey_unwrapKey.https.any.worker.html": false + "wrapKey_unwrapKey.https.any.html": [ + "setup", + "Can wrap and unwrap HMAC keys using raw and AES-CTR", + "Can wrap and unwrap HMAC keys as non-extractable using raw and AES-CTR", + "Can wrap and unwrap HMAC keys using jwk and AES-CTR", + "Can wrap and unwrap HMAC keys as non-extractable using jwk and AES-CTR", + "Can unwrap HMAC non-extractable keys using jwk and AES-CTR", + "Can wrap and unwrap AES-CTR keys using raw and AES-CTR", + "Can wrap and unwrap AES-CTR keys as non-extractable using raw and AES-CTR", + "Can wrap and unwrap AES-CTR keys using jwk and AES-CTR", + "Can wrap and unwrap AES-CTR keys as non-extractable using jwk and AES-CTR", + "Can unwrap AES-CTR non-extractable keys using jwk and AES-CTR", + "Can wrap and unwrap AES-CBC keys using raw and AES-CTR", + "Can wrap and unwrap AES-CBC keys as non-extractable using raw and AES-CTR", + "Can wrap and unwrap AES-CBC keys using jwk and AES-CTR", + "Can wrap and unwrap AES-CBC keys as non-extractable using jwk and AES-CTR", + "Can unwrap AES-CBC non-extractable keys using jwk and AES-CTR", + "Can wrap and unwrap AES-GCM keys using raw and AES-CTR", + "Can wrap and unwrap AES-GCM keys as non-extractable using raw and AES-CTR", + "Can wrap and unwrap AES-GCM keys using jwk and AES-CTR", + "Can wrap and unwrap AES-GCM keys as non-extractable using jwk and AES-CTR", + "Can unwrap AES-GCM non-extractable keys using jwk and AES-CTR", + "Can wrap and unwrap AES-KW keys using raw and AES-CTR", + "Can wrap and unwrap AES-KW keys as non-extractable using raw and AES-CTR", + "Can wrap and unwrap AES-KW keys using jwk and AES-CTR", + "Can wrap and unwrap AES-KW keys as non-extractable using jwk and AES-CTR", + "Can unwrap AES-KW non-extractable keys using jwk and AES-CTR", + "Can wrap and unwrap RSA-OAEP public key keys using spki and AES-CTR", + "Can wrap and unwrap RSA-OAEP public key keys using jwk and AES-CTR", + "Can wrap and unwrap RSA-OAEP private key keys using pkcs8 and AES-CTR", + "Can wrap and unwrap RSA-OAEP private key keys as non-extractable using pkcs8 and AES-CTR", + "Can wrap and unwrap RSA-OAEP private key keys using jwk and AES-CTR", + "Can wrap and unwrap RSA-OAEP private key keys as non-extractable using jwk and AES-CTR", + "Can unwrap RSA-OAEP private key non-extractable keys using jwk and AES-CTR", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using spki and AES-CTR", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using jwk and AES-CTR", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using pkcs8 and AES-CTR", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using pkcs8 and AES-CTR", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using jwk and AES-CTR", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using jwk and AES-CTR", + "Can unwrap RSASSA-PKCS1-v1_5 private key non-extractable keys using jwk and AES-CTR", + "Can wrap and unwrap RSA-PSS public key keys using spki and AES-CTR", + "Can wrap and unwrap RSA-PSS public key keys using jwk and AES-CTR", + "Can wrap and unwrap RSA-PSS private key keys using pkcs8 and AES-CTR", + "Can wrap and unwrap RSA-PSS private key keys as non-extractable using pkcs8 and AES-CTR", + "Can wrap and unwrap RSA-PSS private key keys using jwk and AES-CTR", + "Can wrap and unwrap RSA-PSS private key keys as non-extractable using jwk and AES-CTR", + "Can unwrap RSA-PSS private key non-extractable keys using jwk and AES-CTR", + "Can wrap and unwrap HMAC keys as non-extractable using raw and AES-CBC", + "Can wrap and unwrap HMAC keys using jwk and AES-CBC", + "Can wrap and unwrap HMAC keys as non-extractable using jwk and AES-CBC", + "Can unwrap HMAC non-extractable keys using jwk and AES-CBC", + "Can wrap and unwrap AES-CTR keys as non-extractable using raw and AES-CBC", + "Can wrap and unwrap AES-CTR keys as non-extractable using jwk and AES-CBC", + "Can unwrap AES-CTR non-extractable keys using jwk and AES-CBC", + "Can unwrap AES-CBC non-extractable keys using jwk and AES-CBC", + "Can wrap and unwrap AES-GCM keys as non-extractable using raw and AES-CBC", + "Can wrap and unwrap AES-GCM keys using jwk and AES-CBC", + "Can wrap and unwrap AES-GCM keys as non-extractable using jwk and AES-CBC", + "Can unwrap AES-GCM non-extractable keys using jwk and AES-CBC", + "Can wrap and unwrap AES-KW keys as non-extractable using raw and AES-CBC", + "Can wrap and unwrap AES-KW keys as non-extractable using jwk and AES-CBC", + "Can unwrap AES-KW non-extractable keys using jwk and AES-CBC", + "Can unwrap RSA-OAEP private key non-extractable keys using jwk and AES-CBC", + "Can unwrap RSASSA-PKCS1-v1_5 private key non-extractable keys using jwk and AES-CBC", + "Can unwrap RSA-PSS private key non-extractable keys using jwk and AES-CBC", + "Can wrap and unwrap HMAC keys using raw and AES-GCM", + "Can wrap and unwrap HMAC keys as non-extractable using raw and AES-GCM", + "Can wrap and unwrap HMAC keys using jwk and AES-GCM", + "Can wrap and unwrap HMAC keys as non-extractable using jwk and AES-GCM", + "Can unwrap HMAC non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap AES-CTR keys using raw and AES-GCM", + "Can wrap and unwrap AES-CTR keys as non-extractable using raw and AES-GCM", + "Can wrap and unwrap AES-CTR keys using jwk and AES-GCM", + "Can wrap and unwrap AES-CTR keys as non-extractable using jwk and AES-GCM", + "Can unwrap AES-CTR non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap AES-CBC keys using raw and AES-GCM", + "Can wrap and unwrap AES-CBC keys as non-extractable using raw and AES-GCM", + "Can wrap and unwrap AES-CBC keys using jwk and AES-GCM", + "Can wrap and unwrap AES-CBC keys as non-extractable using jwk and AES-GCM", + "Can unwrap AES-CBC non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap AES-GCM keys using raw and AES-GCM", + "Can wrap and unwrap AES-GCM keys as non-extractable using raw and AES-GCM", + "Can wrap and unwrap AES-GCM keys using jwk and AES-GCM", + "Can wrap and unwrap AES-GCM keys as non-extractable using jwk and AES-GCM", + "Can unwrap AES-GCM non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap AES-KW keys using raw and AES-GCM", + "Can wrap and unwrap AES-KW keys as non-extractable using raw and AES-GCM", + "Can wrap and unwrap AES-KW keys using jwk and AES-GCM", + "Can wrap and unwrap AES-KW keys as non-extractable using jwk and AES-GCM", + "Can unwrap AES-KW non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap RSA-OAEP public key keys using spki and AES-GCM", + "Can wrap and unwrap RSA-OAEP public key keys using jwk and AES-GCM", + "Can wrap and unwrap RSA-OAEP private key keys using pkcs8 and AES-GCM", + "Can wrap and unwrap RSA-OAEP private key keys as non-extractable using pkcs8 and AES-GCM", + "Can wrap and unwrap RSA-OAEP private key keys using jwk and AES-GCM", + "Can wrap and unwrap RSA-OAEP private key keys as non-extractable using jwk and AES-GCM", + "Can unwrap RSA-OAEP private key non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using spki and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using jwk and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using pkcs8 and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using pkcs8 and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using jwk and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using jwk and AES-GCM", + "Can unwrap RSASSA-PKCS1-v1_5 private key non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap RSA-PSS public key keys using spki and AES-GCM", + "Can wrap and unwrap RSA-PSS public key keys using jwk and AES-GCM", + "Can wrap and unwrap RSA-PSS private key keys using pkcs8 and AES-GCM", + "Can wrap and unwrap RSA-PSS private key keys as non-extractable using pkcs8 and AES-GCM", + "Can wrap and unwrap RSA-PSS private key keys using jwk and AES-GCM", + "Can wrap and unwrap RSA-PSS private key keys as non-extractable using jwk and AES-GCM", + "Can unwrap RSA-PSS private key non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap HMAC keys using raw and AES-KW", + "Can wrap and unwrap HMAC keys as non-extractable using raw and AES-KW", + "Can wrap and unwrap AES-CTR keys using raw and AES-KW", + "Can wrap and unwrap AES-CTR keys as non-extractable using raw and AES-KW", + "Can wrap and unwrap AES-CBC keys using raw and AES-KW", + "Can wrap and unwrap AES-CBC keys as non-extractable using raw and AES-KW", + "Can wrap and unwrap AES-GCM keys using raw and AES-KW", + "Can wrap and unwrap AES-GCM keys as non-extractable using raw and AES-KW", + "Can wrap and unwrap AES-KW keys using raw and AES-KW", + "Can wrap and unwrap AES-KW keys as non-extractable using raw and AES-KW", + "Can wrap and unwrap RSA-OAEP public key keys using jwk and AES-KW", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using jwk and AES-KW", + "Can wrap and unwrap RSA-PSS public key keys using jwk and AES-KW", + "Can wrap and unwrap HMAC keys as non-extractable using raw and RSA-OAEP", + "Can wrap and unwrap HMAC keys using jwk and RSA-OAEP", + "Can wrap and unwrap HMAC keys as non-extractable using jwk and RSA-OAEP", + "Can unwrap HMAC non-extractable keys using jwk and RSA-OAEP", + "Can wrap and unwrap AES-CTR keys as non-extractable using raw and RSA-OAEP", + "Can wrap and unwrap AES-CTR keys as non-extractable using jwk and RSA-OAEP", + "Can unwrap AES-CTR non-extractable keys using jwk and RSA-OAEP", + "Can wrap and unwrap AES-GCM keys as non-extractable using raw and RSA-OAEP", + "Can wrap and unwrap AES-GCM keys using jwk and RSA-OAEP", + "Can wrap and unwrap AES-GCM keys as non-extractable using jwk and RSA-OAEP", + "Can unwrap AES-GCM non-extractable keys using jwk and RSA-OAEP", + "Can wrap and unwrap AES-KW keys as non-extractable using raw and RSA-OAEP", + "Can wrap and unwrap AES-KW keys as non-extractable using jwk and RSA-OAEP", + "Can unwrap AES-KW non-extractable keys using jwk and RSA-OAEP" + ], + "wrapKey_unwrapKey.https.any.worker.html": [ + "setup", + "Can wrap and unwrap HMAC keys using raw and AES-CTR", + "Can wrap and unwrap HMAC keys as non-extractable using raw and AES-CTR", + "Can wrap and unwrap HMAC keys using jwk and AES-CTR", + "Can wrap and unwrap HMAC keys as non-extractable using jwk and AES-CTR", + "Can unwrap HMAC non-extractable keys using jwk and AES-CTR", + "Can wrap and unwrap AES-CTR keys using raw and AES-CTR", + "Can wrap and unwrap AES-CTR keys as non-extractable using raw and AES-CTR", + "Can wrap and unwrap AES-CTR keys using jwk and AES-CTR", + "Can wrap and unwrap AES-CTR keys as non-extractable using jwk and AES-CTR", + "Can unwrap AES-CTR non-extractable keys using jwk and AES-CTR", + "Can wrap and unwrap AES-CBC keys using raw and AES-CTR", + "Can wrap and unwrap AES-CBC keys as non-extractable using raw and AES-CTR", + "Can wrap and unwrap AES-CBC keys using jwk and AES-CTR", + "Can wrap and unwrap AES-CBC keys as non-extractable using jwk and AES-CTR", + "Can unwrap AES-CBC non-extractable keys using jwk and AES-CTR", + "Can wrap and unwrap AES-GCM keys using raw and AES-CTR", + "Can wrap and unwrap AES-GCM keys as non-extractable using raw and AES-CTR", + "Can wrap and unwrap AES-GCM keys using jwk and AES-CTR", + "Can wrap and unwrap AES-GCM keys as non-extractable using jwk and AES-CTR", + "Can unwrap AES-GCM non-extractable keys using jwk and AES-CTR", + "Can wrap and unwrap AES-KW keys using raw and AES-CTR", + "Can wrap and unwrap AES-KW keys as non-extractable using raw and AES-CTR", + "Can wrap and unwrap AES-KW keys using jwk and AES-CTR", + "Can wrap and unwrap AES-KW keys as non-extractable using jwk and AES-CTR", + "Can unwrap AES-KW non-extractable keys using jwk and AES-CTR", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using spki and AES-CTR", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using jwk and AES-CTR", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using pkcs8 and AES-CTR", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using pkcs8 and AES-CTR", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using jwk and AES-CTR", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using jwk and AES-CTR", + "Can unwrap RSASSA-PKCS1-v1_5 private key non-extractable keys using jwk and AES-CTR", + "Can wrap and unwrap RSA-OAEP public key keys using spki and AES-CTR", + "Can wrap and unwrap RSA-OAEP public key keys using jwk and AES-CTR", + "Can wrap and unwrap RSA-OAEP private key keys using pkcs8 and AES-CTR", + "Can wrap and unwrap RSA-OAEP private key keys as non-extractable using pkcs8 and AES-CTR", + "Can wrap and unwrap RSA-OAEP private key keys using jwk and AES-CTR", + "Can wrap and unwrap RSA-OAEP private key keys as non-extractable using jwk and AES-CTR", + "Can unwrap RSA-OAEP private key non-extractable keys using jwk and AES-CTR", + "Can wrap and unwrap RSA-PSS public key keys using spki and AES-CTR", + "Can wrap and unwrap RSA-PSS public key keys using jwk and AES-CTR", + "Can wrap and unwrap RSA-PSS private key keys using pkcs8 and AES-CTR", + "Can wrap and unwrap RSA-PSS private key keys as non-extractable using pkcs8 and AES-CTR", + "Can wrap and unwrap RSA-PSS private key keys using jwk and AES-CTR", + "Can wrap and unwrap RSA-PSS private key keys as non-extractable using jwk and AES-CTR", + "Can unwrap RSA-PSS private key non-extractable keys using jwk and AES-CTR", + "Can wrap and unwrap AES-CTR keys as non-extractable using raw and AES-CBC", + "Can wrap and unwrap AES-CTR keys using jwk and AES-CBC", + "Can wrap and unwrap AES-CTR keys as non-extractable using jwk and AES-CBC", + "Can unwrap AES-CTR non-extractable keys using jwk and AES-CBC", + "Can wrap and unwrap AES-GCM keys as non-extractable using raw and AES-CBC", + "Can wrap and unwrap AES-GCM keys as non-extractable using jwk and AES-CBC", + "Can unwrap AES-GCM non-extractable keys using jwk and AES-CBC", + "Can wrap and unwrap AES-KW keys as non-extractable using raw and AES-CBC", + "Can wrap and unwrap AES-KW keys as non-extractable using jwk and AES-CBC", + "Can unwrap AES-KW non-extractable keys using jwk and AES-CBC", + "Can wrap and unwrap HMAC keys using raw and AES-GCM", + "Can wrap and unwrap HMAC keys as non-extractable using raw and AES-GCM", + "Can wrap and unwrap HMAC keys using jwk and AES-GCM", + "Can wrap and unwrap HMAC keys as non-extractable using jwk and AES-GCM", + "Can unwrap HMAC non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap AES-CTR keys using raw and AES-GCM", + "Can wrap and unwrap AES-CTR keys as non-extractable using raw and AES-GCM", + "Can wrap and unwrap AES-CTR keys using jwk and AES-GCM", + "Can wrap and unwrap AES-CTR keys as non-extractable using jwk and AES-GCM", + "Can unwrap AES-CTR non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap AES-CBC keys using raw and AES-GCM", + "Can wrap and unwrap AES-CBC keys as non-extractable using raw and AES-GCM", + "Can wrap and unwrap AES-CBC keys using jwk and AES-GCM", + "Can wrap and unwrap AES-CBC keys as non-extractable using jwk and AES-GCM", + "Can unwrap AES-CBC non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap AES-GCM keys using raw and AES-GCM", + "Can wrap and unwrap AES-GCM keys as non-extractable using raw and AES-GCM", + "Can wrap and unwrap AES-GCM keys using jwk and AES-GCM", + "Can wrap and unwrap AES-GCM keys as non-extractable using jwk and AES-GCM", + "Can unwrap AES-GCM non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap AES-KW keys using raw and AES-GCM", + "Can wrap and unwrap AES-KW keys as non-extractable using raw and AES-GCM", + "Can wrap and unwrap AES-KW keys using jwk and AES-GCM", + "Can wrap and unwrap AES-KW keys as non-extractable using jwk and AES-GCM", + "Can unwrap AES-KW non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using spki and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using jwk and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using pkcs8 and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using pkcs8 and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using jwk and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using jwk and AES-GCM", + "Can unwrap RSASSA-PKCS1-v1_5 private key non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap RSA-OAEP public key keys using spki and AES-GCM", + "Can wrap and unwrap RSA-OAEP public key keys using jwk and AES-GCM", + "Can wrap and unwrap RSA-OAEP private key keys using pkcs8 and AES-GCM", + "Can wrap and unwrap RSA-OAEP private key keys as non-extractable using pkcs8 and AES-GCM", + "Can wrap and unwrap RSA-OAEP private key keys using jwk and AES-GCM", + "Can wrap and unwrap RSA-OAEP private key keys as non-extractable using jwk and AES-GCM", + "Can unwrap RSA-OAEP private key non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap RSA-PSS public key keys using spki and AES-GCM", + "Can wrap and unwrap RSA-PSS public key keys using jwk and AES-GCM", + "Can wrap and unwrap RSA-PSS private key keys using pkcs8 and AES-GCM", + "Can wrap and unwrap RSA-PSS private key keys as non-extractable using pkcs8 and AES-GCM", + "Can wrap and unwrap RSA-PSS private key keys using jwk and AES-GCM", + "Can wrap and unwrap RSA-PSS private key keys as non-extractable using jwk and AES-GCM", + "Can unwrap RSA-PSS private key non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap HMAC keys using raw and AES-KW", + "Can wrap and unwrap HMAC keys as non-extractable using raw and AES-KW", + "Can wrap and unwrap AES-CTR keys using raw and AES-KW", + "Can wrap and unwrap AES-CTR keys as non-extractable using raw and AES-KW", + "Can wrap and unwrap AES-CBC keys using raw and AES-KW", + "Can wrap and unwrap AES-CBC keys as non-extractable using raw and AES-KW", + "Can wrap and unwrap AES-GCM keys using raw and AES-KW", + "Can wrap and unwrap AES-GCM keys as non-extractable using raw and AES-KW", + "Can wrap and unwrap AES-KW keys using raw and AES-KW", + "Can wrap and unwrap AES-KW keys as non-extractable using raw and AES-KW", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using jwk and AES-KW", + "Can wrap and unwrap RSA-OAEP public key keys using jwk and AES-KW", + "Can wrap and unwrap RSA-PSS public key keys using jwk and AES-KW", + "Can wrap and unwrap AES-CTR keys as non-extractable using raw and RSA-OAEP", + "Can wrap and unwrap AES-CTR keys using jwk and RSA-OAEP", + "Can wrap and unwrap AES-CTR keys as non-extractable using jwk and RSA-OAEP", + "Can unwrap AES-CTR non-extractable keys using jwk and RSA-OAEP", + "Can wrap and unwrap AES-GCM keys as non-extractable using raw and RSA-OAEP", + "Can wrap and unwrap AES-GCM keys as non-extractable using jwk and RSA-OAEP", + "Can unwrap AES-GCM non-extractable keys using jwk and RSA-OAEP", + "Can wrap and unwrap AES-KW keys as non-extractable using raw and RSA-OAEP", + "Can wrap and unwrap AES-KW keys as non-extractable using jwk and RSA-OAEP", + "Can unwrap AES-KW non-extractable keys using jwk and RSA-OAEP" + ] } }, "console": { From 7896f06b03f20dcbecf47750aebb4dc9bbe2231d Mon Sep 17 00:00:00 2001 From: Sean Michael Wykes <8363933+SeanWykes@users.noreply.github.com> Date: Tue, 4 Jan 2022 22:28:53 -0300 Subject: [PATCH 2/2] WPT --- tools/wpt/expectation.json | 140 +++++-------------------------------- 1 file changed, 16 insertions(+), 124 deletions(-) diff --git a/tools/wpt/expectation.json b/tools/wpt/expectation.json index 5d797d5ae0c930..df7cf31c459635 100644 --- a/tools/wpt/expectation.json +++ b/tools/wpt/expectation.json @@ -1205,70 +1205,18 @@ "wrapKey_unwrapKey": { "wrapKey_unwrapKey.https.any.html": [ "setup", - "Can wrap and unwrap HMAC keys using raw and AES-CTR", - "Can wrap and unwrap HMAC keys as non-extractable using raw and AES-CTR", - "Can wrap and unwrap HMAC keys using jwk and AES-CTR", - "Can wrap and unwrap HMAC keys as non-extractable using jwk and AES-CTR", - "Can unwrap HMAC non-extractable keys using jwk and AES-CTR", - "Can wrap and unwrap AES-CTR keys using raw and AES-CTR", - "Can wrap and unwrap AES-CTR keys as non-extractable using raw and AES-CTR", - "Can wrap and unwrap AES-CTR keys using jwk and AES-CTR", - "Can wrap and unwrap AES-CTR keys as non-extractable using jwk and AES-CTR", - "Can unwrap AES-CTR non-extractable keys using jwk and AES-CTR", - "Can wrap and unwrap AES-CBC keys using raw and AES-CTR", - "Can wrap and unwrap AES-CBC keys as non-extractable using raw and AES-CTR", - "Can wrap and unwrap AES-CBC keys using jwk and AES-CTR", - "Can wrap and unwrap AES-CBC keys as non-extractable using jwk and AES-CTR", - "Can unwrap AES-CBC non-extractable keys using jwk and AES-CTR", - "Can wrap and unwrap AES-GCM keys using raw and AES-CTR", "Can wrap and unwrap AES-GCM keys as non-extractable using raw and AES-CTR", - "Can wrap and unwrap AES-GCM keys using jwk and AES-CTR", "Can wrap and unwrap AES-GCM keys as non-extractable using jwk and AES-CTR", "Can unwrap AES-GCM non-extractable keys using jwk and AES-CTR", - "Can wrap and unwrap AES-KW keys using raw and AES-CTR", "Can wrap and unwrap AES-KW keys as non-extractable using raw and AES-CTR", - "Can wrap and unwrap AES-KW keys using jwk and AES-CTR", "Can wrap and unwrap AES-KW keys as non-extractable using jwk and AES-CTR", "Can unwrap AES-KW non-extractable keys using jwk and AES-CTR", - "Can wrap and unwrap RSA-OAEP public key keys using spki and AES-CTR", - "Can wrap and unwrap RSA-OAEP public key keys using jwk and AES-CTR", - "Can wrap and unwrap RSA-OAEP private key keys using pkcs8 and AES-CTR", - "Can wrap and unwrap RSA-OAEP private key keys as non-extractable using pkcs8 and AES-CTR", - "Can wrap and unwrap RSA-OAEP private key keys using jwk and AES-CTR", - "Can wrap and unwrap RSA-OAEP private key keys as non-extractable using jwk and AES-CTR", - "Can unwrap RSA-OAEP private key non-extractable keys using jwk and AES-CTR", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using spki and AES-CTR", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using jwk and AES-CTR", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using pkcs8 and AES-CTR", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using pkcs8 and AES-CTR", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using jwk and AES-CTR", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using jwk and AES-CTR", - "Can unwrap RSASSA-PKCS1-v1_5 private key non-extractable keys using jwk and AES-CTR", - "Can wrap and unwrap RSA-PSS public key keys using spki and AES-CTR", - "Can wrap and unwrap RSA-PSS public key keys using jwk and AES-CTR", - "Can wrap and unwrap RSA-PSS private key keys using pkcs8 and AES-CTR", - "Can wrap and unwrap RSA-PSS private key keys as non-extractable using pkcs8 and AES-CTR", - "Can wrap and unwrap RSA-PSS private key keys using jwk and AES-CTR", - "Can wrap and unwrap RSA-PSS private key keys as non-extractable using jwk and AES-CTR", - "Can unwrap RSA-PSS private key non-extractable keys using jwk and AES-CTR", - "Can wrap and unwrap HMAC keys as non-extractable using raw and AES-CBC", - "Can wrap and unwrap HMAC keys using jwk and AES-CBC", - "Can wrap and unwrap HMAC keys as non-extractable using jwk and AES-CBC", - "Can unwrap HMAC non-extractable keys using jwk and AES-CBC", - "Can wrap and unwrap AES-CTR keys as non-extractable using raw and AES-CBC", - "Can wrap and unwrap AES-CTR keys as non-extractable using jwk and AES-CBC", - "Can unwrap AES-CTR non-extractable keys using jwk and AES-CBC", - "Can unwrap AES-CBC non-extractable keys using jwk and AES-CBC", "Can wrap and unwrap AES-GCM keys as non-extractable using raw and AES-CBC", - "Can wrap and unwrap AES-GCM keys using jwk and AES-CBC", "Can wrap and unwrap AES-GCM keys as non-extractable using jwk and AES-CBC", "Can unwrap AES-GCM non-extractable keys using jwk and AES-CBC", "Can wrap and unwrap AES-KW keys as non-extractable using raw and AES-CBC", "Can wrap and unwrap AES-KW keys as non-extractable using jwk and AES-CBC", "Can unwrap AES-KW non-extractable keys using jwk and AES-CBC", - "Can unwrap RSA-OAEP private key non-extractable keys using jwk and AES-CBC", - "Can unwrap RSASSA-PKCS1-v1_5 private key non-extractable keys using jwk and AES-CBC", - "Can unwrap RSA-PSS private key non-extractable keys using jwk and AES-CBC", "Can wrap and unwrap HMAC keys using raw and AES-GCM", "Can wrap and unwrap HMAC keys as non-extractable using raw and AES-GCM", "Can wrap and unwrap HMAC keys using jwk and AES-GCM", @@ -1294,6 +1242,13 @@ "Can wrap and unwrap AES-KW keys using jwk and AES-GCM", "Can wrap and unwrap AES-KW keys as non-extractable using jwk and AES-GCM", "Can unwrap AES-KW non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap RSA-PSS public key keys using spki and AES-GCM", + "Can wrap and unwrap RSA-PSS public key keys using jwk and AES-GCM", + "Can wrap and unwrap RSA-PSS private key keys using pkcs8 and AES-GCM", + "Can wrap and unwrap RSA-PSS private key keys as non-extractable using pkcs8 and AES-GCM", + "Can wrap and unwrap RSA-PSS private key keys using jwk and AES-GCM", + "Can wrap and unwrap RSA-PSS private key keys as non-extractable using jwk and AES-GCM", + "Can unwrap RSA-PSS private key non-extractable keys using jwk and AES-GCM", "Can wrap and unwrap RSA-OAEP public key keys using spki and AES-GCM", "Can wrap and unwrap RSA-OAEP public key keys using jwk and AES-GCM", "Can wrap and unwrap RSA-OAEP private key keys using pkcs8 and AES-GCM", @@ -1308,13 +1263,6 @@ "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using jwk and AES-GCM", "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using jwk and AES-GCM", "Can unwrap RSASSA-PKCS1-v1_5 private key non-extractable keys using jwk and AES-GCM", - "Can wrap and unwrap RSA-PSS public key keys using spki and AES-GCM", - "Can wrap and unwrap RSA-PSS public key keys using jwk and AES-GCM", - "Can wrap and unwrap RSA-PSS private key keys using pkcs8 and AES-GCM", - "Can wrap and unwrap RSA-PSS private key keys as non-extractable using pkcs8 and AES-GCM", - "Can wrap and unwrap RSA-PSS private key keys using jwk and AES-GCM", - "Can wrap and unwrap RSA-PSS private key keys as non-extractable using jwk and AES-GCM", - "Can unwrap RSA-PSS private key non-extractable keys using jwk and AES-GCM", "Can wrap and unwrap HMAC keys using raw and AES-KW", "Can wrap and unwrap HMAC keys as non-extractable using raw and AES-KW", "Can wrap and unwrap AES-CTR keys using raw and AES-KW", @@ -1325,18 +1273,10 @@ "Can wrap and unwrap AES-GCM keys as non-extractable using raw and AES-KW", "Can wrap and unwrap AES-KW keys using raw and AES-KW", "Can wrap and unwrap AES-KW keys as non-extractable using raw and AES-KW", + "Can wrap and unwrap RSA-PSS public key keys using jwk and AES-KW", "Can wrap and unwrap RSA-OAEP public key keys using jwk and AES-KW", "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using jwk and AES-KW", - "Can wrap and unwrap RSA-PSS public key keys using jwk and AES-KW", - "Can wrap and unwrap HMAC keys as non-extractable using raw and RSA-OAEP", - "Can wrap and unwrap HMAC keys using jwk and RSA-OAEP", - "Can wrap and unwrap HMAC keys as non-extractable using jwk and RSA-OAEP", - "Can unwrap HMAC non-extractable keys using jwk and RSA-OAEP", - "Can wrap and unwrap AES-CTR keys as non-extractable using raw and RSA-OAEP", - "Can wrap and unwrap AES-CTR keys as non-extractable using jwk and RSA-OAEP", - "Can unwrap AES-CTR non-extractable keys using jwk and RSA-OAEP", "Can wrap and unwrap AES-GCM keys as non-extractable using raw and RSA-OAEP", - "Can wrap and unwrap AES-GCM keys using jwk and RSA-OAEP", "Can wrap and unwrap AES-GCM keys as non-extractable using jwk and RSA-OAEP", "Can unwrap AES-GCM non-extractable keys using jwk and RSA-OAEP", "Can wrap and unwrap AES-KW keys as non-extractable using raw and RSA-OAEP", @@ -1345,56 +1285,12 @@ ], "wrapKey_unwrapKey.https.any.worker.html": [ "setup", - "Can wrap and unwrap HMAC keys using raw and AES-CTR", - "Can wrap and unwrap HMAC keys as non-extractable using raw and AES-CTR", - "Can wrap and unwrap HMAC keys using jwk and AES-CTR", - "Can wrap and unwrap HMAC keys as non-extractable using jwk and AES-CTR", - "Can unwrap HMAC non-extractable keys using jwk and AES-CTR", - "Can wrap and unwrap AES-CTR keys using raw and AES-CTR", - "Can wrap and unwrap AES-CTR keys as non-extractable using raw and AES-CTR", - "Can wrap and unwrap AES-CTR keys using jwk and AES-CTR", - "Can wrap and unwrap AES-CTR keys as non-extractable using jwk and AES-CTR", - "Can unwrap AES-CTR non-extractable keys using jwk and AES-CTR", - "Can wrap and unwrap AES-CBC keys using raw and AES-CTR", - "Can wrap and unwrap AES-CBC keys as non-extractable using raw and AES-CTR", - "Can wrap and unwrap AES-CBC keys using jwk and AES-CTR", - "Can wrap and unwrap AES-CBC keys as non-extractable using jwk and AES-CTR", - "Can unwrap AES-CBC non-extractable keys using jwk and AES-CTR", - "Can wrap and unwrap AES-GCM keys using raw and AES-CTR", "Can wrap and unwrap AES-GCM keys as non-extractable using raw and AES-CTR", - "Can wrap and unwrap AES-GCM keys using jwk and AES-CTR", "Can wrap and unwrap AES-GCM keys as non-extractable using jwk and AES-CTR", "Can unwrap AES-GCM non-extractable keys using jwk and AES-CTR", - "Can wrap and unwrap AES-KW keys using raw and AES-CTR", "Can wrap and unwrap AES-KW keys as non-extractable using raw and AES-CTR", - "Can wrap and unwrap AES-KW keys using jwk and AES-CTR", "Can wrap and unwrap AES-KW keys as non-extractable using jwk and AES-CTR", "Can unwrap AES-KW non-extractable keys using jwk and AES-CTR", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using spki and AES-CTR", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using jwk and AES-CTR", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using pkcs8 and AES-CTR", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using pkcs8 and AES-CTR", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using jwk and AES-CTR", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using jwk and AES-CTR", - "Can unwrap RSASSA-PKCS1-v1_5 private key non-extractable keys using jwk and AES-CTR", - "Can wrap and unwrap RSA-OAEP public key keys using spki and AES-CTR", - "Can wrap and unwrap RSA-OAEP public key keys using jwk and AES-CTR", - "Can wrap and unwrap RSA-OAEP private key keys using pkcs8 and AES-CTR", - "Can wrap and unwrap RSA-OAEP private key keys as non-extractable using pkcs8 and AES-CTR", - "Can wrap and unwrap RSA-OAEP private key keys using jwk and AES-CTR", - "Can wrap and unwrap RSA-OAEP private key keys as non-extractable using jwk and AES-CTR", - "Can unwrap RSA-OAEP private key non-extractable keys using jwk and AES-CTR", - "Can wrap and unwrap RSA-PSS public key keys using spki and AES-CTR", - "Can wrap and unwrap RSA-PSS public key keys using jwk and AES-CTR", - "Can wrap and unwrap RSA-PSS private key keys using pkcs8 and AES-CTR", - "Can wrap and unwrap RSA-PSS private key keys as non-extractable using pkcs8 and AES-CTR", - "Can wrap and unwrap RSA-PSS private key keys using jwk and AES-CTR", - "Can wrap and unwrap RSA-PSS private key keys as non-extractable using jwk and AES-CTR", - "Can unwrap RSA-PSS private key non-extractable keys using jwk and AES-CTR", - "Can wrap and unwrap AES-CTR keys as non-extractable using raw and AES-CBC", - "Can wrap and unwrap AES-CTR keys using jwk and AES-CBC", - "Can wrap and unwrap AES-CTR keys as non-extractable using jwk and AES-CBC", - "Can unwrap AES-CTR non-extractable keys using jwk and AES-CBC", "Can wrap and unwrap AES-GCM keys as non-extractable using raw and AES-CBC", "Can wrap and unwrap AES-GCM keys as non-extractable using jwk and AES-CBC", "Can unwrap AES-GCM non-extractable keys using jwk and AES-CBC", @@ -1426,13 +1322,6 @@ "Can wrap and unwrap AES-KW keys using jwk and AES-GCM", "Can wrap and unwrap AES-KW keys as non-extractable using jwk and AES-GCM", "Can unwrap AES-KW non-extractable keys using jwk and AES-GCM", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using spki and AES-GCM", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using jwk and AES-GCM", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using pkcs8 and AES-GCM", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using pkcs8 and AES-GCM", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using jwk and AES-GCM", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using jwk and AES-GCM", - "Can unwrap RSASSA-PKCS1-v1_5 private key non-extractable keys using jwk and AES-GCM", "Can wrap and unwrap RSA-OAEP public key keys using spki and AES-GCM", "Can wrap and unwrap RSA-OAEP public key keys using jwk and AES-GCM", "Can wrap and unwrap RSA-OAEP private key keys using pkcs8 and AES-GCM", @@ -1440,6 +1329,13 @@ "Can wrap and unwrap RSA-OAEP private key keys using jwk and AES-GCM", "Can wrap and unwrap RSA-OAEP private key keys as non-extractable using jwk and AES-GCM", "Can unwrap RSA-OAEP private key non-extractable keys using jwk and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using spki and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using jwk and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using pkcs8 and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using pkcs8 and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys using jwk and AES-GCM", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 private key keys as non-extractable using jwk and AES-GCM", + "Can unwrap RSASSA-PKCS1-v1_5 private key non-extractable keys using jwk and AES-GCM", "Can wrap and unwrap RSA-PSS public key keys using spki and AES-GCM", "Can wrap and unwrap RSA-PSS public key keys using jwk and AES-GCM", "Can wrap and unwrap RSA-PSS private key keys using pkcs8 and AES-GCM", @@ -1457,13 +1353,9 @@ "Can wrap and unwrap AES-GCM keys as non-extractable using raw and AES-KW", "Can wrap and unwrap AES-KW keys using raw and AES-KW", "Can wrap and unwrap AES-KW keys as non-extractable using raw and AES-KW", - "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using jwk and AES-KW", "Can wrap and unwrap RSA-OAEP public key keys using jwk and AES-KW", + "Can wrap and unwrap RSASSA-PKCS1-v1_5 public key keys using jwk and AES-KW", "Can wrap and unwrap RSA-PSS public key keys using jwk and AES-KW", - "Can wrap and unwrap AES-CTR keys as non-extractable using raw and RSA-OAEP", - "Can wrap and unwrap AES-CTR keys using jwk and RSA-OAEP", - "Can wrap and unwrap AES-CTR keys as non-extractable using jwk and RSA-OAEP", - "Can unwrap AES-CTR non-extractable keys using jwk and RSA-OAEP", "Can wrap and unwrap AES-GCM keys as non-extractable using raw and RSA-OAEP", "Can wrap and unwrap AES-GCM keys as non-extractable using jwk and RSA-OAEP", "Can unwrap AES-GCM non-extractable keys using jwk and RSA-OAEP",