]> 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)
committerRalf Haferkamp <ralf@openldap.org>
Wed, 21 Nov 2012 13:25:18 +0000 (14:25 +0100)
commitc728ebf586af778dc2927513097dbfc433b267df
treef192aae33783406fd4fe258892225102be16cebc
parentbe781ab8081d7e9ad1eb89da81077c7f936a5604
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