我们在部署SSL证书到网站项目的时候,是需要根据不同的设备引擎选择证书的格式的。但是我们常用的证书格式包括PEM和DER格式。
1、PEM证书格式
PEM格式是一种基于ASCII编码的文本格式,常用于表示SSL证书、私钥和中间CA证书。PEM格式的SSL证书文件通常以.pem、.crt或.cer为扩展名。
比如:
-----BEGIN CERTIFICATE----- MIIGgDCCBOigAwIBAgIQKaE6qGRfU5C4zVtw37UEqTANBgkqhkiG9w0BAQwFADBZ MQswCQYDVQQGEwJDTjElMCMGA1UEChMcVHJ1c3RBc2lhIFRlY2hub2xvZ2llcywg SW5jLjEjMCEGA1UEAxMaVHJ1c3RBc2lhIFJTQSBEViBUTFMgQ0EgRzIwHhcNMjMw ODA1MDAwMDAwWhcNMjQwODA0MjM1OTU5WjAbMRkwFwYDVQQDExB5dW1pbmd5b3Vo dWkuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8T1WS+pnL+mE DVS4yUuH4MaWsdQLe5svJ+hWxgTtiJHNbWNgyU94aI8qBWnNU0TEsoCW/EF51qmB e//6p3nph+REgLlpal9f1g2GM2WdkvnwtdptyIpoeub+mQUih9w55GS3DGVNU453 +J0d5ea0BzTGm0oBXI3Ysstf/nYOJ2/kw/KNYsnI2N/naUakEhINMHmwzMFGw//8 6VWU/h8sz52PKV5u7N1rcHHHjbjpLAG9xAed/Gc2Gd+af+8B6CqM3GxthCyKOFZf jNpZ/pMlIW+nlH1Lv3EgDM+DgY1MO3ElMt6EIVi9hFBIACHHcXiQCZr6jvBmuLXp XUxv5fnt4wIDAQABo4IDADCCAvwwHwYDVR0jBBgwFoAUXzp8ERB+DGdxYdyLo7UA A2f1VxwwHQYDVR0OBBYEFK8riUupVIy34JbGlBa/5hZ7rr44MA4GA1UdDwEB/wQE AwIFoDAMBgNVHRMBAf8EAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcD AjBJBgNVHSAEQjBAMDQGCysGAQQBsjEBAgIxMCUwIwYIKwYB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wW9QlWR0S94D9Hmybfr0mASy/VGN+PrD6kuDMybnuxAdLM 3LzUhITliB07wvRqLw7rzAAVAMneT4p3Ou9DX+D9vu1YJz2Z9CPzUmB3FRWxqFf8 0TLoIbCath9wDU+6eYDf4QXmUh5SFW0obRVqOtKQNrks4jSJPWnNiojg3wzlHO8X nHiEX5iC6Ub884NlKZiwP7ImGfhpEJjf4RdAzyrHZSI7nw+bAD4NMcUqBqGt4/XH j4arId4kvcKVtDgbskoAF86v66V8E/9CY8eS7jrN9K/tJgPT -----END CERTIFICATE-----
2、DER格式
DER格式是一种二进制编码的证书格式,通常用于在某些系统或设备中存储和传输SSL证书。DER格式的SSL证书文件通常以.der或.cer为扩展名。
评论