博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
自签名证书
阅读量:4626 次
发布时间:2019-06-09

本文共 1587 字,大约阅读时间需要 5 分钟。

因nginx上的证书不对,导致ie浏览器即使在导入根证书的情况下还是弹出证书中的域名和请求域名不符的问题,经查是common name需要指定的为域名,如*.test.com。

http://www.haiyun.me/archives/openssl-ca-cert.html

 
mkdir -p /etc/pki/demoCA

2.生成根证书及私钥:

cd /etc/pki/demoCA
mkdir private crl certs newcerts #新建证书存放目录
echo '00' > serial #新建serial文件并写入初始序列号00
touch index.txt #新建index.txt空文件
openssl genrsa -out private/cakey.pem 1024 #生成CA根证书私钥
openssl req -new -x509 -key private/cakey.pem  -out cacert.pem #生成CA根证书
 

3.生成服务器证书私钥、证书,可用于https服务器等。

openssl genrsa -out private/server.key 1024
openssl req -new -key private/server.key -out crl/server.csr #生成证书请求文件,可提供认证CA签核,或自签名。
cd ..
openssl ca -in demoCA/crl/server.csr -out demoCA/certs/server.crt #自签名证书

http://www.rackspace.com/knowledge_center/article/generate-a-csr-with-openssl

DN Field Explanation Example
Common Name The fully qualified domain name for your web server. This must be an exact match. If you intend to secure the URL https://www.yourdomain.com, then your CSR's common name must be www.yourdomain.com. If you plan on getting a wildcard certificate make sure to prefix your domain with an asterisk, example: *.domain.com.
Organization The exact legal name of your organization. Do not abbreviate your organization name. domain.com
Organization Unit Section of the organization IT
City or Locality The city where your organization is legally located. Wellesley Hills
State or Province The state or province where your organization is legally located. Can not be abbreviated. Massachusetts
Country The two-letter ISO abbreviation for your country. US

转载于:https://www.cnblogs.com/jvava/p/4366169.html

你可能感兴趣的文章
jQuery选择器的工作原理和优化
查看>>
冲刺六
查看>>
html超链接button
查看>>
【转】学习汇编前你应该知道的知识
查看>>
ping命令使用及其常用参数
查看>>
编写高质量代码改善C#程序的157个建议——建议86:Parallel中的异常处理
查看>>
编写高质量代码改善C#程序的157个建议——建议148:不重复代码
查看>>
silverlight学习之storyboard (动画)
查看>>
python命令行参数解析OptionParser类用法实例
查看>>
GIt/Github常用命令
查看>>
cf792b循环链表
查看>>
树链剖分——线段树区间合并bzoj染色
查看>>
使用CruiseControl.Net全面实现持续集成
查看>>
oo第二单元总结
查看>>
PL/SQL Developer的调试存储过程
查看>>
Spring AOP无法拦截内部方法调用-- expose-proxy="true"用法
查看>>
js传入参数为字符串问题
查看>>
kvm虚拟机--存储池配置梳理(转)
查看>>
团队作业8——第二次项目冲刺(Beta阶段)--第六天
查看>>
【转载】springboot:如何优雅的使用mybatis
查看>>