paypro: fix handling of pki_data - cert arrays.
This commit is contained in:
parent
5f81682bd6
commit
2f6938bad0
|
@ -11,6 +11,8 @@ PayPro.prototype.x509Sign = function(key) {
|
|||
var crypto = require('crypto');
|
||||
var pki_type = this.get('pki_type');
|
||||
var pki_data = this.get('pki_data'); // contains one or more x509 certs
|
||||
pki_data = PayPro.X509Certificates.decode(pki_data);
|
||||
pki_data = pki_data.certificate;
|
||||
var details = this.get('serialized_payment_details');
|
||||
var type = pki_type.split('+')[1].toUpperCase();
|
||||
|
||||
|
@ -38,6 +40,8 @@ PayPro.prototype.x509Verify = function() {
|
|||
var pki_type = this.get('pki_type');
|
||||
var sig = this.get('signature');
|
||||
var pki_data = this.get('pki_data');
|
||||
pki_data = PayPro.X509Certificates.decode(pki_data);
|
||||
pki_data = pki_data.certificate;
|
||||
var details = this.get('serialized_payment_details');
|
||||
var buf = this.serializeForSig();
|
||||
var type = pki_type.split('+')[1].toUpperCase();
|
||||
|
|
|
@ -13,6 +13,8 @@ var RootCerts = require('../common/RootCerts');
|
|||
PayPro.prototype.x509Sign = function(key) {
|
||||
var pki_type = this.get('pki_type');
|
||||
var pki_data = this.get('pki_data'); // contains one or more x509 certs
|
||||
pki_data = PayPro.X509Certificates.decode(pki_data);
|
||||
pki_data = pki_data.certificate;
|
||||
var type = pki_type.split('+')[1].toUpperCase();
|
||||
var buf = this.serializeForSig();
|
||||
|
||||
|
@ -51,6 +53,8 @@ PayPro.prototype.x509Verify = function(key) {
|
|||
var sig = this.get('signature');
|
||||
var pki_type = this.get('pki_type');
|
||||
var pki_data = this.get('pki_data');
|
||||
pki_data = PayPro.X509Certificates.decode(pki_data);
|
||||
pki_data = pki_data.certificate;
|
||||
var buf = this.serializeForSig();
|
||||
var type = pki_type.split('+')[1].toUpperCase();
|
||||
|
||||
|
|
Loading…
Reference in New Issue