最后活跃于 2 months ago

修订 260c61c902fbe1ef7f153df47441afc89cded284

mk-ssl-cert 原始文件
1#!/bin/bash
2
3source .env
4SSL_FQDN=${SSL_DOMAIN:?Specify the FQDN you are creating these certificates for}
5SSL_COMMON_NAME=${SSL_INPUT:?Specify the common name being registered under this certificate}
6printf "Creating self-signed SSL certificate...\n"
7openssl req -x509 -nodes -newkey rsa:2048 -keyout "/usr/local/share/ca-certificates/${SSL_FQDN}.key" -out "/usr/local/share/ca-certificates/${SSL_FQDN}.crt" -days 365 -subj "/CN=${SSL_COMMON_NAME}"
8printf "Updating system's trusted certificates...\n"
9update-ca-certificates