paypro: fix root cert check.
This commit is contained in:
parent
f0757498b6
commit
4e325c3fa9
@ -80,6 +80,9 @@ PayPro.prototype.x509Verify = function() {
|
|||||||
var ncert = chain[i + 1];
|
var ncert = chain[i + 1];
|
||||||
// The root cert, check if it's trusted:
|
// The root cert, check if it's trusted:
|
||||||
if (!ncert || name) {
|
if (!ncert || name) {
|
||||||
|
if (!ncert && !name) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
chain.length = 0;
|
chain.length = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -90,6 +90,9 @@ PayPro.prototype.x509Verify = function(key) {
|
|||||||
var ncert = chain[i + 1];
|
var ncert = chain[i + 1];
|
||||||
// The root cert, check if it's trusted:
|
// The root cert, check if it's trusted:
|
||||||
if (!ncert || name) {
|
if (!ncert || name) {
|
||||||
|
if (!ncert && !name) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
chain.length = 0;
|
chain.length = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user