ssl - Apache 证书目录中的 `x_budle-g2-g1.crt` 是什么?

标签 ssl https certificate

我申请了Goddady的Apache证书,目录里面有:

enter image description here

我查了一下,x.crt内容和x.pem一样(只有一个CERTIFICATE), >x_bundle-g2-g1.crt 里面有 3 个 CERTIFICATE

为什么x.crtx.pem需要相同的内容?
x_bundle-g2-g1.crt的作用是什么,里面有3个CERTIFICATE,是否指的是x_bundleg2g1?

最佳答案

我猜 X.pem是您的服务器证书,由 GoDaddy 安全证书颁发机构 - G2 颁发

然后 x_bundle-g2-g1.crt是直到根 GoDaddy 证书的信任链。

查看x_bundle-g2-g1.crt的内容使用 openssl 命令:

openssl crl2pkcs7 -nocrl -certfile x_bundle-g2-g1.crt | openssl pkcs7 -print_certs -text -noout | grep -E 'Subject:|Issuer:'

这个 hack 是打印 PEM 文件中的所有证书

我希望输出是这样的:

        Issuer: C=US, ST=Arizona, L=Scottsdale, O=GoDaddy.com, Inc., CN=Go Daddy Root Certificate Authority - G2
        Subject: C=US, ST=Arizona, L=Scottsdale, O=GoDaddy.com, Inc., OU=http://certs.godaddy.com/repository/, CN=Go Daddy Secure Certificate Authority - G2
        Issuer: C=US, O=The Go Daddy Group, Inc., OU=Go Daddy Class 2 Certification Authority
        Subject: C=US, ST=Arizona, L=Scottsdale, O=GoDaddy.com, Inc., CN=Go Daddy Root Certificate Authority - G2
        Issuer: C=US, O=The Go Daddy Group, Inc., OU=Go Daddy Class 2 Certification Authority
        Subject: C=US, O=The Go Daddy Group, Inc., OU=Go Daddy Class 2 Certification Authority

也就是说,

  1. Go Daddy Secure Certificate Authority - G2Go Daddy Root Certificate Authority - G2 签署
  2. Go Daddy Root Certificate Authority - G2
  3. 自签名Go Daddy Class 2 Certification Authority

检查您的网络服务器向客户端提供了哪些证书: openssl s_client -showcerts -servername YOUR_SERVER -connect YOUR_SERVER:443 </dev/null

我敢打赌它提供了完整的链 -

  • 来自 X.pem 的服务器证书
  • Go Daddy 安全证书颁发机构 - G2
  • Go Daddy 根证书颁发机构 - G2

这是对丢失中间 GoDaddy 证书的终端系统(例如兄弟)的预防措施。

关于ssl - Apache 证书目录中的 `x_budle-g2-g1.crt` 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60982922/

相关文章:

wordpress - 使用 Traefik 将 SSL 转换为 Wordpress

javax.net.ssl.SSLHandshakeException : Remote host closed connection during handshake during web service communicaiton

python - 使用 Anaconda Python 在 Windows 10 Git Bash 上导入错误 import _ssl

ssl - Cnames 和 ssl - 如果两个名称都有 ssl 好吗?

certificate - 服务器证书验证失败。 CAfile :/etc/ssl/certs/ca-certificates. crt CRLfile:无

php - 通过 SSL 下载损坏的 IE8 文件

java - 如何使用 wireshark 解密服务以服务 SSL 流量?

authentication - Powershell BitsTransfer https基本身份验证语法

git - 如何使用自签名证书将 Jenkins slave 连接到 Git 服务器?

java - 丢失代码签名证书别名