TencentCloud / tencentcloud-sdk-python

Tencent Cloud API 3.0 SDK for Python
Apache License 2.0
613 stars 251 forks source link

访问 sms.tencentclound.com 时报错: SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] #140

Closed swarmfree closed 1 year ago

swarmfree commented 2 years ago

现在的解决方案说的是 MacOS + Python 3.6 的问题。我的环境是 Centos 7 + Python 3.7,所以解决方案不适用。后经过与腾讯支持工程师咨询,把 Digicert Global Root 和 Digicert Secure Server 两张 CA 根证书 (用于签发 TencentCloud 证书的 CA) 导入到操作系统的 CA store,就可以解决问题了。

希望能出一篇讲清楚 root cause,和在不同的操作系统+SDK 组合之下,如何解决 CERTIFICATE_VERIFY_FAILED 的文章。

zqfan commented 1 year ago

新版本SDK使用了certifi库来统一管理证书,按道理应该不存在这个问题了。 通常python环境出证书问题还是跟操作系统环境特殊性有关,有时候自行编译python或者openssl时参数配置不正确也会导致证书错误。