add openssl
This commit is contained in:
parent
f2c01cf1b2
commit
0ef7952a89
10
openssl
Normal file
10
openssl
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user