From 11c478d1a908398234e06351dd0b7b540dd8beec Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 22 Aug 2014 12:18:58 -0700 Subject: [PATCH] paypro: fix chain validation for browser. --- lib/browser/PayPro.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/browser/PayPro.js b/lib/browser/PayPro.js index fc4af87..f27b879 100644 --- a/lib/browser/PayPro.js +++ b/lib/browser/PayPro.js @@ -103,7 +103,7 @@ PayPro.prototype.x509Verify = function(key) { var data = new Buffer(nder, 'hex'); var nc = rfc3280.Certificate.decode(data, 'der'); var npubKey = nc.tbsCertificate.subjectPublicKeyInfo.subjectPublicKey.data; - npubKey = self._DERtoPEM(npubKey, 'RSA PUBLIC KEY'); + npubKey = KJUR.asn1.ASN1Util.getPEMStringFromHex(npubKey, 'RSA PUBLIC KEY'); // Get signature from current certificate: var data = new Buffer(der, 'hex');