]> git.sur5r.net Git - openldap/commitdiff
Fixed SSL/TLS context renewal
authorRalf Haferkamp <ralf@openldap.org>
Fri, 1 Apr 2011 07:48:24 +0000 (09:48 +0200)
committerRalf Haferkamp <ralf@openldap.org>
Fri, 1 Apr 2011 07:48:24 +0000 (09:48 +0200)
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

index 9db8f7a2fa2fc6da7b6359321fe07343b5e46b5e..2246e3a39ceb54b8c42fcef613288d3ed1199fd9 100644 (file)
@@ -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 ){