From: Joshua Rogers Date: Thu, 16 Oct 2025 07:10:33 +0000 (+0800) Subject: Remove dead RENEG code X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=095aab1dc2b049f99a2fa265aa9912e2da91e728;p=thirdparty%2Fopenssl.git Remove dead RENEG code Signed-off-by: Joshua Rogers Reviewed-by: Saša Nedvědický Reviewed-by: Tomas Mraz Reviewed-by: Frederik Wedel-Heinen Reviewed-by: Todd Short (Merged from https://github.com/openssl/openssl/pull/28914) --- diff --git a/apps/s_server.c b/apps/s_server.c index 431c702e7e8..82590f9adbb 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -3001,13 +3001,6 @@ static int sv_body(int s, int stype, int prot, unsigned char *context) l = k = 0; for (;;) { /* should do a select for the write */ -#ifdef RENEG - static int count = 0; - if (++count == 100) { - count = 0; - SSL_renegotiate(con); - } -#endif k = SSL_write(con, &(buf[l]), (unsigned int)i); #ifndef OPENSSL_NO_SRP while (SSL_get_error(con, k) == SSL_ERROR_WANT_X509_LOOKUP) { @@ -3388,9 +3381,6 @@ static int www_body(int s, int stype, int prot, unsigned char *context) SSL *con; const SSL_CIPHER *c; BIO *io, *ssl_bio, *sbio, *edio; -#ifdef RENEG - int total_bytes = 0; -#endif int width; #ifndef OPENSSL_NO_KTLS int use_sendfile_for_req = use_sendfile; @@ -3808,22 +3798,7 @@ static int www_body(int s, int stype, int prot, unsigned char *context) if (i <= 0) break; -#ifdef RENEG - total_bytes += i; - BIO_printf(bio_err, "%d\n", i); - if (total_bytes > 3 * 1024) { - total_bytes = 0; - BIO_printf(bio_err, "RENEGOTIATE\n"); - SSL_renegotiate(con); - } -#endif - for (j = 0; j < i;) { -#ifdef RENEG - static count = 0; - if (++count == 13) - SSL_renegotiate(con); -#endif k = BIO_write(io, &(buf[j]), i - j); if (k <= 0) { if (!BIO_should_retry(io)