From 4e883ceba6020820dab631924d24d18cff23ea12 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 29 Aug 2014 20:02:20 -0700 Subject: [PATCH] paypro: grab npubKeyAlg in browser. --- lib/browser/PayPro.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/browser/PayPro.js b/lib/browser/PayPro.js index 3058284..780f4ef 100644 --- a/lib/browser/PayPro.js +++ b/lib/browser/PayPro.js @@ -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: