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/jianzhanjiaoliu/2204.html