not working on safari 9.1
oreporan opened this issue · 0 comments
oreporan commented
Added webcrypto-shim from npm:
"version": "0.1.1"
added to html file :
<script src="node_modules/webcrypto-shim/webcrypto-shim.js"></script>
I see it gets loaded and enters this code:
if ( isWebkit ) {
_crypto.subtle = _subtle;
global.Crypto = _Crypto;
global.SubtleCrypto = _SubtleCrypto;
global.CryptoKey = CryptoKey;
}
my code calls crypto.generateKey(algorithmKeyGen, true, ['sign'])
with these options:
var algorithmKeyGen = {
name: 'RSASSA-PKCS1-v1_5',
modulusLength: 2048,
publicExponent: new Uint8Array([0x01, 0x00, 0x01]), // Equivalent to 65537
hash: {
name: 'SHA-256'
}
};
Getting this error (works on chrome) :
Failed to extract public key from keypair TypeError: undefined is not an object (evaluating 'b._key')