From: Aki Tuomi Date: Wed, 27 Nov 2024 11:23:55 +0000 (+0200) Subject: lib-ssl-iostream: Drop SSL_get_servername_type() check X-Git-Tag: 2.4.0~213 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=154e23f6eeb54a8e18aa6c0b222f511742cfc62f;p=thirdparty%2Fdovecot%2Fcore.git lib-ssl-iostream: Drop SSL_get_servername_type() check It's not useful. We know if host is not NULL that we already got host_name from previous call. --- diff --git a/src/lib-ssl-iostream/iostream-openssl-context.c b/src/lib-ssl-iostream/iostream-openssl-context.c index b97f572e14..4b25dd11cc 100644 --- a/src/lib-ssl-iostream/iostream-openssl-context.c +++ b/src/lib-ssl-iostream/iostream-openssl-context.c @@ -332,10 +332,6 @@ static int ssl_servername_callback(SSL *ssl, int *al, ssl_io = SSL_get_ex_data(ssl, dovecot_ssl_extdata_index); host = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name); - if (SSL_get_servername_type(ssl) == -1) { - e_debug(ssl_io->event, "SSL_get_servername() failed"); - } - if (ssl_servername_process(ssl_io, host, al) < 0) return SSL_TLSEXT_ERR_ALERT_FATAL;