]> git.sur5r.net Git - openldap/commit
ITS#7428 Use non-blocking IO during SSL Handshake
authorRalf Haferkamp <ralf@openldap.org>
Wed, 21 Nov 2012 12:41:40 +0000 (13:41 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 26 Nov 2012 22:34:01 +0000 (14:34 -0800)
commit222fa6ad47e7de738bdcb5b2e69d88a276a4323f
tree16aa82bce4a02de7b6522cbc8b41f0616f8ceeda
parentb044b0742e54da93e6a81ffaf815b0a177f9a530
ITS#7428 Use non-blocking IO during SSL Handshake

If a timeout is set, perform the SSL Handshake using non-blocking IO.  This way
we can timeout if SSL Handshake gets stuck for whatever reason.

This code is currently hidden behind #ifdefs (LDAP_USE_NON_BLOCKING_TLS) and
disabled by default as there seem to be some problems using NON-blocking
I/O during the TLS Handshake when linking against NSS (either a bug in NSS
itself of in tls_m.c, see discussion on -devel)

This patch adds an additional parameter to ldap_int_poll() in order to indicate
if we're waiting in order to perform a read or write operation.
libraries/libldap/ldap-int.h
libraries/libldap/open.c
libraries/libldap/os-ip.c
libraries/libldap/request.c
libraries/libldap/tls2.c