openssl 自签名 CA 根证书、服务器端和客户端证书生成以及模拟单向/双向证书验证 3. 生成客户端证书
最编程
2024-07-17 16:50:27
...
3.1 生成客户端私钥
openssl genrsa -aes256 -out client.key 2048
3.2 取消密钥的密码保护
openssl rsa -in client.key -out client.key
3.3 生成客户端端签发申请文件(csr文件)
openssl req -new -sha256 -key client.key -out client.csr -subj "/C=CN/ST=FJ/L=XM/O=NONE/OU=NONE/CN=localhost/emailAddress=test@test.com"
3.4 使用CA证书签署客户端器证书
openssl x509 -req -days 36500 -sha256 -extensions v3_req -CA ca.cer -CAkey ca.key -CAserial ca.srl -CAcreateserial -in client.csr -out client.cer