]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
TLS Stream: remove incorrect/obsolete INSIST()s from tls_do_bio()
authorArtem Boldariev <artem@boldariev.com>
Thu, 30 Mar 2023 15:17:11 +0000 (18:17 +0300)
committerArtem Boldariev <artem@boldariev.com>
Thu, 30 Mar 2023 15:21:50 +0000 (18:21 +0300)
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

index 6432e493ab56282b011afdffba51eff094c7e190..c1dfb0eb9555114f1539931c97938417b658038d 100644 (file)
@@ -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) {