Skip to content

Apple's BoringSSL integration sets SSL_OP_NO_TLSv1_3 whenever sec_protocol_options_add_pre_shared_key is configured with a minimum TLS version below TLS 1.3, preventing a single static sec_protocol_options_t from negotiating both TLS 1.3 mTLS and legacy TLS 1.2 PSK (0x00A8). - #4738

Draft
copybara-service[bot] wants to merge 1 commit into
mainfrom
cl/1004285304

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Apple's BoringSSL integration sets SSL_OP_NO_TLSv1_3 whenever sec_protocol_options_add_pre_shared_key is configured with a minimum TLS version below TLS 1.3, preventing a single static sec_protocol_options_t from negotiating both TLS 1.3 mTLS and legacy TLS 1.2 PSK (0x00A8).

On the server role in GNCNWParameters, prepend a custom nw_framer_t (com.google.nearby.ServerTLSSelector) that inspects incoming ClientHello cipher suites via GNCClientHelloOffersTLS13 and dynamically prepends either GNCConfigureTLS13MutualAuthOptions or GNCConfigureTLS12PSKOptions before delivering the buffered ClientHello to the TLS layer.

On the client role in GNCNWFramework, extract connectToEndpoint:withParameters:cancelSource:queue:error: and retry once with GNCBuildTLS12PSKParameters when an outbound connection with PSK credentials fails under TLS 1.3 mTLS without cancellation via cancelSource.

@copybara-service
copybara-service Bot force-pushed the cl/1004285304 branch 4 times, most recently from 4987502 to fbd8c8d Compare October 28, 2026 08:11
…protocol_options_add_pre_shared_key` is configured with a minimum TLS version below TLS 1.3, preventing a single static `sec_protocol_options_t` from negotiating both TLS 1.3 mTLS and legacy TLS 1.2 PSK (`0x00A8`).

On the server role in `GNCNWParameters`, prepend a custom `nw_framer_t` (`com.google.nearby.ServerTLSSelector`) that inspects incoming `ClientHello` cipher suites via `GNCClientHelloOffersTLS13` and dynamically prepends either `GNCConfigureTLS13MutualAuthOptions` or `GNCConfigureTLS12PSKOptions` before delivering the buffered `ClientHello` to the TLS layer.

On the client role in `GNCNWFramework`, extract `connectToEndpoint:withParameters:cancelSource:queue:error:` and retry once with `GNCBuildTLS12PSKParameters` when an outbound connection with PSK credentials fails under TLS 1.3 mTLS without cancellation via `cancelSource`.

PiperOrigin-RevId: 1004285304
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.

1 participant