英文:
Pyhton requests.post raise error SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)')
问题
我尝试了这个解决方案,但它没有起作用。
我正在以以下形式进行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)')
。
我正在使用Python 3.10,其中包括:
- pyOpenSSL 23.2.0
- requests 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握手已读取1010字节并写入611字节
验证错误:自签名证书
---
新的,TLSv1.2,密码是AES256-GCM-SHA384
服务器公钥为2048位
支持安全重新协商
压缩:无
扩展:无
没有ALPN协商
SSL会话:
协议 : TLSv1.2
密码 : AES256-GCM-SHA384
在Python 3.9中一切正常。
英文:
I've tried this solution but it didn't work
I'm doing a POST requests in the form of
res = requests.post(
url, data=json.dumps(data), headers=self.headers, verify=False
)
But I'm getting SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)')
I'm using pyhton 3.10 with
- pyOpenSSL 23.2.0
- requests 2.31.0
I've tried
>>> import ssl
>>> print(ssl.OPENSSL_VERSION)
OpenSSL 1.1.1n 15 Mar 2022
Doing 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
Everything works in Python 3.9
答案1
得分: 0
有一个问题出现在该库中,已经修复。
https://github.com/JurajNyiri/pytapo/issues/65#issuecomment-1656470805
英文:
There was an issue with the library that has been fixed
https://github.com/JurajNyiri/pytapo/issues/65#issuecomment-1656470805
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论