From 43e21d653f87f398f66bf20799d0c8ee0eb8d5a6 Mon Sep 17 00:00:00 2001 From: Artem Boldariev Date: Thu, 30 Mar 2023 18:17:11 +0300 Subject: [PATCH] TLS Stream: remove incorrect/obsolete INSIST()s from tls_do_bio() With the changes to tls_try_handshake() made in 2846888c573fcc610cdf71bcdd5bb6f92ffaf499 there are some incorrect INSISTS() related to handshake handling which better to be removed. --- lib/isc/netmgr/tlsstream.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/isc/netmgr/tlsstream.c b/lib/isc/netmgr/tlsstream.c index 6432e493ab..c1dfb0eb95 100644 --- a/lib/isc/netmgr/tlsstream.c +++ b/lib/isc/netmgr/tlsstream.c @@ -524,20 +524,15 @@ tls_do_bio(isc_nmsocket_t *sock, isc_region_t *received_data, hs_result != ISC_R_SUCCESS) { /* - * The accept callback has been called - * unsuccessfully. Let's try to shut - * down the TLS connection gracefully. + * The accept/connect callback has been + * called unsuccessfully. Let's try to + * shut down the TLS connection + * gracefully. */ INSIST(SSL_is_init_finished( sock->tlsstream.tls) == 1); - INSIST(!sock->client); finish = true; - } else if (sock->tlsstream.state == TLS_IO && - hs_result == ISC_R_SUCCESS && - !sock->tlsstream.server) - { - INSIST(sock->client); } } } else if (send_data != NULL) {