From e34f9a4061da8f8c7f1dd4e414d87bb6fa953847 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 28 Aug 2014 17:37:41 -0700 Subject: [PATCH] paypro: remove old browser next pubKey code. --- lib/browser/PayPro.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/browser/PayPro.js b/lib/browser/PayPro.js index 42f3016..6c845ef 100644 --- a/lib/browser/PayPro.js +++ b/lib/browser/PayPro.js @@ -97,18 +97,8 @@ PayPro.prototype.x509Verify = function(key) { var npem = KJUR.asn1.ASN1Util.getPEMStringFromHex(nder, 'CERTIFICATE'); // - // Get Public Key from next certificate: + // Get Public Key from next certificate (via KJUR because it's a mess): // - // var ndata = new Buffer(nder, 'hex'); - // var nc = rfc3280.Certificate.decode(ndata, 'der'); - // var npubKeyAlg = PayPro.getAlgorithm( - // nc.tbsCertificate.subjectPublicKeyInfo.algorithm.algorithm); - // var npubKey = nc.tbsCertificate.subjectPublicKeyInfo.subjectPublicKey.data; - // // npubKey = self._DERtoPEM(npubKey, npubKeyAlg + ' PUBLIC KEY'); - // // npubKey = KJUR.asn1.ASN1Util.getPEMStringFromHex(npubKey.toString('hex'), 'PUBLIC KEY'); - // npubKey = KJUR.asn1.ASN1Util.getPEMStringFromHex(npubKey.toString('hex'), npubKeyAlg + ' PUBLIC KEY'); - - // Get public key from next certificate via KJUR since sane methods don't work: var js = new KJUR.crypto.Signature({ alg: type + 'withRSA', prov: 'cryptojs/jsrsa'