-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ssl.CertificateError: hostname doesn't match #141
Comments
Anyone could shed some light on this issue? |
hi @freis. It seems to me like the To avoid issues like this in the future, it would probably be nice to have some sanity checking on the **kwargs, so users do not pass in invalid keys. |
Oh I was under the impression that this was implemented to bypass this issues that I'm getting. |
So I found the way to do this: import asks
import trio
import ssl
ssl_ctx = ssl.create_default_context()
ssl_ctx.check_hostname = False
ssl_ctx.verify_mode = ssl.CERT_NONE
async def example():
s = asks.Session(ssl_context=ssl_ctx)
r = await s.get(url)
print(r.url)
trio.run(example) However it would be nice to have the ability to do something like request with the keyword verify=False to skip this setup I would say. |
Hi all,
I'm using asks==2.3.6 and getting "ssl.CertificateError: hostname doesn't match".
I've used the session.get(url, verify=False), still no luck, am I missing something or is this a bug?
To note that I'm using ip:port to make the get.
The text was updated successfully, but these errors were encountered: