Skip to content

Fix gRPC integration#3070

Merged
justsmth merged 1 commit intoaws:mainfrom
justsmth:fix-grpc
Mar 4, 2026
Merged

Fix gRPC integration#3070
justsmth merged 1 commit intoaws:mainfrom
justsmth:fix-grpc

Conversation

@justsmth
Copy link
Copy Markdown
Contributor

@justsmth justsmth commented Mar 4, 2026

Description of changes:

gRPC recently landed a TLS Private Key Offload feature (grpc/grpc#41606) that gates BoringSSL-specific code paths behind #ifdef OPENSSL_IS_BORINGSSL. AWS-LC defines OPENSSL_IS_AWSLC instead, so gRPC doesn't recognize it as BoringSSL-compatible. This causes all 11 TlsPrivateKeyOffloadTest tests to fail at setup time because grpc_tls_identity_pairs_add_pair_with_signer returns UnimplementedError.

Since AWS-LC is a BoringSSL fork and supports all the relevant APIs (e.g. SSL_PRIVATE_KEY_METHOD), we pass -DOPENSSL_IS_BORINGSSL=1 via CMAKE_C_FLAGS/CMAKE_CXX_FLAGS when building gRPC. This enables the BoringSSL code paths that are correct for AWS-LC, including private key offload, optimized session caching, and type macros.

Call-outs:

All OPENSSL_IS_BORINGSSL checks in gRPC are preprocessor-level guards inside source files — there's no CMake-level source file selection based on BoringSSL detection, so the CFLAGS approach is safe.

Testing:

The gRPC integration test itself validates the fix — the 11 TlsPrivateKeyOffloadTest tests that were failing should now pass.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.36%. Comparing base (37d8646) to head (031cd3f).
⚠️ Report is 27 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3070      +/-   ##
==========================================
- Coverage   78.37%   78.36%   -0.01%     
==========================================
  Files         689      689              
  Lines      121078   121078              
  Branches    16966    16965       -1     
==========================================
- Hits        94889    94884       -5     
- Misses      25294    25297       +3     
- Partials      895      897       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@justsmth justsmth merged commit 8a69708 into aws:main Mar 4, 2026
353 of 454 checks passed
WillChilds-Klein pushed a commit to WillChilds-Klein/aws-lc that referenced this pull request Mar 11, 2026
### Description of changes:
gRPC recently landed a TLS Private Key Offload feature (grpc/grpc#41606)
that gates BoringSSL-specific code paths behind `#ifdef
OPENSSL_IS_BORINGSSL`. AWS-LC defines `OPENSSL_IS_AWSLC` instead, so
gRPC doesn't recognize it as BoringSSL-compatible. This causes all 11
`TlsPrivateKeyOffloadTest` tests to fail at setup time because
`grpc_tls_identity_pairs_add_pair_with_signer` returns
`UnimplementedError`.

Since AWS-LC is a BoringSSL fork and supports all the relevant APIs
(e.g. `SSL_PRIVATE_KEY_METHOD`), we pass `-DOPENSSL_IS_BORINGSSL=1` via
`CMAKE_C_FLAGS`/`CMAKE_CXX_FLAGS` when building gRPC. This enables the
BoringSSL code paths that are correct for AWS-LC, including private key
offload, optimized session caching, and type macros.

### Call-outs:
All `OPENSSL_IS_BORINGSSL` checks in gRPC are preprocessor-level guards
inside source files — there's no CMake-level source file selection based
on BoringSSL detection, so the CFLAGS approach is safe.

### Testing:
The gRPC integration test itself validates the fix — the 11
`TlsPrivateKeyOffloadTest` tests that were failing should now pass.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.
nebeid pushed a commit to nebeid/aws-lc that referenced this pull request Mar 23, 2026
### Description of changes:
gRPC recently landed a TLS Private Key Offload feature (grpc/grpc#41606)
that gates BoringSSL-specific code paths behind `#ifdef
OPENSSL_IS_BORINGSSL`. AWS-LC defines `OPENSSL_IS_AWSLC` instead, so
gRPC doesn't recognize it as BoringSSL-compatible. This causes all 11
`TlsPrivateKeyOffloadTest` tests to fail at setup time because
`grpc_tls_identity_pairs_add_pair_with_signer` returns
`UnimplementedError`.

Since AWS-LC is a BoringSSL fork and supports all the relevant APIs
(e.g. `SSL_PRIVATE_KEY_METHOD`), we pass `-DOPENSSL_IS_BORINGSSL=1` via
`CMAKE_C_FLAGS`/`CMAKE_CXX_FLAGS` when building gRPC. This enables the
BoringSSL code paths that are correct for AWS-LC, including private key
offload, optimized session caching, and type macros.

### Call-outs:
All `OPENSSL_IS_BORINGSSL` checks in gRPC are preprocessor-level guards
inside source files — there's no CMake-level source file selection based
on BoringSSL detection, so the CFLAGS approach is safe.

### Testing:
The gRPC integration test itself validates the fix — the 11
`TlsPrivateKeyOffloadTest` tests that were failing should now pass.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.
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.

5 participants