paypro: update root certs and fix tests.
This commit is contained in:
parent
948d6cd93a
commit
0db74604db
|
@ -1,4 +1,4 @@
|
|||
module.exports = [
|
||||
var RootCerts = [
|
||||
/* tools/../src/node_root_certs.h -- Bundle of CA Root Certificates
|
||||
*
|
||||
* Certificate data from Mozilla as of: Sat Nov 9 22:37:55 2013
|
||||
|
@ -3559,3 +3559,10 @@ module.exports = [
|
|||
+ "dcGWxZ0=\n"
|
||||
+ "-----END CERTIFICATE-----\n"
|
||||
];
|
||||
// Use hash table for efficiency:
|
||||
RootCerts = RootCerts.reduce(function(trusted, cert) {
|
||||
cert = cert.replace(/\s+/g, '');
|
||||
trusted[cert] = true;
|
||||
return trusted;
|
||||
}, {});
|
||||
module.exports = RootCerts;
|
||||
|
|
|
@ -339,7 +339,7 @@ describe('PayPro', function() {
|
|||
|
||||
paypro.set('serialized_payment_details', pdbuf);
|
||||
paypro.set('pki_type', 'x509+sha256');
|
||||
paypro.set('pki_data', [x509.crt]);
|
||||
paypro.set('pki_data', x509.crt);
|
||||
|
||||
paypro.sign(x509.priv);
|
||||
|
||||
|
@ -362,7 +362,7 @@ describe('PayPro', function() {
|
|||
paypro.set('pki_type', 'x509+sha256');
|
||||
|
||||
paypro.set('signature', x509.sig); // sig buffer
|
||||
paypro.set('pki_data', [x509.crt]); // contains one or more x509 certs
|
||||
paypro.set('pki_data', x509.crt); // contains one or more x509 certs
|
||||
|
||||
var verify = paypro.verify();
|
||||
verify.should.equal(true);
|
||||
|
|
Loading…
Reference in New Issue