Generate Certificates using openssl One Liner

This is useful for scripting the generation of certificates for web servers.

openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \
    -subj "/C=${node.ssl.country}/ST=${node.ssl.state}/L=${node.ssl.city}/O=${node.ssl.ou}/CN=${node.ssl.cn}" \
    -keyout /etc/ssl/private/node-selfsigned.key  -out /etc/ssl/certs/node-selfsigned.crt

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: