Remove Issuer/Serial from AKI in certutil/certgen (elastic/x-pack-elasticsearch#3931)
The Issuer and Serial number are optional and can cause problems with chain validation when using OpenSSL based tools relates elastic/x-pack-elasticsearch#3915 Original commit: elastic/x-pack-elasticsearch@defcdd934f
This commit is contained in:
parent
245a063492
commit
e7e3584560
|
@ -459,11 +459,10 @@ public class CertUtils {
|
||||||
throw new IllegalArgumentException("ca certificate is not a CA!");
|
throw new IllegalArgumentException("ca certificate is not a CA!");
|
||||||
}
|
}
|
||||||
issuer = X500Name.getInstance(caCert.getIssuerX500Principal().getEncoded());
|
issuer = X500Name.getInstance(caCert.getIssuerX500Principal().getEncoded());
|
||||||
authorityKeyIdentifier = extUtils.createAuthorityKeyIdentifier(caCert);
|
authorityKeyIdentifier = extUtils.createAuthorityKeyIdentifier(caCert.getPublicKey());
|
||||||
} else {
|
} else {
|
||||||
issuer = subject;
|
issuer = subject;
|
||||||
authorityKeyIdentifier =
|
authorityKeyIdentifier = extUtils.createAuthorityKeyIdentifier(keyPair.getPublic());
|
||||||
extUtils.createAuthorityKeyIdentifier(keyPair.getPublic(), new X500Principal(issuer.toString()), serial);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JcaX509v3CertificateBuilder builder =
|
JcaX509v3CertificateBuilder builder =
|
||||||
|
|
Loading…
Reference in New Issue