added postfix certificate distribution

This commit is contained in:
andreas
2023-10-24 20:57:44 +00:00
parent b17b808404
commit f20896e21c
12 changed files with 184 additions and 17 deletions

View File

@@ -4,5 +4,7 @@ echo creating keys for $1
# private key for client, public key for server sslkeys
export CN=$1
export SAN=DNS:$CN
openssl req -new -out tmp/$CN.csr -nodes -keyout certs/$CN.key
openssl ca -batch -in tmp/$CN.csr -passin env:CA_PWD -out certs/$CN.crt -extensions server_ext
openssl req -new -out tmp/$CN.csr -nodes -keyout certs/$CN.key
openssl rsa -in certs/$CN.key -pubout -out certs/$CN-public-key.pem
openssl ca -batch -in tmp/$CN.csr -passin env:CA_PWD -notext -out certs/$CN.crt -extensions server_ext
cat certs/$CN.key certs/$CN.crt >certs/$CN-key-certs.pem