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(/-----BEGIN CERTIFICATE-----/g, "");\n'
+ ' pem = pem.replace(/-----END CERTIFICATE-----/g, "");\n' + ' pem = pem.replace(/-----END CERTIFICATE-----/g, "");\n'
+ ' pem = pem.replace(/\\s+/g, "");\n' + ' pem = pem.replace(/\\s+/g, "");\n'
+ ' if (!Object.prototype.hasOwnProperty.call(certs, pem)) return;\n' + ' if (!Object.prototype.hasOwnProperty.call(trusted, pem)) return;\n'
+ ' return certs[pem];\n' + ' return trusted[pem];\n'
+ '}\n' + '}\n'
+ '\n' + '\n'
+ 'function getCert(name) {\n' + 'function getCert(name) {\n'
+ ' name = name.replace(/^\s+|\s+$/g, "");\n' + ' name = name.replace(/^\s+|\s+$/g, "");\n'
+ ' if (!Object.prototype.hasOwnProperty.call(trusted, name)) return;\n' + ' if (!Object.prototype.hasOwnProperty.call(certs, name)) return;\n'
+ ' return trusted[name];\n' + ' return certs[name];\n'
+ '}\n' + '}\n'
+ '\n' + '\n'
+ 'exports.certs = certs;\n' + 'exports.certs = certs;\n'

View File

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