Summary: | Mailody cannot connect to Dovecot IMAP with SSL. | ||
---|---|---|---|
Product: | [Unmaintained] mailody | Reporter: | Tadeusz Andrzej Kadłubowski <yess> |
Component: | general | Assignee: | Tom Albers <toma> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 0.2.0-beta1 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Tadeusz Andrzej Kadłubowski
2006-11-01 21:21:57 UTC
What was the end of the configure output? Did it find QCA? You seem to miss the tls plugin of qca. I'ld like to know if configure did not detect that properly. I installed qca and its header files just before compiling mailody. Ldd shows that the runnable binary is linked with qca library. can you see if your distro (which is?) carries a seperate package called QCA-TLS. Let me know. Ok, I have two qt versions and not the one mailody linked to had qca tls plugin installed. Just close the bug as INVALID. I'll keep in touch. Maybe mailody will crash within first hour from the moment I compilled it correctly. ok, thanks. SVN commit 602297 by toma: Properly detect if SSL/TLS is possible and warn about it. Disable the settings if needed. CLosing the bugs which I think are related to this. BUG:136391,136460 CCBUG: 136670 M +6 -0 global.cpp M +5 -0 global.h M +22 -4 setupaccount.cpp M +10 -6 socketsafe.cpp --- trunk/playground/pim/mailody/src/global.cpp #602296:602297 @@ -20,6 +20,7 @@ #include <kabc/stdaddressbook.h> #include <kapplication.h> #include <krun.h> +#include <qca.h> #include "../libkmime/kmime_headers.h" #include "global.h" @@ -88,3 +89,8 @@ } return address; } + +bool Global::cryptoConnectionSupported() +{ + return QCA::isSupported(QCA::CAP_TLS); +} --- trunk/playground/pim/mailody/src/global.h #602296:602297 @@ -60,6 +60,11 @@ */ static QString myEmail(); + /** + * will return true when it is possible to use SSL or TLS + */ + static bool cryptoConnectionSupported(); + private: static Global* m_instance; }; --- trunk/playground/pim/mailody/src/setupaccount.cpp #602296:602297 @@ -48,6 +48,7 @@ using KWallet::Wallet; // Local includes. +#include "global.h" #include "setupaccount.h" class SetupAccountPriv @@ -110,8 +111,8 @@ d->safeImap = new QButtonGroup(3, Qt::Horizontal, parent); d->safeImap->setExclusive(true); new QRadioButton(i18n("None"), d->safeImap); - new QRadioButton(i18n("SSL"), d->safeImap); - new QRadioButton(i18n("TLS"), d->safeImap); + QRadioButton* sslRadioI = new QRadioButton(i18n("SSL"), d->safeImap); + QRadioButton* tlsRadioI = new QRadioButton(i18n("TLS"), d->safeImap); m->addWidget(d->safeImap,3,1); l5->setBuddy(d->safeImap); @@ -151,8 +152,8 @@ d->safeSMTP = new QButtonGroup(3, Qt::Horizontal, parent); d->safeSMTP->setExclusive(true); new QRadioButton("None", d->safeSMTP); - new QRadioButton("SSL", d->safeSMTP); - new QRadioButton("TLS", d->safeSMTP); + QRadioButton* sslRadioS = new QRadioButton("SSL", d->safeSMTP); + QRadioButton* tlsRadioS = new QRadioButton("TLS", d->safeSMTP); m->addWidget(d->safeSMTP,7,1); l5->setBuddy(d->safeSMTP); @@ -165,6 +166,23 @@ l8->setBuddy(d->homePage); readSettings(); + + if(!Global::cryptoConnectionSupported()) + { + tlsRadioI->setEnabled(false); + tlsRadioS->setEnabled(false); + sslRadioI->setEnabled(false); + sslRadioS->setEnabled(false); + d->safeSMTP->setButton(0); + d->safeImap->setButton(0); + + KMessageBox::information(0,i18n("Your system does not seem to be " + "setup for TLS or SSL, these settings " + "are disabled. Install QCA and " + "recompile Mailody or contact your " + "distribution"), + QString::null, "TLS_SSL_DISABLED"); + } } SetupAccount::~SetupAccount() --- trunk/playground/pim/mailody/src/socketsafe.cpp #602296:602297 @@ -32,6 +32,7 @@ #include <qca.h> #include "db.h" +#include "global.h" #include "socketsafe.h" SocketSafe::SocketSafe(QObject* parent, const QString& server, @@ -44,12 +45,6 @@ , m_gather(false) , m_crypted(false) { - if(!QCA::isSupported(QCA::CAP_TLS)) - { - kdDebug() << "TLS not supported!" << endl; - return; - } - m_server = server; m_port = port; m_safe = safe; @@ -68,6 +63,15 @@ << "TLS: " << (m_safe == TLS) << endl; #endif + if(!Global::cryptoConnectionSupported()) + { + kdDebug() << "Crypto not supported!" << endl; + if (m_safe == TLS || m_safe == SSL) + emit error(i18n("You requested TLS/SSL, but your " + "system does not seem to be setup for that.")); + return; + } + m_crypted=false; if (!m_socket) |