Quantcast
Channel: Evilprofessor.co.uk » Code snippets
Viewing all articles
Browse latest Browse all 5

Generate a self-signed certificate

$
0
0

Quickly generate a self-signed certificate on the command line. Noting this information as the original source has disappeared and its handy to have around.

mkdir -p /etc/certs
openssl req -new \
            -x509 \
            -days 3650 \
            -nodes \
            -out    "/etc/certs/EXAMPLE.COM.pem" \
            -keyout "/etc/certs/EXAMPLE.COM.key" \
            -batch -subj "/CN=EXAMPLE.COM"

# ensure that the files are readable 
chmod o+r /etc/certs/EXAMPLE.COM.*

Viewing all articles
Browse latest Browse all 5

Trending Articles