Skip to content

okhttp: enable TLS 1.3 on Android, retain TLS 1.2-only for desktop JVM#12763

Open
myksyr-tdy wants to merge 1 commit intogrpc:masterfrom
myksyr-tdy:bugfix/tls1v3
Open

okhttp: enable TLS 1.3 on Android, retain TLS 1.2-only for desktop JVM#12763
myksyr-tdy wants to merge 1 commit intogrpc:masterfrom
myksyr-tdy:bugfix/tls1v3

Conversation

@myksyr-tdy
Copy link
Copy Markdown

The ConnectionSpec used by OkHttpChannelBuilder had TLS 1.3 explicitly disabled since Dec 2020 due to a Conscrypt/SunJSSE incompatibility. However, this incompatibility does not affect Android. The previous code applied the TLS 1.2-only restriction unconditionally to all platforms.

Regulatory impact: TLS 1.2 is classified as a legacy mechanism in ENISA Agreed Cryptographic Mechanisms v2.0 (April 2025), with TLS 1.3 listed as the recommended protocol. This limitation has been forcing all downstream components using grpc-okhttp on Android to operate with a legacy protocol, creating compliance friction with the EU Radio Equipment Directive (RED) and EU Cyber Resilience Act (CRA) certification requirements.

Fixes: #7431 (Android only)
Fixes: #7765 (Android only)

The ConnectionSpec used by OkHttpChannelBuilder had TLS 1.3 explicitly
disabled since Dec 2020 due to a Conscrypt/SunJSSE incompatibility.
However, this incompatibility does not affect Android. The previous
code applied the TLS 1.2-only restriction unconditionally to all platforms.

Regulatory impact: TLS 1.2 is classified as a legacy mechanism in ENISA
Agreed Cryptographic Mechanisms v2.0 (April 2025), with TLS 1.3 listed as
the recommended protocol. This limitation has been forcing all downstream
components using grpc-okhttp on Android to operate with a legacy protocol,
creating compliance friction with the EU Radio Equipment Directive (RED) and
EU Cyber Resilience Act (CRA) certification requirements.

Fixes: grpc#7431 (Android only)
Fixes: grpc#7765 (Android only)
@linux-foundation-easycla
Copy link
Copy Markdown

CLA Missing ID CLA Not Signed


ServerCredentials(SSLSocketFactory factory) {
this(factory, OkHttpChannelBuilder.INTERNAL_DEFAULT_CONNECTION_SPEC);
this(factory, OkHttpChannelBuilder.INTERNAL_LEGACY_CONNECTION_SPEC);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldnt it be OkHttpChannelBuilder.initialConnectionSpec() then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate TLSv1.3 with Conscrypt Support TLS 1.3 for okhttp transport

2 participants