// $OpenLDAP$
/*
- * Copyright 2000-2006, OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 2000-2012 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "LDAPRebind.h"
#include "LDAPRebindAuth.h"
#include "LDAPSearchRequest.h"
+#include <lber.h>
#include <sstream>
using namespace std;
this->setConstraints(cons);
}
-LDAPAsynConnection::~LDAPAsynConnection(){
- DEBUG(LDAP_DEBUG_DESTROY,
- "LDAPAsynConnection::~LDAPAsynConnection()" << endl);
- unbind();
- //delete m_constr;
-}
+LDAPAsynConnection::~LDAPAsynConnection(){}
void LDAPAsynConnection::init(const string& hostname, int port){
DEBUG(LDAP_DEBUG_TRACE,"LDAPAsynConnection::init" << endl);
}
void LDAPAsynConnection::start_tls(){
- if( ldap_start_tls_s( cur_session, NULL, NULL ) != LDAP_SUCCESS ) {
+ int ret = ldap_start_tls_s( cur_session, NULL, NULL );
+ if( ret != LDAP_SUCCESS ) {
throw LDAPException(this);
}
}
return m_constr;
}
+TlsOptions LDAPAsynConnection::getTlsOptions() const {
+ return TlsOptions( cur_session );
+}
+
LDAP* LDAPAsynConnection::getSessionHandle() const{
DEBUG(LDAP_DEBUG_TRACE,"LDAPAsynConnection::getSessionHandle()" << endl);
return cur_session;