Skip to content

Commit

Permalink
Update 3.openssl.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vxzyfx authored Oct 23, 2024
1 parent cc85992 commit 8447c70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/7.note/3.openssl.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

### 生成域名证书
Expand Down Expand Up @@ -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选项
Expand Down

0 comments on commit 8447c70

Please sign in to comment.