diff --git a/openssl b/openssl new file mode 100644 index 0000000..16a1b8e --- /dev/null +++ b/openssl @@ -0,0 +1,10 @@ +openssl genrsa -out ca.key 2048 +openssl req -new -x509 -days 365 -key ca.key -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=Acme Root CA" -out ca.crt + +openssl req -newkey rsa:2048 -nodes -keyout server.key -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=*.example.com" -out server.csr +openssl x509 -req -extfile <(printf "subjectAltName=DNS:example.com,DNS:www.example.com,IP:0.0.0.0") -days 365 -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt + +openssl req -newkey rsa:2048 -nodes -keyout client.key -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=*.example.com" -out client.csr +openssl x509 -req -extfile <(printf "subjectAltName=DNS:example.com,DNS:www.example.com,IP:0.0.0.0") -days 365 -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt + +openssl x509 -in server.crt -text -noout \ No newline at end of file