Just Do It ! - Yolo

openssl로 TLS용 사설인증서 만들기

Https 서비스를 위한 TLS 인증서 만들기 https://github.com/jupilhwang/mk-ssl-cert-key $DOMAIN 값을 원하는 도메인(FQDN)으로 지정한다. export DOMAIN=example.com curl https://raw.githubusercontent.com/jupilhwang/mk-ssl-cert-key/master/mk-ssl-cert-key.sh | bash - #!/bin/bash set -e SCRIPTDIR=$(cd $(dirname "$0") && pwd -P) : ${DOMAIN:?must be set the DNS domain root (ex: example.com)} : ${KEY_BITS:=4096} : ${DAYS:=1825} # Generate CA Certificate openssl req -new -x509 -nodes -sha256 -newkey rsa:${KEY_BITS} -days ${DAYS} -keyout ${DOMAIN}.ca.key.pkcs8 -out ${DOMAIN}.ca.crt -config <( cat << EOF [ req ] prompt = no distinguished_name = dn [ dn ] C = KR O = Private CN = Autogenerated CA EOF ) # Generate Private key with CA Certificate key openssl rsa -in ${DOMAIN}.