自签名证书制作和使用方法

自签名证书安全提示:

浏览器加入自签名证书步骤

 

 Firefox  CA证书导入

通过openssl 制作自签名证书

Extension 信息配置

1) Myconf.cnf文件内容

[req]

distinguished_name = req_distinguished_name

req_extensions = v3_req

[req_distinguished_name]

countryName = CN

stateOrProvinceName = HUBEI

localityName = ENSHI

organizationName = xx company

commonName = 10.96.163.186

[v3_req]

subjectAltName = @alt_names

[alt_names]

IP.1=10.96.163.186

#DNS.1=*.xxx.com

 

制作CA

openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out ca.key

openssl req -new -x509 -days 360 -key ca.key -subj "/CN=mrc CA/O=mrc company" -out ca.crt

制作SERVER 证书

openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out server.key

openssl  req -new -key server.key -config myconf.cnf -subj "/CN=10.96.163.86/O=mrc company server" -out server.csr

openssl x509  -days 360 -req -in server.csr -extensions v3_req -extfile ./myconf.cnf -CAcreateserial -CA ca.crt -CAkey ca.key -out server.crt

其中

CN=common name

O = Orgnazation

证书请求,显示证书,显示RSA

openssl req -in server.csr  -text -noout

openssl x509 -in server.crt -text -noout

openssl rsa -in server.key -text -noout

 

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值