gpt4 book ai didi

python - 如何修复 SSL 问题 SSL_CTX_use_certificate : ca md too weak on Python Zeep

转载 作者:行者123 更新时间:2023-12-02 12:53:12 27 4
gpt4 key购买 nike

我的代码之前一直可以工作,直到每当我向 Frontierlink Web 服务发出 SOAP 请求时都会收到此错误。

File "/home/venv/lib/python2.7/site-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
raise exception_type(errors)

OpenSSL.SSL.Error: [('SSL 例程', 'SSL_CTX_use_certificate', 'ca md 太弱')]

我是否需要重新生成用于连接的 pem 文件,或者问题出在我用于生成 pem 文件的 .p12 文件上?

如果您需要有关我的问题的更多信息,请告诉我。

注释:

我使用的 OpenSSL 版本是:OpenSSL 1.0.2k-fips

提前谢谢您!

最佳答案

您收到的错误消息表明您使用的证书是使用 md5 哈希签名的。

OpenSSL 1.1.0 引入了一项名为 security level 的新功能.
1 的默认设置将导致以下情况(我强调):

The security level corresponds to a minimum of 80 bits of security. Any parameters offering below 80 bits of security are excluded. As a result RSA, DSA and DH keys shorter than 1024 bits and ECC keys shorter than 160 bits are prohibited. All export cipher suites are prohibited since they all offer less than 80 bits of security. SSL version 2 is prohibited. Any cipher suite using MD5 for the MAC is also prohibited.

您可能需要重新生成证书并使用更强的哈希进行签名,例如 SHA1

OpenSSL Users 的论坛帖子来看现在可能会出现此问题,因为您尝试连接的服务已升级其 OpenSSL 版本,并且现在拒绝您的证书。

关于python - 如何修复 SSL 问题 SSL_CTX_use_certificate : ca md too weak on Python Zeep,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52218876/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com