OpenSSL 인증서 키 생성 및 서명요청 ECC & RSA

(Last Updated On: November 11, 2019)

Generate SSL Certificate Key

ECC Private Key

openssl ecparam -genkey -name prime256v1 -out ecc.key

secp256r1 secp384r1 도 있다.

RSA Private Key

openssl genrsa -out rsa.key 2048

4096 도 있다.

Generate SSL Certificate Signing Request [CSR]

ECC CSR

openssl req -new -sha256 -key ecc.key -subj "/CN=example.com" -outform pem -out ecc.csr

RSA CSR

openssl req -new -sha256 -key rsa.key -subj "/CN=example.com" -outform pem -out rsa.csr

Generate Self-signed SSL Certificate

ECC Self-signed

openssl req -x509 -sha256 -days 365 -key ecc.key -in ecc.csr -out ecc.crt

RSA Self-signed

openssl req -x509 -sha256 -days 365 -key rsa.key -in rsa.csr -out rsa.crt