Fix verifying RSA signatures with leading zero in Web Crypto
This commit is contained in:
parent
ad0fdcc4da
commit
5a24bc7698
|
@ -36,9 +36,9 @@ export default {
|
|||
case enums.publicKey.rsa_encrypt_sign:
|
||||
case enums.publicKey.rsa_encrypt:
|
||||
case enums.publicKey.rsa_sign: {
|
||||
const m = msg_MPIs[0].toUint8Array();
|
||||
const n = pub_MPIs[0].toUint8Array();
|
||||
const e = pub_MPIs[1].toUint8Array();
|
||||
const m = msg_MPIs[0].toUint8Array('be', n.length);
|
||||
return publicKey.rsa.verify(hash_algo, data, m, n, e, hashed);
|
||||
}
|
||||
case enums.publicKey.dsa: {
|
||||
|
|
Loading…
Reference in New Issue
Block a user