怎样获取自己的SSL证书
原创文章,转载请注明出处:server非业余研究http://blog.csdn.net/erlib 作者Sunface
假设仅为了測试,那使用以下方法就可以:
測试证书创建:
1.创建证书的key
- $ openssl genrsa -out key.pem 1024
2.创建证书,注意这里的common name应该填你的server name
- $ openssl req -new -key key.pem -out request.pem
- Country Name (2 letter code) [AU]:UA
- State or Province Name (full name) [Some-State]:
- Locality Name (eg, city) []:Kiev
- Organization Name (eg, company) [Internet Widgits Pty Ltd]:site4fast blog
- Organizational Unit Name (eg, section) []:.
- Common Name (eg, YOUR name) []:site4fast.example.net
- Email Address []:site4fast@example.net
- Please enter the following 'extra' attributes
- to be sent with your certificate request
- A challenge password []:
- An optional company name []:
3.证书签字
- $ openssl x509 -req -days 30 -in request.pem -signkey key.pem -out certificate.pem
4.至此,我们须要的測试证书已经创建好了:"self-signed certificate".
1.安装CA证书
- $ aptitude install ssl-cert ca-certificates
2.在startssl.com注冊
- $ openssl req -new -newkey rsa:2048 -nodes -keyout www_privatekey.pem -out www_csr.pem
- Generating a 2048 bit RSA private key
- ..................................++++++
- ....................++++++
- writing new private key to 'www_privatekey.pem'
- -----
- You are about to be asked to enter information that will be incorporated
- into your certificate request.
- What you are about to enter is what is called a Distinguished Name or a DN.
- There are quite a few fields but you can leave some blank
- For some fields there will be a default value,
- If you enter '.', the field will be left blank.
- -----
- Country Name (2 letter code) [AU]:UA
- State or Province Name (full name) [Some-State]:Some state
- Locality Name (eg, city) []:Some City
- Organization Name (eg, company) [Internet Widgits Pty Ltd]:Some Organisation
- Organizational Unit Name (eg, section) []:IT
- Common Name (eg, YOUR name) []:www.example.org
- Email Address []:test@example.org
- Please enter the following 'extra' attributes
- to be sent with your certificate request
- A challenge password []:
- An optional company name []:
4.在发送之前验证请求的内容
- $ openssl req -in www_csr.pem -text -verify -noout
5.将请求发送给startssl.com,从站点请求一个新的证书。当须要CSR的时候将'www_csr.pem'填进去
- $ openssl x509 -in www_certificate.pem -text -noout
7.測试server证书
- $ openssl verify www_certificate.pem
假设都正确。那就会看到OK的提示
- www_certificate.pem: OK
怎样获取自己的SSL证书的更多相关文章
- 阿里云和腾讯云免费SSL证书 专题
阿里云部署SSL证书 http://www.cnblogs.com/sslwork/p/5984167.html 查找中间证书 为了确保兼容到所有浏览器,我们必须在阿里云上部署中间证书,如果不部署证书 ...
- 实战申请Let's Encrypt永久免费SSL证书过程教程及常见问题
最近需要https这里看到一份不错的博客,收录一下! Let's Encrypt作为一个公共且免费SSL的项目逐渐被广大用户传播和使用,是由Mozilla.Cisco.Akamai.IdenTrust ...
- 申请Let’s Encrypt永久免费SSL证书过程教程及常见问题
配置证书https://easy.zhetao.com/ 虽然目前Let’s Encrypt免费SSL证书默认是90天有效期,但是我们也可以到期自动续约,不影响我们的尝试和使用,为了考虑到文章的真 ...
- 转载免费的SSL证书
目前我知道的有2种方式进行免费的SSL证书的获取 第一种:腾讯云申请 第二种:Let's Encrypt (国外在) 我一直使用第一种,还可以,有效期1年. 以下转载第二种: 实战申请Let's En ...
- ubuntu20.04 apache2 配置安装ssl证书
1. 获取SSL证书 根据自己的网站服务器来获取不同的ssl证书,我的服务器是ubuntu20.04. 证书如下: 00_***.key ## 私钥文件 01_CERTIFICATE_***_***. ...
- centos7利用acme.sh获取Let's Encrypt的永久免费ssl证书并配置网站域名https访问
acme.sh介绍:https://github.com/Neilpang/acme.sh/wiki/%E8%AF%B4%E6%98%8E github:https://github.com/Neil ...
- Let’s Encrypt Wildcard 免费泛域名SSL证书获取安装
2018 年 1 月Let’s Encrypt CA 宣布免费提供通配符证书(Wildcard certificate).通配符证书是一种可被多个子域使用的公钥证书.这意味着,单个证书可用于提供多台服 ...
- docker获取Let's Encrypt永久免费SSL证书
一 起因 官方的cerbot太烦了,不建议使用 还不如野蛮生长的acme.sh,而这里介绍docker运行cerbot获取Let's Encrypt永久免费SSL证书 二 选型 cerbot的证书不会 ...
- ubuntu 下获取Let's Encrypt免费ssl证书
# ubuntu 下获取Let's Encrypt免费ssl证书 # 一.安装Nginx https://www.cnblogs.com/watermeloncode/p/15476317.html ...
随机推荐
- Android Studio安装教程
Google在2013 I/O大会上发布Android Studio之后,广大Android开发者欢欣鼓舞,不过很快就有人出现问题,Android Studio无法安装,或者安装后无法启动,这篇文章就 ...
- -F, --flush-logs
<pre name="code" class="html"> -F, --flush-logs Flush logs file in server ...
- spark论坛
http://spark.apache.org/ http://bbs.csdn.net/forums/spark http://spark.csdn.net/ http://tieba.baidu. ...
- 重设mysql数据库root用户密码
原文:http://blog.sina.com.cn/s/blog_a3695da601010mrs.html 1, 启用任务管理器,结束mysql进程 2,进入命令行,进入mysql的bi ...
- Java基础11 对象引用
链接地址:http://www.cnblogs.com/vamei/archive/2013/04/01/2992484.html 作者:Vamei 出处:http://www.cnblogs.com ...
- Java基础08 继承
作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明.谢谢! 继承(inheritance)是面向对象的重要概念.继承是除组合(composit ...
- leetcode:Reverse Nodes in k-Group(以k为循环节反转链表)【面试算法题】
题目: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list ...
- Shell脚本笔记
如何查询文件里的某个字符串? grep “字符串” 文件 例:grep "abc" tmp.txt 如何将查询出来的内容赋给变量? str=$(grep "abc ...
- 基于visual Studio2013解决C语言竞赛题之1010计算
题目 解决代码及点评 /************************************************************************/ ...
- 前端project师,确定你的目标吧!无能的人才管他叫命运
导语: 你为自己定过一个不靠谱的目标,是20年前的事了吧. 长大你想干什么?你的回答是什么?现在实现了吗? 如今,你每天都坐在同一个格子间的同一个电脑前,会不会感到每天都像是在复印,感到前途是模糊的, ...