为什么 `apt update` 说证书不受信任,而 curl 说 `SSL 证书验证成功`

为什么 `apt update` 说证书不受信任,而 curl 说 `SSL 证书验证成功`

我正在尝试将 docker 添加到我的 Debian 11 bullseye 安装中。到目前为止,我已经运行了 -

apt clean
apt update
update-ca-certificates
apt-get install -y ca-certificates
apt reinstall ca-certificates

但当我跑步时,apt update我不断

Err:4 https://download.docker.com/linux/debian bullseye InRelease              
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 2600:9000:2113:5000:3:db06:4200:93a1 443]

但是,当我使用 curl 检查上述 repo 时: curl -vI 'https://download.docker.com' 输出表明

* Server certificate:
*  subject: CN=*.docker.com
*  start date: Feb 22 00:00:00 2023 GMT
*  expire date: Nov 30 23:59:59 2023 GMT
*  subjectAltName: host "download.docker.com" matched cert's "*.docker.com"
*  issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M02
*  SSL certificate verify ok

命令基于什么理由apt认为网站证书不可信,而实际上却curl认为可以信任?

相关内容