openssl 增加域名IP(SAN)

拷贝openssl.cnf

增加

[ req ]

default_bits = 2048
default_md = sha256
default_keyfile = privkey.pem
distinguished_name = req_distinguished_name
attributes = req_attributes
x509_extensions = v3_ca # The extentions to add to the self signed cert

string_mask = utf8only

req_extensions = v3_req # The extensions to add to a certificate request

[ v3_req ]

# Extensions to add to a certificate request

basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names

[ alt_names ]
DNS.1 = www.aaa.com
DNS.2 = 192.168.1.222
IP.1 = 192.168.1.222

openssl req -new -nodes -keyout server2.key -out server2.csr -config openssl.cnf

openssl x509 -req -in ustack.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out ustack.crt -days 3600 -extfile openssl.cnf -extensions v3_req

0
0
«  上一篇: spring 启动属性注入
»  下一篇: mosquitto安装
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值