httpx
httpx copied to clipboard
[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] - httpx==0.28.1
[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1000)
p.s. I downgrade the version to 0.27.2
Also impacted by this, calling
httpx.AsyncClient(verify=False, http2=True)
There is a breaking change in ssl config. httpx 0.27.2 uses a custom cipher suites config from urllib3 1.x, while httpx 0.28.0 is using default ciphers from ssl.create_default_context(). Some cipher suites are not accepted by default anymore.
Thanks, that did it:
ssl_context = ssl.create_default_context()
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE
ssl_context.set_ciphers('DEFAULT@SECLEVEL=2')
async with httpx.AsyncClient(verify=ssl_context, http2=True) as client:
Same issue even without http2
@petsneakers workaround works, but verify=False does not