paypro: fix root cert check.

This commit is contained in:
Christopher Jeffrey 2014-08-22 09:05:05 -07:00
parent f0757498b6
commit 4e325c3fa9
2 changed files with 6 additions and 0 deletions

View File

@ -80,6 +80,9 @@ PayPro.prototype.x509Verify = function() {
var ncert = chain[i + 1];
// The root cert, check if it's trusted:
if (!ncert || name) {
if (!ncert && !name) {
return false;
}
chain.length = 0;
return true;
}

View File

@ -90,6 +90,9 @@ PayPro.prototype.x509Verify = function(key) {
var ncert = chain[i + 1];
// The root cert, check if it's trusted:
if (!ncert || name) {
if (!ncert && !name) {
return false;
}
chain.length = 0;
return true;
}