diff --git a/lib/PayPro.js b/lib/PayPro.js index f880c9c..cde9661 100644 --- a/lib/PayPro.js +++ b/lib/PayPro.js @@ -230,7 +230,6 @@ PayPro.prototype.sign = function(key) { var der = pki_data.toString('hex'); var pem = KJUR.asn1.ASN1Util.getPEMStringFromHex(der, 'CERTIFICATE'); - // var pub = KJUR.KEYUTIL.getHexFromPEM(pem, 'PUBLIC KEY') if (!Trusted[pem.replace(/\s+/g, '')]) { // throw new Error('Unstrusted certificate.'); @@ -276,13 +275,11 @@ PayPro.prototype.verify = function() { var der = pki_data.toString('hex'); var pem = KJUR.asn1.ASN1Util.getPEMStringFromHex(der, 'CERTIFICATE'); - // var pub = KJUR.KEYUTIL.getHexFromPEM(pem, 'PUBLIC KEY') if (!Trusted[pem.replace(/\s+/g, '')]) { // throw new Error('Unstrusted certificate.'); } - // return verifier.verify(pub, sig); return verifier.verify(pem, sig); } else if (pki_type === 'none') { return true; diff --git a/lib/browser/PayPro.js b/lib/browser/PayPro.js index f11b37d..9417944 100644 --- a/lib/browser/PayPro.js +++ b/lib/browser/PayPro.js @@ -35,7 +35,6 @@ PayPro.sign = function(key) { var der = pki_data.toString('hex'); var pem = KJUR.asn1.ASN1Util.getPEMStringFromHex(der, 'CERTIFICATE'); - // var pub = KJUR.KEYUTIL.getHexFromPEM(pem, 'PUBLIC KEY') if (!Trusted[pem.replace(/\s+/g, '')]) { // throw new Error('Unstrusted certificate.'); @@ -86,7 +85,6 @@ PayPro.verify = function() { var der = pki_data.toString('hex'); var pem = KJUR.asn1.ASN1Util.getPEMStringFromHex(der, 'CERTIFICATE'); - // var pub = KJUR.KEYUTIL.getHexFromPEM(pem, 'PUBLIC KEY') if (!Trusted[pem.replace(/\s+/g, '')]) { // throw new Error('Unstrusted certificate.');