Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/x509.js
Original file line number Diff line number Diff line change
Expand Up @@ -3186,10 +3186,9 @@ pki.verifyCertificateChain = function(caStore, chain, options) {
error: pki.certificateError.bad_certificate
};
}
// if error is not null and keyUsage is available, then we know it
// has keyCertSign and there is a basic constraints extension too,
// which means we can check pathLenConstraint (if it exists)
if(error === null && keyUsageExt !== null &&
// check pathLenConstraint (if it exists) regardless of whether
// keyUsage extension is present
if(error === null && bcExt !== null &&
'pathLenConstraint' in bcExt) {
// pathLen is the maximum # of intermediate CA certs that can be
// found between the current certificate and the end-entity (depth 0)
Expand Down