About certificate
证书spec, X509, 类似规定了一个目录结构。其中重要内容包括
- issuer: who isued this certificate
- subject: the ID of this certificate
- public key:
- validate period
- sign: the sha of this certificate, encritpted with the issuer's private key. (This is the mechanism how to verify the certificate)
- in extention, other there is a link to get certificate of issuer.
DN (distingushed name)
- include C(country), ST(state), O(organization), OU(部门,可以多个), CN(common name)
- both Issuer and Subject are DN.
Certificate formate
- PEM, base64 encoded DER file, easy to be edited
- DER, CER, CRT. same, DER, Distinguished Encoding Rules. openssl -inform der -in a.cert -text -noout
- P12. Windows specific, contails both public key and private key. So the file itself should be encriypted.
- p7b, p7c. CRL (certificate revocation list) 常用于证书吊销文件,不包括key
- JKS. Java Key storage(Java 专利)利用 keytool 管理
应用
- Safari and macOS, managed by "keychain access". The each keychain is stored in separated directory. login means the current login user.
- Java, keytool 管理,has different location from OS(e.g. /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/security/cacerts), so even safari downloaded a Root CA for a website, Java may still not work.
- keytool -list -keystore cacerts
- Python:
- public certs stored in certifi module ([py_home]/site-packages/certifi/cacert.pem), then all python modules relying on certifi (e.g. requests) could load certs for ssl verification
- However, pip is a standalone package that contains its own requests/certifi module and public cert storage. One solution is to wrap original certifi.where() and pip._vendor.requests.certs.where() method to force return path ‘/etc/pki/tls/cert.pem’. Make sure all certs are store in it.
- CN name: https://security.stackexchange.com/questions/40026/openssl-x509-whats-the-significance-of-cn-common-name
- curl, use curl -v to see with cacert it is using, maybe /etc/ssl/cacert.pem, makeby $HOME/anaconda/ssl/cacert.pem.
- 手动指定使用某个证书来验证网站 curl --cacert mycertificate.cer -v https://www.google.com
References:
- cert format,
- https://serverfault.com/questions/9708/what-is-a-pem-file-and-how-does-it-differ-from-other-openssl-generated-key-file
- https://www.cnblogs.com/guogangj/p/4118605.html
- https://en.wikipedia.org/wiki/X.509 (X.509 内容说明) ,
- PKIX (Public Key Infrastructure X.509)
- OCSP (Online Certificate Status Protocol)
- verify certificate: https://stackoverflow.com/questions/188266/how-are-ssl-certificates-verified
- Certificate Chain:
- https://ssl.comodo.com/articles/understanding-an-ssl-certificate-chain.php
- https://support.dnsimple.com/articles/what-is-ssl-certificate-chain/
Root certificate
- Intermediate certifcate
- client certificate. In SSL, webserver might need to veifiy the certificate of the client. Usually it doesn't.
About certificate的更多相关文章
- 钉钉开放平台demo调试异常问题解决:hostname in certificate didn't match
今天研究钉钉的开放平台,结果一个demo整了半天,这帮助系统写的也很难懂.遇到两个问题: 1.首先是执行demo时报unable to find valid certification path to ...
- 异常处理之“The remote certificate is invalid according to the validation praocedure.”
参考文章:http://brainof-dave.blogspot.com.au/2008/08/remote-certificate-is-invalid-according.html 参考文章:h ...
- The certificate used to sign ***has either expired or has been revoked. An updated certificate is required to sign and install the application
真机测试的时候弹出这样的提示:The certificate used to sign ***has either expired or has been revoked. An updated ce ...
- Domino----The Address Book does not contain a cross certificate capable of validating the public key.
The Address Book does not contain a cross certificate capable of validating the public key. 地址本不包含交叉 ...
- Your account already has a valid iOS Distribution certificate!
iOS 发布提交出现:Your account already has a valid iOS Distribution certificate!问题解决 转载的链接 http://www.jia ...
- configure Git to accept a particular self-signed server certificate for a particular https remote
get the self signed certificate put it into some (e.g. ~/git-certs/cert.pem) file set git to trust t ...
- [nodejs] Error: unable to verify the first certificate
Error: unable to verify the first certificate Solution npm config set registry http://registry.npmjs ...
- Rails 之微信开发 : OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
微信公众平台,使用Ruby On Rails + Win7 在取得OpenID时,如果简单的使用http.get方法,会出现如下 SSL_connect returned=1 errno=0 stat ...
- Fiddler 手机端证书安装No root certificate was found
测试过程中发现在浏览器中访问代理服务器及端口,不通,提示要安装证书. 点击证书安装时,提示错误: No root certificate was found,Have you enabled HTTP ...
- 关于Certificate、Provisioning Profile、App ID的介绍及其之间的关系
1.概念介绍 如果你拥有一个开发者账户的话,在iOS Dev Center打开Certificates, Indentifiers & Profiles,你就可以看到如下的列表: Profil ...
随机推荐
- Java线程池应用及原理分析(JDK1.8)
目录 一.线程池优点 二.线程池创建 三.任务处理流程 四.任务缓存队列及排队策略 五.任务拒绝策略 六.线程池关闭 七.线程池实现原理 八.静态方法创建线程池 九.如何确定线程池大小 一.线程池优点 ...
- lnmp环境一键安装
lnmp一键安装命令: wget -c http://soft.vpser.net/lnmp/lnmp1.5.tar.gz && tar zxf lnmp1.5.tar.gz & ...
- JAVA设计方法思考之如何实现一个方法执行完毕后自动执行下一个方法
今天编程时,突然想起来在一些异步操作或Android原生库的时候,需要我们实现一些方法, 这些方法只需要我们具体实现,然后他们会在适当的时候,自动被调用! 例如AsyncTask,执行玩doInBac ...
- python中网络编程之线程
网络编程之线程 什么是线程? 程序的执行线路.每个进程默认有一条线程.线程包含了程序的具体步骤. 多线程就是一个进程中有除主线程(默认线程)外还有多个线程. 线程与进程的关系(进程包含线程,而线程依赖 ...
- 微信小程序创建一个新项目
1. 新建一个文件夹. 2. 打开微信小程序开发工具,导入新建文件夹:然后输入创建的appId:会自动生成一个project.config.json,打开这个文件,会看到appid这个字段. 3.可以 ...
- servlet实现mysql数据库分页
一.分页所需要的sql语句准备 select * from table limit m,n其中m是指记录开始的index,从0开始,表示第一条记录n是指从第m+1条开始,取n条. 例如:select ...
- 采用ftpServer构建嵌入式ftp服务器时设置pass功能
讲ftpserver嵌入式ftp服务器的文章很多,但是都没有介绍pass功能设置的. apach上pass部分也是针对的ftpd服务器的xml配置,关于嵌入式ftp服务器设置pass功能的部分几乎没有 ...
- select简单循环嵌套
访问学生的物理最高成绩,并且打印出来,单个要打印出所有的信息 在添加几个 and 就可以啦. select student.gender,student.sname from student whe ...
- # 2018-2019-20175302实验一《Java开发环境的熟悉》实验报告
2018-2019-20175302实验一<Java开发环境的熟悉>实验报告 实验内容 1.使用JDK编译.运行简单的Java程序: 2.使用Eclipse 编辑.编译.运行.调试Java ...
- 刷题的model格式(请用英文)
[抄题]: [暴力解法]: 时间分析: 空间分析: [优化后]: 时间分析: 空间分析: [奇葩输出条件]: [奇葩corner case]: [思维问题]: [英文数据结构或算法,为什么不用别的数据 ...