httpx icon indicating copy to clipboard operation
httpx copied to clipboard

[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] - httpx==0.28.1

Open neonima1995 opened this issue 11 months ago • 4 comments

[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1000) p.s. I downgrade the version to 0.27.2

neonima1995 avatar Jan 15 '25 07:01 neonima1995

Also impacted by this, calling

httpx.AsyncClient(verify=False, http2=True)

petsneakers avatar Feb 13 '25 23:02 petsneakers

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.

Cycloctane avatar Feb 16 '25 06:02 Cycloctane

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:

petsneakers avatar Feb 16 '25 18:02 petsneakers

Same issue even without http2

@petsneakers workaround works, but verify=False does not

bellini666 avatar May 05 '25 12:05 bellini666