File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed
pkix/src/main/java/org/bouncycastle/pkix/jcajce Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change 40
40
import org .bouncycastle .jcajce .PKIXExtendedParameters ;
41
41
import org .bouncycastle .jcajce .util .JcaJceHelper ;
42
42
import org .bouncycastle .util .Arrays ;
43
+ import org .bouncycastle .util .Properties ;
43
44
44
45
class RFC3280CertPathUtilities
45
46
{
@@ -506,14 +507,29 @@ protected static Set processCRLF(
506
507
X509Certificate signCert = (X509Certificate )validCerts .get (i );
507
508
boolean [] keyUsage = signCert .getKeyUsage ();
508
509
509
- if (keyUsage != null && ( keyUsage . length <= CRL_SIGN || ! keyUsage [ CRL_SIGN ]) )
510
+ if (keyUsage == null )
510
511
{
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
+ }
513
521
}
514
522
else
515
523
{
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
+ }
517
533
}
518
534
}
519
535
You can’t perform that action at this time.
0 commit comments