From 715533c90c1cd06ea96d08fe3039b5a849d22453 Mon Sep 17 00:00:00 2001 From: Gregory Cooke Date: Wed, 10 Jan 2024 21:03:52 +0000 Subject: [PATCH] Openssl 1.1.1 instead of just 1.1 --- src/core/tsi/ssl_transport_security.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index ccc85ae2a3f..4f3919319c1 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -2072,9 +2072,11 @@ tsi_result tsi_create_ssl_client_handshaker_factory_with_options( #if OPENSSL_VERSION_NUMBER >= 0x10100000 ssl_context = SSL_CTX_new(TLS_method()); - SSL_CTX_set_options(ssl_context, SSL_OP_NO_RENEGOTIATION); #else ssl_context = SSL_CTX_new(TLSv1_2_method()); +#endif +#if OPENSSL_VERSION_NUMBER >= 0x10101000 + SSL_CTX_set_options(ssl_context, SSL_OP_NO_RENEGOTIATION); #endif if (ssl_context == nullptr) { grpc_core::LogSslErrorStack(); @@ -2288,9 +2290,11 @@ tsi_result tsi_create_ssl_server_handshaker_factory_with_options( do { #if OPENSSL_VERSION_NUMBER >= 0x10100000 impl->ssl_contexts[i] = SSL_CTX_new(TLS_method()); - SSL_CTX_set_options(impl->ssl_contexts[i], SSL_OP_NO_RENEGOTIATION); #else impl->ssl_contexts[i] = SSL_CTX_new(TLSv1_2_method()); +#endif +#if OPENSSL_VERSION_NUMBER >= 0x10101000 + SSL_CTX_set_options(impl->ssl_contexts[i], SSL_OP_NO_RENEGOTIATION); #endif if (impl->ssl_contexts[i] == nullptr) { grpc_core::LogSslErrorStack();