浏览器证书基础介绍和如何测试本地浏览器的HTTPS的完备性

来源:互联网 发布:网络媒介论文 编辑:程序博客网 时间:2024/06/07 23:56

最近一个项目是更新浏览器证书,这篇文章写给有相关需求的工程师。

1 首先,了解证书的基本原理和工作方式,然后了解证书的更新办法,

1 其次,最好是,如何去验证这些证书。


1 证书的基础知识:

HTTPS 升级指南

http://www.ruanyifeng.com/blog/2016/08/migrate-from-http-to-https.html


细说 CA 和证书

http://www.barretlee.com/blog/2016/04/24/detail-about-ca-and-certs/


https://en.wikipedia.org/wiki/Certificate_authority


常见证书格式和转换

http://liuleijsjx.iteye.com/blog/433853

http://blog.csdn.net/justinjing0612/article/details/7770301


SSL中常用证书格式及其应用  

http://jimjun2003.blog.163.com/blog/static/86730756201168338319/


2 工作原理和方法

2.1 图解SSL/TLS协议

http://www.ruanyifeng.com/blog/2014/09/illustration-ssl.html

2.2 HTTPS证书生成原理和部署细节

http://www.2cto.com/article/201510/444706.html



2.2 SSL/TLS协议运行机制的概述

http://www.ruanyifeng.com/blog/2014/02/ssl_tls.html


3 证书测试网站

3.1 测试给出的网站的证书的各种讯息和证书的类型等等等,完备性

This free online service performs a deep analysis of the configuration of any SSL web server on the public Internet. Please note that the information you submit here is used only to provide you the service. We don't use the domain names or the test results, and we never will.
https://www.ssllabs.com/ssltest/analyze.html


3.2 测试给出的网站的证书的各种讯息
https://www.chinassl.net/ssltools/ssl-checker.html 
include "有效时间


3.3 本地浏览器的证书功能测试,这个网站给出了证书所要进行的各种类别的功能测试,对本地浏览器的证书功能验证是很好的测试。


不同于获取网站的获取网站的测试讯息,这个网站针对本地的证书功能进行了组合测试。

HTTPS 调试利器 - BadSSL

谷歌chrome的开发网站推荐了这个HTTPS证书测试网站,

https://www.chromestory.com/2015/05/here-is-a-website-to-test-how-your-browser-responds-to-good-and-bad-ssl-configurations/


包括如下测试:

 https://expired.badssl.com
https://wrong.host.badssl.com
https://self-signed.badssl.com
https://incomplete-chain.badssl.com
https://sha1.badssl.com
https://mixed.badssl.com
https://rc4.badssl.com
https://cbc.badssl.com
https://hsts.badssl.com
https://preloaded-hsts.badssl.com


这是个开源的项目:

https://github.com/chromium/badssl.com


这个网站的证书结果如下:

https://www.ssllabs.com/ssltest/analyze.html?d=www.badssl.com



2 https://badssl.com/ 
need to confirm how to use this test website.

badssl的介绍

【笔者摘要如下】

BadSSL 

苹果官方在 2016 年曾经宣布要强制所有第三方 APP 使用 HTTPS。 虽然由于种种原因,这个强制策略延期了。 但 HTTPS 显然已经是互联网未来的大趋势。所以尽快了解相关的知识,对你肯定会有所帮助。
今天给大家分享的一个网站 badssl.com。 它为大家提供了 HTTPS 证书校验过程中的各种场景,对于你开发基于 HTTPS 的 APP 来说,应该是很有帮助:

http://swiftcafe.io/2017/01/24/badssl/

【hsy案】本地浏览器HTTPS的完备性测试,利用badssl.com提供的例子是比较好的方式。找了很久,一直没有发现有系统的介绍badssl.com使用的文章,因为有实际做过测试,大致把如何使用写一写,方便以后困惑的前端web的开发者。

1 大致的场景分析
比如,如果访问了无效的证书,或者访问了证书过期的网站,

你的本地HTTPS应用或者你本地的浏览器会如何反应?
badssl网站给出了好几组测试的案例和方法,本地APP应用只需要通过访问该网站的分级目录,点击进去看到

2 什么是正确的测试结果在badslll.com
如果是一个https证书完备的网站,访问上述无论是证书问题,虚假的host,或者是证书有效期问题,浏览器或者HTTPS应用应该弹出提示框,高速使用者这个网站有问题,不能访问并且会有风险。

如果是一个比较差,安全性比较差的浏览器比如2345,(笔者案,这个是否安全不是我说的,在华为的软件仓库,比如andriod的软件仓库里面,搜“轻量浏览器”华为服务器会给出“该软件存在安全漏洞和风险”

如果用2345去访问badssl.com的https://wrong.host.badssl.com/

正常的安全浏览器会弹框:但是 2345好像不会


参考:

http://stackoverflow.com/questions/26630691/example-websites-that-have-invalid-certificates

上的讨论,badssl.com是最好的这方面测试的网站,


但是 对自证书的测试,也许是需要自己真的去构建一个证书,然后去测试,、

http://stackoverflow.com/questions/19441155/how-to-create-a-self-signed-certificate-for-a-domain-name-for-development?rq=1


除了badssl.com

1 https://revoked.grc.com/

也是一个类似测试revok的网站。

2 https://tv.eurosport.com/

测试

3  

https://onlinessl.netlock.hu/en/test-center/bad-ssl-certificate-usage.html

摘要:

est of SSL certificate used on incorrect website

On the website below you can test the error messages you receive if you have an SSL certificate issued by a reliable Certification Authority but the name (website, domain) in the certificate does not coincide with the name of the website where the certificate has been installed.

 

Click here for the example.

 

Why not to use and accept such a certificate?

 

It is very important never to accept these certificates and never to regard them as reliable ones. This solution offers an excellent opportunity for the phishers to gain the trust of the users with their own websites. If you use such a certificate the visitors of your website will receive an error message every time they wish to use the site. Such certificates lead to mistrust among customers and visitors and considerably reduce the quality of the site.

 

Due to the above reasons we propose to give confidential information exclusively on sites protected by SSL certificates from reliable Certification Authority as well as protect also your own website with such a certificate.

 

Benefits of using a NetLock SSL certificate.



3.4 测试PEM,(可以拿到本地浏览器里面PEM码包含的证书信息)

我们知道SSL生成的格式就是大多数是PEM格式,这个网站,可以依据你生成的PEM码,拿到你本地浏览器里面的论证证书的讯息情况。

所以,在验证证书更新的时候,如果需要验证本地证书的有效性并和服务器对比的话,这个网站的讯息的复原也是很有用的。

 https://www.trustasia.com/tools-cert-decoder 
Check PEM


https://www.ssllabs.com/ssltest/analyze.html 
Can check the type of ssl
deep analysis of the configuration of any SSL web server


4 谷歌浏览器的论证证书要求

1 Root Certificate Policy

https://www.chromium.org/Home/chromium-security/root-ca-policy


2 谷歌的证书更新白皮书

https://docs.google.com/viewer?a=v&pid=sites&srcid=Y2hyb21pdW0ub3JnfGRldnxneDoyNjg1MWJkOWY2MmM4MzA0


参考文档:

1 添加自签发的 SSL 证书为受信任的根证书

https://cnzhx.net/blog/self-signed-certificate-as-trusted-root-ca-in-windows/


2 第四章 SSL和Proxy高级选项

https://t0data.gitbooks.io/burpsuite/content/chapter4.html


3 HTTPS 升级指南

http://www.ruanyifeng.com/blog/2016/08/migrate-from-http-to-https.html


4 细说 CA 和证书

http://www.barretlee.com/blog/2016/04/24/detail-about-ca-and-certs/


5 SSL/TLS 配置

http://wiki.jikexueyuan.com/project/tomcat/ssl-tls.html


https://www.gogetssl.com/


8 HTTPS的七个误解(译文)

http://www.ruanyifeng.com/blog/2011/02/seven_myths_about_https.html


9 HTTPS 升级指南

http://www.ruanyifeng.com/blog/2016/08/migrate-from-http-to-https.html


10 HTTPS证书生成原理和部署细节

http://www.barretlee.com/blog/2015/10/05/how-to-build-a-https-server/


11 使用 BoringSSL 优化 HTTPS 加密算法选择
https://imququ.com/post/optimize-ssl-ciphers-with-boringssl.html


12 TLS 握手优化详解

https://imququ.com/post/optimize-tls-handshake.html


13 Certificate Transparency 那些事
https://imququ.com/post/certificate-transparency.html


14 HTTPS 常见部署问题及解决方案



https://imququ.com/post/troubleshooting-https.html



0 0
原创粉丝点击