From 42ba87d9648c5aa6c15d53175c477ce697932188 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 25 May 2021 07:38:31 -0400 Subject: Remove the function `tor_tls_assert_renegotiation_unblocked`. It was used nowhere outside its own unit tests, and it was causing compilation issues with recent OpenSSL 3.0.0 alphas. Closes ticket 40399. --- src/lib/tls/tortls.h | 1 - src/lib/tls/tortls_nss.c | 7 ------- src/lib/tls/tortls_openssl.c | 13 ------------- 3 files changed, 21 deletions(-) (limited to 'src/lib') diff --git a/src/lib/tls/tortls.h b/src/lib/tls/tortls.h index 8efc7a1c98..9398318035 100644 --- a/src/lib/tls/tortls.h +++ b/src/lib/tls/tortls.h @@ -107,7 +107,6 @@ int tor_tls_handshake(tor_tls_t *tls); int tor_tls_finish_handshake(tor_tls_t *tls); void tor_tls_unblock_renegotiation(tor_tls_t *tls); void tor_tls_block_renegotiation(tor_tls_t *tls); -void tor_tls_assert_renegotiation_unblocked(tor_tls_t *tls); int tor_tls_get_pending_bytes(tor_tls_t *tls); size_t tor_tls_get_forced_write_size(tor_tls_t *tls); diff --git a/src/lib/tls/tortls_nss.c b/src/lib/tls/tortls_nss.c index 6f6c47674e..b7f3513150 100644 --- a/src/lib/tls/tortls_nss.c +++ b/src/lib/tls/tortls_nss.c @@ -633,13 +633,6 @@ tor_tls_block_renegotiation(tor_tls_t *tls) /* We don't support renegotiation with NSS. */ } -void -tor_tls_assert_renegotiation_unblocked(tor_tls_t *tls) -{ - tor_assert(tls); - /* We don't support renegotiation with NSS. */ -} - int tor_tls_get_pending_bytes(tor_tls_t *tls) { diff --git a/src/lib/tls/tortls_openssl.c b/src/lib/tls/tortls_openssl.c index 80b0df301f..c5031a00aa 100644 --- a/src/lib/tls/tortls_openssl.c +++ b/src/lib/tls/tortls_openssl.c @@ -1168,19 +1168,6 @@ tor_tls_block_renegotiation(tor_tls_t *tls) #endif } -/** Assert that the flags that allow legacy renegotiation are still set */ -void -tor_tls_assert_renegotiation_unblocked(tor_tls_t *tls) -{ -#if defined(SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION) && \ - SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION != 0 - long options = SSL_get_options(tls->ssl); - tor_assert(0 != (options & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION)); -#else - (void) tls; -#endif /* defined(SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION) && ... */ -} - /** * Tell the TLS library that the underlying socket for tls has been * closed, and the library should not attempt to free that socket itself. -- cgit v1.2.3-54-g00ecf