diff options
author | janga <none@none> | 2006-07-10 11:20:15 -0700 |
---|---|---|
committer | janga <none@none> | 2006-07-10 11:20:15 -0700 |
commit | da80a4ab65e70cd50eb02add3b6321ebb16d65b6 (patch) | |
tree | 38a55a8f2d92f79ccb1f9ced25b6499267d91fae /usr/src/lib/libsldap/common/ns_connect.c | |
parent | eb98d0913c956e5ae0dda3aa8c72b8c58eb041c8 (diff) | |
download | illumos-joyent-da80a4ab65e70cd50eb02add3b6321ebb16d65b6.tar.gz |
PSARC/2006/391 Solaris libldap & libsldap private interfaces
6384642 libldap/SSL negotiation uses synchronous I/O preventing timeouts on congested server
6384642 libldap/SSL negotiation uses synchronous I/O preventing timeouts on congested server (OSR# 2893)
Diffstat (limited to 'usr/src/lib/libsldap/common/ns_connect.c')
-rw-r--r-- | usr/src/lib/libsldap/common/ns_connect.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/src/lib/libsldap/common/ns_connect.c b/usr/src/lib/libsldap/common/ns_connect.c index bbe2dead54..ccf75a9963 100644 --- a/usr/src/lib/libsldap/common/ns_connect.c +++ b/usr/src/lib/libsldap/common/ns_connect.c @@ -41,6 +41,7 @@ #include "ns_sldap.h" #include "ns_internal.h" #include "ns_cache_door.h" +#include "ldappr.h" #include <sys/stat.h> #include <fcntl.h> #include <procfs.h> @@ -1247,6 +1248,18 @@ openConnection(LDAP **ldp, const char *serverAddr, const ns_cred_t *auth, #ifdef DEBUG (void) fprintf(stderr, "+++TLS transport\n"); #endif /* DEBUG */ + + if (prldap_set_session_option(NULL, NULL, + PRLDAP_OPT_IO_MAX_TIMEOUT, + timeoutMilliSec) != LDAP_SUCCESS) { + (void) snprintf(errstr, sizeof (errstr), + gettext("openConnection: failed to initialize " + "TLS security")); + MKERROR(LOG_WARNING, *errorp, LDAP_CONNECT_ERROR, + strdup(errstr), NULL); + return (NS_LDAP_INTERNAL); + } + hostcertpath = auth->hostcertpath; if (hostcertpath == NULL) { alloc_hcp = __s_get_hostcertpath(); |