怎样获取自己的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 ...
随机推荐
- poj 2891 Strange Way to Express Integers(中国剩余定理)
http://poj.org/problem?id=2891 题意:求解一个数x使得 x%8 = 7,x%11 = 9; 若x存在,输出最小整数解.否则输出-1: ps: 思路:这不是简单的中国剩余定 ...
- NYOJ10,skiing
skiing 时间限制:3000 ms | 内存限制:65535 KB 难度:5 描写叙述 Michael喜欢滑雪百这并不奇怪, 由于滑雪的确非常刺激.但是为了获得速度,滑的区域必须向下倾斜,并且 ...
- HTTP 错误 500.19 – Internal Server Error web.config 文件的 system.webServer/httpErrors 节中不允许绝对物理路径“C:\inetpub\custerr”[转]
给ASP或者ASP.NET等需要配置IIS服务器的过程中,很可能会遇到以下两种错误.尤其是用Win7系统的,配置IIS7.0版本比用XP系统配置IIS5.1版本而言要复杂复杂一些.当同时需要配置ASP ...
- perl json模块
JSON - JSON (JavaScript Object Notation) encoder/decoder 简介: use JSON; # imports encode_json, decode ...
- C# 未能加载文件或程序集“MySQLDriverCS..." 错误解决
在解决方案的属性里,生成,里面有个目标平台,网上说的 大概也就是64位和32位的不兼容问题..试着把目标平台改为X86后竟然神奇的正常了!
- HDU5090模拟,hash
/* HDU 5090 算是一道简单模拟题.但当中有非常深的hash思想 这是本人的第一道hash题 更是本人的第一道纸质代码不带编译不带执行提交AC的题 值得纪念 废话讲这么多之后,讲述题中思想 因 ...
- javaee加密部署,tomcat使用自己的classloader解密【正解】
[起因] 公司需要对一个web项目进行加密之后出售, 大家都知道的,class很好反编译, 所以需要对class文件先进行加密, 然后使用自己的classloader进行解密并加载. [步骤] 大概分 ...
- 首款符合PICO-ITX规格的A20开源硬件开发平台
http://mp.weixin.qq.com/mp/appmsg/show?__biz=MjM5NzM0MjcyMQ==&appmsgid=10001083&itemidx=2&am ...
- JAVA中字符串比較equals()和equalsIgnoreCase()的差别
.使用equals( )方法比較两个字符串是否相等.它具有例如以下的一般形式: boolean equals(Object str) 这里str是一个用来与调用字符串(String)对象做比較的字符串 ...
- Hibernate持久化对象状态
在Hibernate中,持久化对象再被操作过程中分为三个时期.这三个时期和session周期相关. 各自是瞬时(Transient),持久太(persistent)和游离态(Detached) 瞬时状 ...