I'm trying to get the "modulus" from public key and certificate to validate that these pair key and cert match before sign but I can't
I have a web app building in Angular and I use https://www.npmjs.com/package/node-forge.This is a snnipet but I don't know how to achive getting mudulus.
var buffer = forge.util.createBuffer(FirmaUtil.Key, 'raw');
var asn1 = forge.asn1.fromDer(buffer);
var info = forge.pki.decryptPrivateKeyInfo(asn1, 'password');
var privateK = forge.pki.privateKeyFromAsn1(info);
At the end i could achieve the goal compare the modulus from cer and key