Skip to content

Commit

Permalink
Add key usage to the Kafka test CA
Browse files Browse the repository at this point in the history
Under Python 3.13, Kafka tests were failing because no key usage
extension was defined on the CA certificate. Add the appropriate
flag to `openssl` to define an appropriate key usage extension for
the CA.
  • Loading branch information
rra committed Dec 11, 2024
1 parent 0b65724 commit d3ded50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion safir/tests/support/kafka/data/generate-kafka-secrets.bash
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mkdir -p "${OUT_DIR}"
cd "${OUT_DIR}" || exit

# PEM CA cert and key
openssl req -new -x509 -keyout ${CA_KEY} -out ${CA_CERT} -days 365 -subj "/CN=ca" -nodes
openssl req -new -x509 -addext 'keyUsage=critical, cRLSign, digitalSignature, keyCertSign' -keyout ${CA_KEY} -out ${CA_CERT} -days 365 -subj "/CN=ca" -nodes

# Server truststore CA cert
keytool -keystore ${SERVER_TRUSTSTORE} -alias CARoot -storepass ${PASSWORD} -importcert -file ${CA_CERT} -noprompt
Expand Down

0 comments on commit d3ded50

Please sign in to comment.