mirror of https://github.com/apache/kafka.git
KAFKA-9319: Fix generation of CA certificate for system tests. (#8106)
Newer versions of Java have added checks to ensure that trust anchors are CA certificates and contain proper extensions. This PR adds Basic Constraints extension with the CA field set to true for system tests. Reviewers: ajini Sivaram <rajinisivaram@googlemail.com>
This commit is contained in:
parent
97c5dc1c13
commit
f364281431
|
@ -48,7 +48,7 @@ class SslStores(object):
|
|||
Generate CA private key and certificate.
|
||||
"""
|
||||
|
||||
self.runcmd("keytool -genkeypair -alias ca -keyalg RSA -keysize 2048 -keystore %s -storetype JKS -storepass %s -keypass %s -dname CN=SystemTestCA -startdate %s" % (self.ca_jks_path, self.ca_passwd, self.ca_passwd, self.startdate))
|
||||
self.runcmd("keytool -genkeypair -alias ca -keyalg RSA -keysize 2048 -keystore %s -storetype JKS -storepass %s -keypass %s -dname CN=SystemTestCA -startdate %s --ext bc=ca:true" % (self.ca_jks_path, self.ca_passwd, self.ca_passwd, self.startdate))
|
||||
self.runcmd("keytool -export -alias ca -keystore %s -storepass %s -storetype JKS -rfc -file %s" % (self.ca_jks_path, self.ca_passwd, self.ca_crt_path))
|
||||
|
||||
def generate_truststore(self):
|
||||
|
|
Loading…
Reference in New Issue