python-trio / purerpc

Native, async Python gRPC client and server implementation supporting asyncio, uvloop, and trio
Apache License 2.0
217 stars 15 forks source link

add TLS support #23

Closed banana-string-theory closed 4 years ago

banana-string-theory commented 4 years ago

Usage example:

    import ssl

    context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
    context.load_verify_locations(cafile=cacerts)
    context.set_alpn_protocols(['h2'])
    return purerpc.secure_channel(host, port, context)
standy66 commented 4 years ago

Hi! Thanks for your contribution. Your last commit introduced a build error, can you replace ! with not in grpc_socket.py? Also consider adding TLS support for server.

banana-string-theory commented 4 years ago

replace ! with not in grpc_socket.py

That was embarrassing. Done.

adding TLS support for server

Done.

standy66 commented 4 years ago

Please take a loot at the latest Travis CI report, the build failed on your last commit.

xgamtx commented 4 years ago

You should add import secure channel in init.py file https://github.com/standy66/purerpc/blob/master/src/purerpc/__init__.py#L6

seanaye commented 4 years ago

Is there an update on this?

banana-string-theory commented 4 years ago

Is there an update on this?

What update are you looking for beyond this?

seanaye commented 4 years ago

@banana-string-theory I was wondering why it hasn't been merged. For now I've cloned your fork, thanks.