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

TLS support for OkHttp when not running on Android

Open ejona86 opened this issue 11 years ago • 10 comments

OkHttp transport current accepts a SSLSocketFactory which when on Android is provided by the OS. For testing when not running on Android we don't have a way to do TLS/ALPN. We need one.

ejona86 avatar Jan 21 '15 00:01 ejona86

@JakeWharton, what do you suggest on this one? I've not looked into the OkHttp code to see if we can reuse some of the Platform/TLS stuff to work on and off Android. Right now getting TLS on Android for gRPC is more painful than we would like, so leveraging more of OkHttp in general would likely be appreciated.

@madongfly, have you looked at reusing parts of OkHttp at all?

ejona86 avatar Feb 04 '15 18:02 ejona86

I don't know enough about this mechanism to provide any useful recommendations or guidance. @swankjesse would.

JakeWharton avatar Feb 04 '15 20:02 JakeWharton

We've got TLS working, including ALPN, and you can see it by running our test suite. You'll need the Jetty-ALPN extension which is configured by Maven.

swankjesse avatar Feb 05 '15 23:02 swankjesse

@ejona86, no, I haven't. Feel free to assign it to me.

madongfly avatar Feb 06 '15 06:02 madongfly

Not required for 0.5.0, but would be nice.

ejona86 avatar Mar 11 '15 17:03 ejona86

@madongfly, any updates on using TLS outside of Android with OkHttp?

ejona86 avatar Mar 24 '15 19:03 ejona86

I think @zsurocking picked up my cl and worked on it when I was on vacation, rocking, could you comment on it?

madongfly avatar Mar 25 '15 01:03 madongfly

Reopen because after 11d0094e04ec884fb7e2a0670409aff5870b0a53 upgraded Netty to 4.1, the Http2 protocol became to "h2" while OkHttp 2.0 still using "h2-16"

madongfly avatar Apr 08 '15 06:04 madongfly

Use OkHttp 2.3? It uses h2.

swankjesse avatar Apr 08 '15 11:04 swankjesse

@swankjesse yeah, we will upgrade it to 2.3.

madongfly avatar Apr 08 '15 12:04 madongfly