paypro: grab npubKeyAlg in browser.

This commit is contained in:
Christopher Jeffrey 2014-08-29 20:02:20 -07:00
parent 7a09140b01
commit 4e883ceba6
1 changed files with 3 additions and 0 deletions

View File

@ -146,6 +146,8 @@ PayPro.prototype.x509Verify = function(returnTrust) {
//
var ndata = new Buffer(nder, 'hex');
var nc = rfc3280.Certificate.decode(ndata, 'der');
var npubKeyAlg = PayPro.getAlgorithm(
nc.tbsCertificate.subjectPublicKeyInfo.algorithm.algorithm);
//
// Get Public Key from next certificate (via KJUR because it's a mess):
@ -156,6 +158,7 @@ PayPro.prototype.x509Verify = function(returnTrust) {
});
js.initVerifyByCertificatePEM(npem);
var npubKey = js.pubKey;
// XXX Somehow change the pubKey format to npubKeyAlg.
//
// Get Signature Value from current certificate: