美文网首页
mac openssl 生成自签名证书

mac openssl 生成自签名证书

作者: 星星326 | 来源:发表于2022-11-28 13:39 被阅读0次

生成私钥(key文件)
openssl genrsa -out client.key 4096

生成签名请求(csr文件)
openssl req -new -key client.key -out client.csr

签发证书
openssl x509 -req -days 36500 -in client.csr -signkey client.key -out client.crt

一键生成自签名证书
openssl req -new -x509 -newkey rsa:4096 -keyout test.key -out test.crt

crt证书转换为pem格式
openssl x509 -in test.crt -out test.pem

关于证书的理解:
public.pem:仅包含public证书
public.chain.crt:仅包含全部上级签发者public证书
public.crt:public.pem+public.chain.crt 组成,有先后顺序

相关文章

网友评论

      本文标题:mac openssl 生成自签名证书

      本文链接:https://www.haomeiwen.com/subject/kwilfdtx.html