From cee1d8638107978ad48334a9b5ca5aacbf54b251 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp <ralf@openldap.org> Date: Fri, 1 Apr 2011 09:48:24 +0200 Subject: [PATCH] Fixed SSL/TLS context renewal LDAP_OPT_X_TLS_NEWCTX needs a pointer to 0 as the value for ldap_set_option when renewing a client's SSL context. --- contrib/ldapc++/src/TlsOptions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/ldapc++/src/TlsOptions.cpp b/contrib/ldapc++/src/TlsOptions.cpp index 9db8f7a2fa..2246e3a39c 100644 --- a/contrib/ldapc++/src/TlsOptions.cpp +++ b/contrib/ldapc++/src/TlsOptions.cpp @@ -110,7 +110,8 @@ std::string TlsOptions::getStringOption( tls_option opt ) const { } void TlsOptions::newCtx() const { - int ret = ldap_set_option( m_ld, LDAP_OPT_X_TLS_NEWCTX, LDAP_OPT_ON); + int val = 0; + int ret = ldap_set_option( m_ld, LDAP_OPT_X_TLS_NEWCTX, &val); if ( ret != LDAP_OPT_SUCCESS ) { if ( ret != LDAP_OPT_ERROR ){ -- GitLab