You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello and first of all thank you for this amazing package!
I need help signing and verifying with the provided cert and private key, which are already configured in the token (safenet 5110 etoken).
I already managed to sign using the private key identifier, but I can't figure out how to get the public key from the certificate to verify the signature.
const privateKeys = session.find({
class: graphene.ObjectClass.PRIVATE_KEY,
});
const privateKey = privateKeys.items(0);
const sign = session.createSign('SHA256_RSA_PKCS', privateKey);
sign.update('simple text 1');
sign.update('simple text 2');
const signature = sign.final();
console.log('Signature RSA-SHA1:', signature.toString('hex')); // Signature RSA-SHA1: 6102a66dc0d97fadb5...
var verify = session.createVerify("SHA256_RSA_PKCS", ?????????);
verify.update("simple text 1");
verify.update("simple text 2");
var verify_result = verify.final(signature);
console.log("Signature RSA-SHA1 verify:", verify_result); // Signature RSA-SHA1 verify: true
Any help would be greatly appreciated
The text was updated successfully, but these errors were encountered:
Hello and first of all thank you for this amazing package!
I need help signing and verifying with the provided cert and private key, which are already configured in the token (safenet 5110 etoken).
I already managed to sign using the private key identifier, but I can't figure out how to get the public key from the certificate to verify the signature.
Any help would be greatly appreciated
The text was updated successfully, but these errors were encountered: