@@ -307,17 +307,18 @@ private void generateCaCert(File issuerCaKeyFile, File issuerCaCertFile,
307
307
opt .optArg ("-cert" , issuerCaCertFile );
308
308
opt .optArg ("-keyfile" , issuerCaKeyFile );
309
309
}
310
- sna = buildConfigFile (subject , false , true );
311
310
opt .optArg ("-in" , csrFile )
312
311
.optArg ("-out" , subjectCertFile )
313
312
.optArg ("-startdate" , notBefore )
314
313
.optArg ("-enddate" , notAfter )
315
314
.optArg ("-subj" , subject )
316
- .optArg ("-config" , sna )
315
+ .optArg ("-config" , defaultConfig )
316
+ .optArg ("-extensions" , "strimzi_x509_extensions" )
317
317
.database (database , attr )
318
318
.newCertsDir (newCertsDir )
319
319
.basicConstraints ("critical,CA:true,pathlen:" + pathLength )
320
320
.keyUsage ("critical,keyCertSign,cRLSign" )
321
+ .authorityKeyIdentifier ()
321
322
.exec (false );
322
323
323
324
if (keyInPkcs1 ) {
@@ -636,6 +637,10 @@ public OpensslArgs keyUsage(String keyUsage) {
636
637
pb .environment ().put ("STRIMZI_keyUsage" , keyUsage );
637
638
return this ;
638
639
}
640
+ public OpensslArgs authorityKeyIdentifier () {
641
+ pb .environment ().put ("STRIMZI_authorityKeyIdentifier" , "keyid,issuer" );
642
+ return this ;
643
+ }
639
644
public OpensslArgs database (Path database , Path attr ) throws IOException {
640
645
// Some versions of openssl require the presence of a index.txt.attr file
641
646
// https://serverfault.com/questions/857131/odd-error-while-using-openssl
@@ -666,6 +671,9 @@ public void exec(boolean failOnNonZero) throws IOException {
666
671
if (!pb .environment ().containsKey ("STRIMZI_new_certs_dir" )) {
667
672
pb .environment ().put ("STRIMZI_new_certs_dir" , "/dev/null" );
668
673
}
674
+ if (!pb .environment ().containsKey ("STRIMZI_authorityKeyIdentifier" )) {
675
+ pb .environment ().put ("STRIMZI_authorityKeyIdentifier" , "none" );
676
+ }
669
677
670
678
Path out = null ;
671
679
try {
0 commit comments