| <script src="../../resources/js-test-pre.js"></script> |
| <script src="../resources/common.js"></script> |
| description("Test exporting a RSA-OAEP private key with PKCS8 format."); |
| publicExponent: new Uint8Array([0x01, 0x00, 0x01]), // Equivalent to 65537 |
| debug("Generating a key pair..."); |
| crypto.subtle.generateKey(algorithmKeyGen, extractable, ["decrypt", "encrypt", "wrapKey", "unwrapKey"]).then(function(result) { |
| debug("Exporting the private key..."); |
| return crypto.subtle.exportKey("pkcs8", keyPair.privateKey); |
| }).then(function(result) { |
| shouldBeType("privateKey", "ArrayBuffer"); |
| <script src="../../resources/js-test-post.js"></script> |