You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SSL IP address mismatch error via ssh tunnel (But curl works) #2513
Hi. I have a client-side *.pem to access remote server. Because of the server IP whitelist i use ssh port proxy via trusted host. So the target url on my local machine is https://127.0.0.1:someport/endpoint
I init AsyncClient with verify=httpx.create_ssl_context(cert="certfile.pem", verify=False) to disable all cert verifications, but i still get this error: httpx.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: IP address mismatch, certificate is not valid for '127.0.0.1'. (_ssl.c:1131)
the strange part is that curl works just fine in exactly the same environment. Curl command:
Yes, i've passed a custom transport to AsyncClient, which overrides client level verify arg (should provide ssl context directly to the transport instance). Maybe a kind of a warning could help but its ok.
Activity
lovelydinosaur commentedon Dec 26, 2022
Were you missing something obvious?
funkindy commentedon Dec 26, 2022
Yes, i've passed a custom transport to AsyncClient, which overrides client level verify arg (should provide ssl context directly to the transport instance). Maybe a kind of a warning could help but its ok.