https證書概念

https://studygolang.com/articles/10776

http://www.360doc.com/content/15/0520/10/21412_471902987.shtmlhtml

crt、key以及pem的區別以及生成

crt — Alternate synonymous most common among *nix systems .pem (pubkey).golang

csr — Certficate Signing Requests (synonymous most common among *nix systems).算法

cer — Microsoft alternate form of .crt, you can use MS to convert .crt to .cer (DER encoded .cer, or base64[PEM] encoded cer).windows

pem = The PEM extension is used for different types of X.509v3 files which contain ASCII (Base64) armored data prefixed with a «—– BEGIN …» line. These files may also bear the cer or the crt extension.服務器

der — The DER extension is used for binary DER encoded certificates.工具

證書(Certificate) .cer .crt 
私鑰(Private Key).key 
證書籤名請求(Certificate sign request) .csr 
至於pem和der,是編碼方式,以上三類都可以使用這兩種編碼方式,所以.pem和.der(少見)不必定是以上三種(Cert,Key,CSR)中的某一種ui

PEM - Privacy Enhanced Mail,打開看文本格式,以」—–BEGIN…」開頭, 「—–END…」結尾,內容是BASE64編碼. 
查看PEM格式證書的信息:openssl x509 -in certificate.pem -text -noout 
Apache和*NIX服務器偏向於使用這種編碼格式.編碼

DER - Distinguished Encoding Rules,打開看是二進制格式,不可讀. 
查看DER格式證書的信息:openssl x509 -in certificate.der -inform der -text -noout 
Java和Windows服務器偏向於使用這種編碼格式.code

x509 
X.509是一種很是通用的證書格式。全部的證書都符合ITU-T X.509國際標準,所以(理論上)爲一種應用建立的證書能夠用於任何其餘符合X.509標準的應用。orm

x509證書通常會用到三類文,key,csr,crt。 
Key 是私用密鑰openssl格,一般是rsa算法。 
Csr 是證書請求文件,用於申請證書。在製做csr文件的時,必須使用本身的私鑰來簽署申,還能夠設定一個密鑰。 
crt是CA認證後的證書文,(windows下面的,實際上是crt),簽署人用本身的key給你簽署的憑證。

 

 

Linux 下的工具們一般使用 base64 編碼的文本格式,相關經常使用後綴以下:
* 證書:.crt, .pem
* 私鑰:.key
* 證書請求:.csr

.cer 好像是二進制的證書。固然你也能夠把證書和 key 放到同一個文件裏邊。這時候擴展名一般叫 .pem。Java 的 keystore 什麼的都是二進制的,好像是自有格式。

相關文章
相關標籤/搜索