Pyhton requests.post引发错误SSLError(1,'[SSL:SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3警报握手失败(_ssl.c:997)')

axr492tv  于 2023-08-06  发布在  其他
关注(0)|答案(1)|浏览(157)

我尝试了this解决方案,但它没有工作
我正在做一个POST请求,格式为

res = requests.post(
            url, data=json.dumps(data), headers=self.headers, verify=False
        )

字符串
但我得到了SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)')
我用的是pyhton3.10

  • PyOpenSSL 23.2.0
  • 请求2.31.0

我试过了

>>> import ssl
>>> print(ssl.OPENSSL_VERSION)
OpenSSL 1.1.1n  15 Mar 2022


openssl s_client -connect 10.10.96.28:443

SSL handshake has read 1010 bytes and written 611 bytes
Verification error: self signed certificate
---
New, TLSv1.2, Cipher is AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : AES256-GCM-SHA384


在Python 3.9中一切都正常

e4eetjau

e4eetjau1#

库有一个问题已修复
https://github.com/JurajNyiri/pytapo/issues/65#issuecomment-1656470805

相关问题