| Index: LayoutTests/crypto/rsa-oaep-key-manipulation-expected.txt
|
| diff --git a/LayoutTests/crypto/rsa-oaep-key-manipulation-expected.txt b/LayoutTests/crypto/rsa-oaep-key-manipulation-expected.txt
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5c769a0cdbdb155ab62371d287315f6092c911e6
|
| --- /dev/null
|
| +++ b/LayoutTests/crypto/rsa-oaep-key-manipulation-expected.txt
|
| @@ -0,0 +1,50 @@
|
| +Test generating, importing and exporting RSA keys for RSA-OAEP. Test that they can't be used with another algorithm.
|
| +
|
| +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
|
| +
|
| +
|
| +Generating a key pair...
|
| +PASS keyPair.toString() is '[object KeyPair]'
|
| +PASS keyPair.publicKey.type is 'public'
|
| +PASS keyPair.publicKey.algorithm.name is 'RSA-OAEP'
|
| +PASS keyPair.publicKey.algorithm.modulusLength is 2048
|
| +PASS keyPair.publicKey.usages is ["encrypt", "wrapKey"]
|
| +PASS bytesToHexString(keyPair.publicKey.algorithm.publicExponent) is '010001'
|
| +PASS keyPair.publicKey.algorithm.hash.name is 'SHA-1'
|
| +PASS keyPair.privateKey.type is 'private'
|
| +PASS keyPair.privateKey.algorithm.name is 'RSA-OAEP'
|
| +PASS keyPair.privateKey.algorithm.modulusLength is 2048
|
| +PASS keyPair.privateKey.usages is ["decrypt", "unwrapKey"]
|
| +PASS bytesToHexString(keyPair.privateKey.algorithm.publicExponent) is '010001'
|
| +PASS keyPair.privateKey.algorithm.hash.name is 'SHA-1'
|
| +
|
| +Testing that the keys can't be used with different algorithms...
|
| +error is: InvalidAccessError: key.usages does not permit this operation
|
| +error is: InvalidAccessError: key.algorithm does not match that of operation
|
| +
|
| +Trying to export keys to raw...
|
| +error is: InvalidAccessError: The key is not of the expected type
|
| +PASS Promise rejected for exporting public key
|
| +error is: InvalidAccessError: The key is not of the expected type
|
| +PASS Promise rejected for exporting private key
|
| +
|
| +Exporting public key to JWK...
|
| +PASS jwkPublicKey.alg is 'RSA-OAEP'
|
| +PASS jwkPublicKey.ext is true
|
| +PASS jwkPublicKey.key_ops is ['encrypt', 'wrapKey']
|
| +PASS jwkPublicKey.use is undefined
|
| +PASS jwkPublicKey.kty is 'RSA'
|
| +PASS bytesToHexString(Base64URL.parse(jwkPublicKey.e)) is '010001'
|
| +
|
| +Importing it back...
|
| +PASS exportedPublicKey.type is 'public'
|
| +PASS exportedPublicKey.algorithm.name is 'RSA-OAEP'
|
| +PASS exportedPublicKey.algorithm.modulusLength is 2048
|
| +PASS bytesToHexString(exportedPublicKey.algorithm.publicExponent) is '010001'
|
| +PASS exportedPublicKey.algorithm.hash.name is 'SHA-1'
|
| +PASS exportedPublicKey.extractable is true
|
| +PASS exportedPublicKey.usages is ['encrypt','wrapKey']
|
| +PASS successfullyParsed is true
|
| +
|
| +TEST COMPLETE
|
| +
|
|
|