From 4040124e875f442f1ef618c669e108a3d2bc9662 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 10 Oct 2011 05:09:19 +0000 Subject: Fix crypto kcontrol GUI when SSLv2 is disabled git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1258118 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kcontrol/crypto/crypto.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'kcontrol') diff --git a/kcontrol/crypto/crypto.cpp b/kcontrol/crypto/crypto.cpp index ee9f256b6..910f65136 100644 --- a/kcontrol/crypto/crypto.cpp +++ b/kcontrol/crypto/crypto.cpp @@ -878,6 +878,10 @@ void KCryptoConfig::load( bool useDefaults ) config->setGroup("SSLv2"); mUseSSLv2->setChecked(config->readBoolEntry("Enabled", true)); +#ifdef OPENSSL_NO_SSL2 + mUseSSLv2->setChecked(false); + mUseSSLv2->setEnabled(false); +#endif config->setGroup("SSLv3"); mUseSSLv3->setChecked(config->readBoolEntry("Enabled", true)); @@ -929,7 +933,11 @@ void KCryptoConfig::load( bool useDefaults ) item = static_cast(item->nextSibling()); } +#ifdef OPENSSL_NO_SSL2 + SSLv2Box->setEnabled( false ); +#else SSLv2Box->setEnabled( mUseSSLv2->isChecked() ); +#endif SSLv3Box->setEnabled( mUseSSLv3->isChecked() ); TQStringList groups = policies->groupList(); @@ -1042,7 +1050,11 @@ void KCryptoConfig::save() config->writeEntry("Enabled", mUseTLS->isChecked()); config->setGroup("SSLv2"); +#ifdef OPENSSL_NO_SSL2 + config->writeEntry("Enabled", false); +#else config->writeEntry("Enabled", mUseSSLv2->isChecked()); +#endif config->setGroup("SSLv3"); config->writeEntry("Enabled", mUseSSLv3->isChecked()); @@ -1262,7 +1274,11 @@ void KCryptoConfig::cwCompatible() { } mUseTLS->setChecked(true); +#ifdef OPENSSL_NO_SSL2 + mUseSSLv2->setChecked(false); +#else mUseSSLv2->setChecked(true); +#endif mUseSSLv3->setChecked(true); configChanged(); #endif @@ -1319,7 +1335,11 @@ void KCryptoConfig::cwAll() { } mUseTLS->setChecked(true); +#ifdef OPENSSL_NO_SSL2 + mUseSSLv2->setChecked(false); +#else mUseSSLv2->setChecked(true); +#endif mUseSSLv3->setChecked(true); configChanged(); #endif @@ -2361,6 +2381,8 @@ SSL_CONST SSL_METHOD *meth; if (ctx) SSL_CTX_free(ctx); if (ssl) SSL_free(ssl); +#else + CipherItem *item; #endif // We repeat for SSLv3 -- cgit v1.2.1