From: Grigorii Demidov Date: Wed, 16 Jan 2019 10:50:00 +0000 (+0100) Subject: pytests/proxy: minor improvement in rehandshake processing X-Git-Tag: v4.0.0~47^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=35fbc4629060a70aff78efe93cfe70dcc3b72094;p=thirdparty%2Fknot-resolver.git pytests/proxy: minor improvement in rehandshake processing --- diff --git a/tests/pytests/proxy/tls-proxy.c b/tests/pytests/proxy/tls-proxy.c index b26493cee..fb08beb33 100644 --- a/tests/pytests/proxy/tls-proxy.c +++ b/tests/pytests/proxy/tls-proxy.c @@ -760,9 +760,12 @@ int tls_process_from_client(struct peer *client, const uint8_t *buf, ssize_t nre } else if (count == GNUTLS_E_REHANDSHAKE) { tls->handshake_state = TLS_HS_IN_PROGRESS; ret = tls_process_handshake(client); - if (ret < 0) { + if (ret < 0) { /* Critical error */ return ret; } + if (ret == 0) { /* Non fatal, most likely GNUTLS_E_AGAIN */ + break; + } continue; } else if (count < 0) { fprintf(stdout, "[client] gnutls_record_recv failed: %s (%zd)\n",