From: Ryan Tandy Date: Sat, 6 May 2017 22:50:13 +0000 (+0000) Subject: ITS#8650 retry gnutls_handshake after GNUTLS_E_AGAIN X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7b5181da8cdd47a13041f9ee36fa9590a0fa6e48;p=openldap ITS#8650 retry gnutls_handshake after GNUTLS_E_AGAIN --- diff --git a/libraries/libldap/tls_g.c b/libraries/libldap/tls_g.c index 02f71b05f1..0df32a8e45 100644 --- a/libraries/libldap/tls_g.c +++ b/libraries/libldap/tls_g.c @@ -388,7 +388,9 @@ tlsg_session_accept( tls_session *session ) tlsg_session *s = (tlsg_session *)session; int rc; - rc = gnutls_handshake( s->session ); + for ( rc = gnutls_handshake ( s->session ); + rc == GNUTLS_E_INTERRUPTED || rc == GNUTLS_E_AGAIN; + rc = gnutls_handshake ( s->session ) ); if ( rc == 0 && s->ctx->reqcert != LDAP_OPT_X_TLS_NEVER ) { const gnutls_datum_t *peer_cert_list; unsigned int list_size;