Skip to content
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

Add Python 3 aiohttp TLS client #252

Merged
merged 1 commit into from
Aug 23, 2016
Merged

Add Python 3 aiohttp TLS client #252

merged 1 commit into from
Aug 23, 2016

Conversation

jwilk
Copy link
Contributor

@jwilk jwilk commented Aug 22, 2016

The default license is OK for me.

@aleksiklasila aleksiklasila merged commit 4f4ffc8 into ouspg:master Aug 23, 2016
@ppietikainen
Copy link
Member

Thanks for the submission!

Running on Fedora 24 (Python 3.5.1 + whatever aiohttp you get with dnf and the latest one from pip) I get:

[pp@the python3-aiohttp]$ python3 run.py wrong.host.badssl.com 443
Exception in callback None handle: Traceback (most recent call last): File "/usr/lib64/python3.5/asyncio/events.py", line 125, in _run self._callback(_self._args) File "/usr/lib64/python3.5/asyncio/selector_events.py", line 671, in _read_ready self._protocol.data_received(data) File "/usr/lib64/python3.5/asyncio/sslproto.py", line 492, in data_received ssldata, appdata = self._sslpipe.feed_ssldata(data) File "/usr/lib64/python3.5/asyncio/sslproto.py", line 200, in feed_ssldata
self.sslobj.do_handshake()
File "/usr/lib64/python3.5/ssl.py", line 633, in do_handshake match_hostname(self.getpeercert(), self.server_hostname)
File "/usr/lib64/python3.5/ssl.py", line 296, in match_hostname % (hostname, ', '.join(map(repr, dnsnames))))
ssl.CertificateError: hostname 'wrong.host.badssl.com' doesn't match either of '
.badssl.com', 'badssl.com'
REJECT

which is ok vs. the stub spec, but could be a bit cleaner? E.g. just the last line of the traceback.

@jwilk jwilk deleted the python3-aiohttp branch August 23, 2016 12:45
@jwilk
Copy link
Contributor Author

jwilk commented Aug 24, 2016

@ppietikainen, I stumbled upon this too, but I don't quite understand what's going on.
My code doesn't do anything to print this traceback. It's asyncio that logs it for some reason.
I suspect it's a bug in aiohttp or asyncio.

@Mamietti Mamietti added this to the 0.4.0 milestone Aug 25, 2016
@jwilk
Copy link
Contributor Author

jwilk commented Aug 26, 2016

According to the aiohttp maintainer, this is asyncio bug:
python/asyncio#404

@jdbertron
Copy link

Why are these issues closed. They're not resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants