From 8447c7039ec655562f99c382c493f8da4fff7385 Mon Sep 17 00:00:00 2001 From: vxzyfx's github Date: Wed, 23 Oct 2024 23:22:34 +0800 Subject: [PATCH] Update 3.openssl.md --- content/7.note/3.openssl.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/7.note/3.openssl.md b/content/7.note/3.openssl.md index e10586d..754a70a 100644 --- a/content/7.note/3.openssl.md +++ b/content/7.note/3.openssl.md @@ -33,7 +33,7 @@ openssl req -x509 -days 3650 -key ca.key -out ca.crt ### 查看证书 ```bash -openssl x509 -in ca.crt -text -noout +openssl x509 -text -noout -in ca.crt ``` ### 生成域名证书 @@ -141,7 +141,7 @@ openssl ec -text -noout -in ca_ecc.key 通过CA证书和密钥,生成证书的密钥,一键生成证书 ```bahs -openssl req -x509 -new -nodes -key server.key -sha256 -days 365 -CA ca.crt -CAkey ca.key -out server.crt -subj "/CN=localhost" -addext "extendedKeyUsage=clientAuth,serverAuth" -addext "subjectAltName=IP:127.0.0.1,DNS:localhost" -addext "basicConstraints=critical,CA:FALSE" -addext "keyUsage=critical,digitalSignature,keyEncipherment" +openssl req -x509 -new -nodes -key server.key -sha256 -days 365 -CA ca.crt -CAkey ca.key -out server.crt -subj "/CN=localhost" -addext "extendedKeyUsage=clientAuth,serverAuth" -addext "subjectAltName=IP:127.0.0.1,DNS:localhost" -addext "basicConstraints=critical,CA:FALSE" -addext "keyUsage=critical,digitalSignature,keyEncipherment" ``` ## addext选项