Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 606 Bytes

File metadata and controls

19 lines (15 loc) · 606 Bytes

OpenSSL

Generate a new private key and certificate

SO

#!/usr/bin/env sh
# Generate a new private key and certifcate using the argument as the base filename.
# $1 = Domain
openssl req -x509 -nodes -days 730 -sha1 -newkey rsa:2048 -keyout "$1.key" -out "$1.cert" \
	-subj "/C=GB/ST=State/L=Town/O=Company/OU=OrgUnit/CN=$1/emailAddress=my@email.com"

Display the contents of a certificate

openssl x509 -in my.cert -text -noout