1、在root文件夾下面創建一個req.cnf文件
2、修改 req.cnf 文件,文件在附件裡面
[req] distinguished_name = req_distinguished_name x509_extensions = v3_req prompt = no [req_distinguished_name] C = US ST = VA L = SomeCity O = MyCompany OU = MyDivision CN = www.company.com [v3_req] keyUsage = critical, digitalSignature, keyAgreement extendedKeyUsage = serverAuth subjectAltName = @alt_names [alt_names] DNS.1 = www.company.com DNS.2 = company.com DNS.3 = company.net
3、運行下列代碼:
openssl req -x509 -nodes -days 36500 -newkey rsa:2048 \
-keyout heikesiquanjia.key -out heikesiquanjia.pem -config req.cnf -sha256
4、ok,完成。
發布者:彬彬筆記,轉載請註明出處:https://www.binbinbiji.com/zh-hant/jianzhanjiaoliu/2204.html