Changeset View
Changeset View
Standalone View
Standalone View
src/ldapconnection.cpp
Context not available. | |||||
279 | } | 279 | } | ||
---|---|---|---|---|---|
280 | #endif | 280 | #endif | ||
281 | 281 | | |||
282 | //FIXME: accessing to certificate handling would be good | | |||
283 | qCDebug(LDAP_LOG) << "setting security to:" << d->mServer.security(); | 282 | qCDebug(LDAP_LOG) << "setting security to:" << d->mServer.security(); | ||
284 | if (d->mServer.security() == LdapServer::TLS) { | 283 | if (d->mServer.security() != LdapServer::None) { | ||
285 | bool initContext = false; | 284 | bool initContext = false; | ||
286 | if (d->mServer.tlsCACertFile().isEmpty() == false) { | 285 | if (d->mServer.tlsCACertFile().isEmpty() == false) { | ||
287 | if (setOption(LDAP_OPT_X_TLS_CACERTFILE, d->mServer.tlsCACertFile().toUtf8().data()) != LDAP_OPT_SUCCESS) { | 286 | if (setOption(LDAP_OPT_X_TLS_CACERTFILE, d->mServer.tlsCACertFile().toUtf8().data()) != LDAP_OPT_SUCCESS) { | ||
Context not available. | |||||
328 | return -1; | 327 | return -1; | ||
329 | } | 328 | } | ||
330 | } | 329 | } | ||
330 | } | ||||
331 | 331 | | |||
332 | if (d->mServer.security() == LdapServer::TLS) { | ||||
332 | qCDebug(LDAP_LOG) << "start TLS"; | 333 | qCDebug(LDAP_LOG) << "start TLS"; | ||
333 | 334 | | |||
334 | #ifdef HAVE_LDAP_START_TLS_S | 335 | #ifdef HAVE_LDAP_START_TLS_S | ||
Context not available. |