自签名证书安全提示:
浏览器加入自签名证书步骤
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