paypro: fix root certs.

This commit is contained in:
Christopher Jeffrey 2014-08-21 16:02:53 -07:00
parent 095699a072
commit 6828f560da
2 changed files with 8 additions and 8 deletions

View File

@ -50,14 +50,14 @@ function getRootCerts(callback) {
+ ' pem = pem.replace(/-----BEGIN CERTIFICATE-----/g, "");\n'
+ ' pem = pem.replace(/-----END CERTIFICATE-----/g, "");\n'
+ ' pem = pem.replace(/\\s+/g, "");\n'
+ ' if (!Object.prototype.hasOwnProperty.call(certs, pem)) return;\n'
+ ' return certs[pem];\n'
+ ' if (!Object.prototype.hasOwnProperty.call(trusted, pem)) return;\n'
+ ' return trusted[pem];\n'
+ '}\n'
+ '\n'
+ 'function getCert(name) {\n'
+ ' name = name.replace(/^\s+|\s+$/g, "");\n'
+ ' if (!Object.prototype.hasOwnProperty.call(trusted, name)) return;\n'
+ ' return trusted[name];\n'
+ ' if (!Object.prototype.hasOwnProperty.call(certs, name)) return;\n'
+ ' return certs[name];\n'
+ '}\n'
+ '\n'
+ 'exports.certs = certs;\n'

View File

@ -3719,14 +3719,14 @@ function getTrusted(pem) {
pem = pem.replace(/-----BEGIN CERTIFICATE-----/g, "");
pem = pem.replace(/-----END CERTIFICATE-----/g, "");
pem = pem.replace(/\s+/g, "");
if (!Object.prototype.hasOwnProperty.call(certs, pem)) return;
return certs[pem];
if (!Object.prototype.hasOwnProperty.call(trusted, pem)) return;
return trusted[pem];
}
function getCert(name) {
name = name.replace(/^s+|s+$/g, "");
if (!Object.prototype.hasOwnProperty.call(trusted, name)) return;
return trusted[name];
if (!Object.prototype.hasOwnProperty.call(certs, name)) return;
return certs[name];
}
exports.certs = certs;