grpc-swift icon indicating copy to clipboard operation
grpc-swift copied to clipboard

Specify TLS Provider for Swift gRPC Client Connection

Open WiseNN opened this issue 2 years ago • 3 comments

What are you trying to achieve?

Is it possible to use Swift gRPC with a custom TLS provider? (like openSSL v3?). The objective is to use a custom TLS provider that will work with the Swift gRPC framework. Has anyone done this before.

What have you tried so far?

I found a SO post that looks like someone may have been able to do this in C++.

I am looking to see if something similar is offered in this framework. Not sure if I post this question here or the Swift NIO SSL repository.

WiseNN avatar Feb 03 '23 17:02 WiseNN

Currently this isn't supported, but it's certainly possible. So long as the TLS backend exposes a NIO ChannelHandler interface this should be workable.

Lukasa avatar Feb 03 '23 17:02 Lukasa

Got it. Definitely appreciate the response @Lukasa . Do you mind providing an example of what that would look like?

WiseNN avatar Feb 03 '23 19:02 WiseNN

In general it would look quite a lot like what swift-nio-ssl has already, rewritten for the OpenSSL backend. It should be easy enough to literally fork that code and rewrite the calls to fit OpenSSL 3.

Lukasa avatar Feb 06 '23 10:02 Lukasa