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

Implement Connection.startssl(ssl_context) coroutine #2028

Closed
asvetlov opened this issue Jun 27, 2017 · 5 comments
Closed

Implement Connection.startssl(ssl_context) coroutine #2028

asvetlov opened this issue Jun 27, 2017 · 5 comments
Assignees
Labels

Comments

@asvetlov
Copy link
Member

Prerequirement for #2019

The change makes sense itself -- it simplifies upgrade SSL proxy connection and makes code cleaner.

@asvetlov asvetlov self-assigned this Jun 27, 2017
@fafhrd91
Copy link
Member

fafhrd91 commented Jun 27, 2017

do you expect anyone would create proxy with aiohttp?

@asvetlov
Copy link
Member Author

asvetlov commented Jun 27, 2017

No, I'm thinking about aiohttp internals refactoring only.

Now TCPConnector for SSL upgrade does the following:

  1. Create a Connection for sending CONNECT request without registering it in connection pool.
  2. Clean up Connection._transport (BTW not used anymore attribute) and Connection._protocol
  3. Negotiate TLS connection by calling loop.create_connection with duplicated socket.
  4. Close transport
  5. Return a new protocol given from TLS

It works but looks cumbersome.
I recall request for SSL upgrade for UNIX sockets. I don't want to copy all this code to UNIX Connector.

Let me experiment with implementation and make a PR.
If I've found the idea is dead -- I reject it.
But now moving ssl upgrade from connector layer to ClientSession._request makes sense in my mind.

@fafhrd91
Copy link
Member

initially I thought about different use case. now it makes more sense.

@asvetlov
Copy link
Member Author

asvetlov commented Nov 1, 2017

Let's close the issue, it should be created on new basis

@asvetlov asvetlov closed this as completed Nov 1, 2017
@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants