From 5168a204ddbcc2c61313298952c63079bebc2943 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sun, 27 Apr 2025 10:31:24 -0400 Subject: [PATCH] Fix compilation on Libressl --- src/lib/tls/tortls_openssl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/tls/tortls_openssl.c b/src/lib/tls/tortls_openssl.c index a7613d82f3..05a8bfc0a4 100644 --- a/src/lib/tls/tortls_openssl.c +++ b/src/lib/tls/tortls_openssl.c @@ -568,7 +568,12 @@ tor_tls_context_new(crypto_pk_t *identity, unsigned int key_lifetime, SSL_CTX_set_options(result->ctx, SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION); #endif +#ifdef SSL_OP_NO_RENEGOTIATION SSL_CTX_set_options(result->ctx, SSL_OP_NO_RENEGOTIATION); +#endif +#ifdef SSL_OP_NO_CLIENT_RENEGOTIATION + SSL_CTX_set_options(result->ctx, SSL_OP_NO_CLIENT_RENEGOTIATION); +#endif /* Don't actually allow compression; it uses RAM and time, it makes TLS * vulnerable to CRIME-style attacks, and most of the data we transmit over -- 2.47.2