11 lines
481 B
Bash
11 lines
481 B
Bash
#!/usr/bin/bash
|
|
echo creating keys for $1
|
|
# create kopano clients ssl key pair (for authentification)
|
|
# 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 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
|