equal
deleted
inserted
replaced
309 } |
309 } |
310 |
310 |
311 // if the certificate is self-issued, ignore the pathLenConstraint |
311 // if the certificate is self-issued, ignore the pathLenConstraint |
312 // checking. |
312 // checking. |
313 if (!X509CertImpl.isSelfIssued(cert)) { |
313 if (!X509CertImpl.isSelfIssued(cert)) { |
314 if (maxPathLen <= 1) { // reserved one for end-entity certificate |
314 if (maxPathLen <= 0) { |
315 throw new ValidatorException("Violated path length constraints", |
315 throw new ValidatorException("Violated path length constraints", |
316 ValidatorException.T_CA_EXTENSIONS, cert); |
316 ValidatorException.T_CA_EXTENSIONS, cert); |
317 } |
317 } |
318 |
318 |
319 maxPathLen--; |
319 maxPathLen--; |