我只有一台防火墙没有ACG也没有服务器,那怎么生成一个SSL解密证书?
(0)
您好,需要导入公钥,参考这个
(0)
我知道要导入证书,但我不知道那证书怎么生成
我知道要导入证书,但我不知道那证书怎么生成
在Linux下运行下面四条命令就能生成给安卓和Windows的证书了:
openssl genrsa -out ca-Private-Key.pem 2048
openssl req -new -key ca-Private-Key.pem -out ca-Req.csr
openssl x509 -req -extfile /etc/pki/tls/openssl.cnf -extensions v3_ca -in ca-Req.csr -out ca-cert.pem -signkey ca-Private-Key.pem -days 3650 ###安装在安卓上
openssl pkcs12 -export -out ca-cert.pfx -inkey ca-Private-Key.pem -in ca-cert.pem ###安装在防火墙或ACG上
openssl x509 -extfile /etc/pki/tls/openssl.cnf -extensions v3_ca -inform pem -in ca-cert.pem -outform der -out ca-cert.cer ###安装在Windows上
openssl.cnf:
[ ca ]
default_ca = CA
[ CA ]
dir = /root/ca
database = /root/ca/index.txt
new_certs_dir = /root/ca/newcerts
certificate = /root/ca/private/ca.crt
serial = /root/ca/serial
private_key = /root/ca/private/ca.key
RANDFILE = /root/ca/private/.rand
default_days = 3650
default_crl_days= 30
default_md = md5
unique_subject = no
policy = default_policy
[ default_policy ]
countryName = match
stateOrProvinceName = match
organizatiOnName= match
organizatiOnalUnitName= optional
localityName = optional
commOnName= optional
emailAddress = optional
[ v3_ca ]
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid:always,issuer
basicCOnstraints= CA:true
[ v3_server ]
basicCOnstraints= critical, CA:FALSE
keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment, keyAgreement
extendedKeyUsage = critical, serverAuth
[ v3_client ]
basicCOnstraints= critical, CA:FALSE
keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment, keyAgreement
extendedKeyUsage = critical, clientAuth
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明