diff --git a/src/ldapbonding.cpp b/src/ldapbonding.cpp index abe4e95..f7ef751 100644 --- a/src/ldapbonding.cpp +++ b/src/ldapbonding.cpp @@ -283,13 +283,15 @@ void LDAPConfig::save() { if (ldap_mgr->getTDECertificate("publicRootCertificate", KERBEROS_PKI_PUBLICDIR + m_realms[m_clientRealmConfig.defaultRealm].admin_server + ".ldap.crt", &errorstring) != 0) { KMessageBox::sorry(this, i18n("Unable to obtain root certificate for realm %1!

Details: %2").arg(m_clientRealmConfig.defaultRealm.upper()).arg(errorstring), i18n("Unable to Obtain Certificate")); } - if (ldap_mgr->installCACertificateInHostCAStore(&errorstring) != 0) { - KMessageBox::sorry(this, i18n("Unable to install root CA certificate for realm %1!

Details: %2").arg(m_clientRealmConfig.defaultRealm.upper()).arg(errorstring), i18n("Unable to Install Root CA")); - } + else { + if (ldap_mgr->installCACertificateInHostCAStore(&errorstring) != 0) { + KMessageBox::sorry(this, i18n("Unable to install root CA certificate for realm %1!

Details: %2").arg(m_clientRealmConfig.defaultRealm.upper()).arg(errorstring), i18n("Unable to Install Root CA")); + } - // Get and install the CA root CRL from LDAP - if (ldap_mgr->retrieveAndInstallCaCrl(ldap_mgr, &errorstring) != 0) { - KMessageBox::sorry(this, i18n("Unable to obtain root CRL for realm %1!

Details: %2").arg(m_clientRealmConfig.defaultRealm.upper()).arg(errorstring), i18n("Unable to Obtain CRL")); + // Get and install the CA root CRL from LDAP + if (ldap_mgr->retrieveAndInstallCaCrl(ldap_mgr, &errorstring) != 0) { + KMessageBox::sorry(this, i18n("Unable to obtain root CRL for realm %1!

Details: %2").arg(m_clientRealmConfig.defaultRealm.upper()).arg(errorstring), i18n("Unable to Obtain CRL")); + } } delete ldap_mgr;