Commit 5379d8e3 authored by Tobias Junghans's avatar Tobias Junghans Committed by Sandro Knauß

Use certificate handling code for both SSL and TLS

Summary: The initial certificate handling code has been implemented for TLS only. Since it works for SSL as well and may be required in some scenarious, use the code whenever any security protocol is configured.

Reviewers: mlaurent

Reviewed By: mlaurent

Subscribers: knauss, kde-pim

Tags: #kde_pim

Differential Revision:
parent 8bf94d77
......@@ -279,9 +279,8 @@ int LdapConnection::connect()
//FIXME: accessing to certificate handling would be good
qCDebug(LDAP_LOG) << "setting security to:" << d->;
if (d-> == LdapServer::TLS) {
if (d-> != LdapServer::None) {
bool initContext = false;
if (d->mServer.tlsCACertFile().isEmpty() == false) {
if (setOption(LDAP_OPT_X_TLS_CACERTFILE, d->mServer.tlsCACertFile().toUtf8().data()) != LDAP_OPT_SUCCESS) {
......@@ -328,7 +327,9 @@ int LdapConnection::connect()
return -1;
if (d-> == LdapServer::TLS) {
qCDebug(LDAP_LOG) << "start TLS";
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment