Skip to content

Commit cc9fab5

Browse files
committed
ROX-33133: Remove hardcoded key-exchange in gRPC
1 parent 38c0ab7 commit cc9fab5

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

builder/install/40-grpc.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ export CXXFLAGS="-Wno-error=class-memaccess -Wno-ignored-qualifiers -Wno-stringo
77
cd third_party/grpc
88

99
cp NOTICE.txt "${LICENSE_DIR}/grpc-${GRPC_REVISION}"
10+
11+
# ROX-33133: Remove hardcoded P-256 curve from gRPC (OpenSSL 3.x only) to allow
12+
# OpenSSL to use system crypto-policies defaults, enabling post-quantum key
13+
# exchange (ML-KEM). See: https://github.com/grpc/grpc/issues/23083
14+
patch -p1 < ../../builder/install/grpc-pq-curves.patch
15+
1016
mkdir -p cmake/build
1117
cd cmake/build
1218
cmake \
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--- a/src/core/tsi/ssl_transport_security.cc
2+
+++ b/src/core/tsi/ssl_transport_security.cc
3+
@@ -819,12 +819,7 @@ static tsi_result populate_ssl_context(
4+
}
5+
SSL_CTX_set_options(context, SSL_OP_SINGLE_ECDH_USE);
6+
EC_KEY_free(ecdh);
7+
-#else
8+
- if (!SSL_CTX_set1_groups(context, kSslEcCurveNames, 1)) {
9+
- LOG(ERROR) << "Could not set ephemeral ECDH key.";
10+
- return TSI_INTERNAL_ERROR;
11+
- }
12+
- SSL_CTX_set_options(context, SSL_OP_SINGLE_ECDH_USE);
13+
#endif
14+
}
15+
return TSI_OK;

0 commit comments

Comments
 (0)