...
No Format |
---|
# For HTTPS servers remember to put the # server FQDN in the CN. KEY="$CN.key" CSR="$CN.csr" CRT="$CN.crt" # Generate key openssl genrsa -out "$KEY" 1024 || exit 1 # Certificate Signing Request (Remember to modify the signing request subject) openssl req -new -key "$KEY" -out "$CSR" -subj "/C=DK/O=TestOrganization/OU=TestDepartment/CN=$CN" || exit 1 # Self sign openssl x509 -req -days 1000 -in "$CSR" -out "$CRT" -signkey "$KEY" || exit 1 |
Optionally this can be packaged into a web browser friendly pkcs-12 file along with the server certificate:
No Format |
---|
pkcs12 -export -in browser.crt -inkey browser.key -out browser.p12 -certfile /path/to/server.crt
|
Creating a certificate authority for test
...