File tree Expand file tree Collapse file tree
pkix/src/main/java/org/bouncycastle/pkix/jcajce Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040import org .bouncycastle .jcajce .PKIXExtendedParameters ;
4141import org .bouncycastle .jcajce .util .JcaJceHelper ;
4242import org .bouncycastle .util .Arrays ;
43+ import org .bouncycastle .util .Properties ;
4344
4445class RFC3280CertPathUtilities
4546{
@@ -506,14 +507,29 @@ protected static Set processCRLF(
506507 X509Certificate signCert = (X509Certificate )validCerts .get (i );
507508 boolean [] keyUsage = signCert .getKeyUsage ();
508509
509- if (keyUsage != null && ( keyUsage . length <= CRL_SIGN || ! keyUsage [ CRL_SIGN ]) )
510+ if (keyUsage == null )
510511 {
511- lastException = new AnnotatedException (
512- "Issuer certificate key usage extension does not permit CRL signing." );
512+ if (Properties .isOverrideSet ("org.bouncycastle.x509.allow_ca_without_crl_sign" ))
513+ {
514+ checkKeys .add (validKeys .get (i ));
515+ }
516+ else
517+ {
518+ lastException = new AnnotatedException (
519+ "No key usage extension on issuer certificate." );
520+ }
513521 }
514522 else
515523 {
516- checkKeys .add (validKeys .get (i ));
524+ if (keyUsage .length <= CRL_SIGN || !keyUsage [CRL_SIGN ])
525+ {
526+ lastException = new AnnotatedException (
527+ "Issuer certificate key usage extension does not permit CRL signing." );
528+ }
529+ else
530+ {
531+ checkKeys .add (validKeys .get (i ));
532+ }
517533 }
518534 }
519535
You can’t perform that action at this time.
0 commit comments