This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
2022-04-21 12:22:50 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Generate locally signed ssl certificate to be used on routes
|
|
|
|
# that do not require certificate issued by trusted CA
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
ME=$(basename $0)
|
|
|
|
|
2022-04-21 13:26:12 +00:00
|
|
|
generate_local_certificate() {
|
2022-04-21 12:22:50 +00:00
|
|
|
echo >&3 "$ME: Generating locally signed ssl certificate"
|
|
|
|
openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 \
|
|
|
|
-subj '/CN=local-certificate' \
|
|
|
|
-keyout /etc/ssl/local-certificate.key \
|
|
|
|
-out /etc/ssl/local-certificate.crt
|
|
|
|
}
|
|
|
|
|
|
|
|
generate_local_certificate
|