]> git.ipfire.org Git - thirdparty/openldap.git/commit
ITS#10330 keep socket non-blocking during polling in ldap_int_tls_start
authorMichael Kourlas <michael.kourlas@solace.com>
Fri, 30 May 2025 21:57:23 +0000 (17:57 -0400)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 19 Jun 2025 13:49:40 +0000 (13:49 +0000)
commit585e6aa9a55400f50300fb1b131b7d8960103b86
tree54e28ddb4ecb15f44c26b8477d91230f51a48885
parent76b9c476dd59c63a9a1bdff6133a7fed24954fd2
ITS#10330 keep socket non-blocking during polling in ldap_int_tls_start

During TLS negotiation, if a timeout is set, ldap_int_tls_start sets the
socket to non-blocking and calls ldap_int_poll in a loop if
ldap_int_tls_connect does not succeed the first time it is called.

However, ldap_int_poll sets the socket back to blocking and we currently
do not set it back to non-blocking. This means that a subsequent call to
ldap_int_tls_connect may hang and the configured timeout will not be
enforced. To fix this, we now set the socket back to non-blocking after
ldap_int_poll is called.
libraries/libldap/tls2.c