Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

Wrapping an existing transport in SSL #492

Open
@kyuupichan

Description

@kyuupichan

I hope a question is acceptable here; I've googled and not found an answer.

I want to connect to a remote Tor server listening on an SSL socket with asyncio.

I have created an asyncio SocksProtocol to handle the negotation with the local tor proxy, and this works fine to establish a connection with the remote Tor server via loop.create_connection. However that leaves me with a transport, protocol pair, and I need to wrap the transport in SSL for the app to communicate properly with the remote server.

I don't see a clean way to do this. One thing I tried was another loop.connection passing the transport's socket and an ssl arg, but that didn't work as it ends up triggering checks in asyncio because 2 transports are using the same base socket. Am I missing something obvious?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions