|
|
@ -35,8 +35,7 @@ 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') |
|
|
|
// var pub = KJUR.X509.getPublicKeyFromCertPEM(pem);
|
|
|
|
// var pub = KJUR.KEYUTIL.getHexFromPEM(pem, 'PUBLIC KEY')
|
|
|
|
|
|
|
|
var jsrsaSig = new KJUR.crypto.Signature({ |
|
|
|
alg: type + 'withRSA', |
|
|
@ -83,8 +82,7 @@ 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') |
|
|
|
// var pub = KJUR.X509.getPublicKeyFromCertPEM(pem);
|
|
|
|
// var pub = KJUR.KEYUTIL.getHexFromPEM(pem, 'PUBLIC KEY')
|
|
|
|
|
|
|
|
jsrsaSig.initVerifyByCertificatePEM(pem); |
|
|
|
|
|
|
|