]> git.sur5r.net Git - openldap/commitdiff
ITS#8650 retry gnutls_handshake after GNUTLS_E_AGAIN
authorRyan Tandy <ryan@nardis.ca>
Sat, 6 May 2017 22:50:13 +0000 (22:50 +0000)
committerRyan Tandy <ryan@nardis.ca>
Sat, 6 May 2017 22:50:13 +0000 (22:50 +0000)
libraries/libldap/tls_g.c

index 02f71b05f1d04c1c9a6529dc44982b0b7315cf9a..0df32a8e4573800a9b0438d168a02cda8598a86a 100644 (file)
@@ -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;