Skip to content

Commit 4b33f37

Browse files
authored
Update EcKeyImportParams (#103)
updated EcKeyImportParams to follow the Web Crypto API
1 parent 775d168 commit 4b33f37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/der_lite.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class DERLite{
8888
};
8989

9090
console.debug(JSON.stringify(jwk));
91-
return webCrypto.importKey('jwk', jwk, 'ECDSA', true, key_ops);
91+
return webCrypto.importKey('jwk', jwk, {name:'ECDSA', namedCurve: 'P-256'} , true, key_ops);
9292
}
9393

9494
export_public_der(key) {
@@ -163,7 +163,7 @@ class DERLite{
163163
y, y
164164
};
165165

166-
return webCrypto.importKey('jwk', jwk, 'ECDSA', true, ["verify"])
166+
return webCrypto.importKey('jwk', jwk, {name:'ECDSA', namedCurve: 'P-256'}, true, ["verify"])
167167

168168
}
169169
}

0 commit comments

Comments
 (0)