Browse Source

paypro: grab npubKeyAlg in browser.

patch-2
Christopher Jeffrey 11 years ago
parent
commit
4e883ceba6
  1. 3
      lib/browser/PayPro.js

3
lib/browser/PayPro.js

@ -146,6 +146,8 @@ PayPro.prototype.x509Verify = function(returnTrust) {
// //
var ndata = new Buffer(nder, 'hex'); var ndata = new Buffer(nder, 'hex');
var nc = rfc3280.Certificate.decode(ndata, 'der'); 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): // 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); js.initVerifyByCertificatePEM(npem);
var npubKey = js.pubKey; var npubKey = js.pubKey;
// XXX Somehow change the pubKey format to npubKeyAlg.
// //
// Get Signature Value from current certificate: // Get Signature Value from current certificate:

Loading…
Cancel
Save