Browse Source

paypro: fix root certs.

patch-2
Christopher Jeffrey 10 years ago
parent
commit
6828f560da
  1. 8
      browser/root-certs
  2. 8
      lib/common/RootCerts.js

8
browser/root-certs

@ -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'

8
lib/common/RootCerts.js

@ -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;

Loading…
Cancel
Save