summaryrefslogtreecommitdiffstats
path: root/kmail/accountdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/accountdialog.cpp')
-rw-r--r--kmail/accountdialog.cpp87
1 files changed, 45 insertions, 42 deletions
diff --git a/kmail/accountdialog.cpp b/kmail/accountdialog.cpp
index c8ac7e29d..6aa0b6a8c 100644
--- a/kmail/accountdialog.cpp
+++ b/kmail/accountdialog.cpp
@@ -274,8 +274,8 @@ AccountDialog::AccountDialog( const TQString & caption, KMAccount *account,
mServerTest( 0 ),
mCurCapa( AllCapa ),
mCapaNormal( AllCapa ),
- mCapaSSL( AllCapa ),
mCapaTLS( AllCapa ),
+ mCapaSTARTTLS( AllCapa ),
mSieveConfigEditor( 0 )
{
mValidator = new TQRegExpValidator( TQRegExp( "[A-Za-z0-9-_:.]*" ), 0 );
@@ -778,16 +778,18 @@ void AccountDialog::makePopAccountPage()
vlay->addSpacing( KDialog::spacingHint() );
+ // TODO(mio): RFC 8134 - Use TLS by default.
mPop.encryptionGroup = new TQButtonGroup( 1, TQt::Horizontal,
i18n("Encryption"), page2 );
mPop.encryptionNone =
new TQRadioButton( i18n("&None"), mPop.encryptionGroup );
- mPop.encryptionSSL =
- new TQRadioButton( i18n("Use &SSL for secure mail download"),
+ mPop.encryptionSTARTTLS =
+ new TQRadioButton( i18n("Use &STARTTLS for secure mail download"),
mPop.encryptionGroup );
mPop.encryptionTLS =
- new TQRadioButton( i18n("Use &TLS for secure mail download"),
+ new TQRadioButton( i18n("Use SSL/&TLS for secure mail download"),
mPop.encryptionGroup );
+
connect(mPop.encryptionGroup, TQ_SIGNAL(clicked(int)),
TQ_SLOT(slotPopEncryptionChanged(int)));
vlay->addWidget( mPop.encryptionGroup );
@@ -1093,15 +1095,16 @@ void AccountDialog::makeImapAccountPage( bool connected )
vlay->addSpacing( KDialog::spacingHint() );
+ // TODO(mio): RFC 8134 - Use TLS by default.
mImap.encryptionGroup = new TQButtonGroup( 1, TQt::Horizontal,
i18n("Encryption"), page2 );
mImap.encryptionNone =
new TQRadioButton( i18n("&None"), mImap.encryptionGroup );
- mImap.encryptionSSL =
- new TQRadioButton( i18n("Use &SSL for secure mail download"),
+ mImap.encryptionSTARTTLS =
+ new TQRadioButton( i18n("Use &STARTTLS for secure mail download"),
mImap.encryptionGroup );
mImap.encryptionTLS =
- new TQRadioButton( i18n("Use &TLS for secure mail download"),
+ new TQRadioButton( i18n("Use SSL/&TLS for secure mail download"),
mImap.encryptionGroup );
connect(mImap.encryptionGroup, TQ_SIGNAL(clicked(int)),
TQ_SLOT(slotImapEncryptionChanged(int)));
@@ -1218,10 +1221,10 @@ void AccountDialog::setupSettings()
mPop.includeInCheck->setChecked( !mAccount->checkExclude() );
mPop.precommand->setText( ap.precommand() );
mPop.identityCombo-> setCurrentIdentity( mAccount->identityId() );
- if (ap.useSSL())
- mPop.encryptionSSL->setChecked( true );
- else if (ap.useTLS())
+ if (ap.useTLS())
mPop.encryptionTLS->setChecked( true );
+ else if (ap.useSTARTTLS())
+ mPop.encryptionSTARTTLS->setChecked( true );
else mPop.encryptionNone->setChecked( true );
if (ap.auth() == "LOGIN")
mPop.authLogin->setChecked( true );
@@ -1278,10 +1281,10 @@ void AccountDialog::setupSettings()
slotEnableImapInterval( interval >= 1 );
mImap.identityCombo-> setCurrentIdentity( mAccount->identityId() );
//mImap.identityCombo->insertStringList( kmkernel->identityManager()->shadowIdentities() );
- if (ai.useSSL())
- mImap.encryptionSSL->setChecked( true );
- else if (ai.useTLS())
+ if (ai.useTLS())
mImap.encryptionTLS->setChecked( true );
+ else if (ai.useSTARTTLS())
+ mImap.encryptionSTARTTLS->setChecked( true );
else mImap.encryptionNone->setChecked( true );
if (ai.auth() == "CRAM-MD5")
mImap.authCramMd5->setChecked( true );
@@ -1328,10 +1331,10 @@ void AccountDialog::setupSettings()
slotEnableImapInterval( interval >= 1 );
mImap.identityCombo-> setCurrentIdentity( mAccount->identityId() );
//mImap.identityCombo->insertStringList( kmkernel->identityManager()->shadowIdentities() );
- if (ai.useSSL())
- mImap.encryptionSSL->setChecked( true );
- else if (ai.useTLS())
+ if (ai.useTLS())
mImap.encryptionTLS->setChecked( true );
+ else if (ai.useSTARTTLS())
+ mImap.encryptionSTARTTLS->setChecked( true );
else mImap.encryptionNone->setChecked( true );
if (ai.auth() == "CRAM-MD5")
mImap.authCramMd5->setChecked( true );
@@ -1499,12 +1502,12 @@ void AccountDialog::slotPopEncryptionChanged(int id)
{
kdDebug(5006) << "slotPopEncryptionChanged( " << id << " )" << endl;
// adjust port
- if ( id == SSL || mPop.portEdit->text() == "995" )
- mPop.portEdit->setText( ( id == SSL ) ? "995" : "110" );
+ if ( id == TLSEncryption || mPop.portEdit->text() == "995" )
+ mPop.portEdit->setText( ( id == TLSEncryption ) ? "995" : "110" );
// switch supported auth methods
- mCurCapa = ( id == TLS ) ? mCapaTLS
- : ( id == SSL ) ? mCapaSSL
+ mCurCapa = ( id == STARTTLSEncryption ) ? mCapaSTARTTLS
+ : ( id == TLSEncryption ) ? mCapaTLS
: mCapaNormal;
enablePopFeatures( mCurCapa );
const TQButton *old = mPop.authGroup->selected();
@@ -1517,12 +1520,12 @@ void AccountDialog::slotImapEncryptionChanged(int id)
{
kdDebug(5006) << "slotImapEncryptionChanged( " << id << " )" << endl;
// adjust port
- if ( id == SSL || mImap.portEdit->text() == "993" )
- mImap.portEdit->setText( ( id == SSL ) ? "993" : "143" );
+ if (id == TLSEncryption || mImap.portEdit->text() == "933")
+ mImap.portEdit->setText((id == TLSEncryption) ? "993" : "143");
// switch supported auth methods
- int authMethods = ( id == TLS ) ? mCapaTLS
- : ( id == SSL ) ? mCapaSSL
+ int authMethods = ( id == STARTTLSEncryption ) ? mCapaSTARTTLS
+ : ( id == TLSEncryption ) ? mCapaTLS
: mCapaNormal;
enableImapAuthMethods( authMethods );
TQButton *old = mImap.authGroup->selected();
@@ -1603,21 +1606,21 @@ unsigned int AccountDialog::popCapabilitiesFromStringList( const TQStringList &
void AccountDialog::slotPopCapabilities( const TQStringList & capaNormal,
- const TQStringList & capaSSL )
+ const TQStringList & capaTLS )
{
mPop.checkCapabilities->setEnabled( true );
mCapaNormal = popCapabilitiesFromStringList( capaNormal );
if ( mCapaNormal & STLS )
- mCapaTLS = mCapaNormal;
+ mCapaSTARTTLS = mCapaNormal;
else
- mCapaTLS = 0;
- mCapaSSL = popCapabilitiesFromStringList( capaSSL );
+ mCapaSTARTTLS = 0;
+ mCapaTLS = popCapabilitiesFromStringList( capaTLS );
kdDebug(5006) << "mCapaNormal = " << mCapaNormal
- << "; mCapaSSL = " << mCapaSSL
- << "; mCapaTLS = " << mCapaTLS << endl;
+ << "; mCapaTLS = " << mCapaTLS
+ << "; mCapaSTARTTLS = " << mCapaSTARTTLS << endl;
mPop.encryptionNone->setEnabled( !capaNormal.isEmpty() );
- mPop.encryptionSSL->setEnabled( !capaSSL.isEmpty() );
- mPop.encryptionTLS->setEnabled( mCapaTLS != 0 );
+ mPop.encryptionTLS->setEnabled( !capaTLS.isEmpty() );
+ mPop.encryptionSTARTTLS->setEnabled( mCapaSTARTTLS != 0 );
checkHighest( mPop.encryptionGroup );
delete mServerTest;
mServerTest = 0;
@@ -1709,21 +1712,21 @@ unsigned int AccountDialog::imapCapabilitiesFromStringList( const TQStringList &
void AccountDialog::slotImapCapabilities( const TQStringList & capaNormal,
- const TQStringList & capaSSL )
+ const TQStringList & capaTLS )
{
mImap.checkCapabilities->setEnabled( true );
mCapaNormal = imapCapabilitiesFromStringList( capaNormal );
if ( mCapaNormal & STARTTLS )
- mCapaTLS = mCapaNormal;
+ mCapaSTARTTLS = mCapaNormal;
else
- mCapaTLS = 0;
- mCapaSSL = imapCapabilitiesFromStringList( capaSSL );
+ mCapaSTARTTLS = 0;
+ mCapaTLS = imapCapabilitiesFromStringList( capaTLS );
kdDebug(5006) << "mCapaNormal = " << mCapaNormal
- << "; mCapaSSL = " << mCapaSSL
- << "; mCapaTLS = " << mCapaTLS << endl;
+ << "; mCapaTLS = " << mCapaTLS
+ << "; mCapaSTARTTLS = " << mCapaSTARTTLS << endl;
mImap.encryptionNone->setEnabled( !capaNormal.isEmpty() );
- mImap.encryptionSSL->setEnabled( !capaSSL.isEmpty() );
- mImap.encryptionTLS->setEnabled( mCapaTLS != 0 );
+ mImap.encryptionTLS->setEnabled( !capaTLS.isEmpty() );
+ mImap.encryptionSTARTTLS->setEnabled( mCapaSTARTTLS != 0 );
checkHighest( mImap.encryptionGroup );
delete mServerTest;
mServerTest = 0;
@@ -2197,8 +2200,8 @@ void AccountDialog::initAccountForConnect()
na.setLogin( mPop.loginEdit->text().stripWhiteSpace() );
na.setStorePasswd( mPop.storePasswordCheck->isChecked() );
na.setPasswd( mPop.passwordEdit->text(), na.storePasswd() );
- na.setUseSSL( mPop.encryptionSSL->isChecked() );
na.setUseTLS( mPop.encryptionTLS->isChecked() );
+ na.setUseSTARTTLS( mPop.encryptionSTARTTLS->isChecked() );
if (mPop.authUser->isChecked())
na.setAuth("USER");
else if (mPop.authLogin->isChecked())
@@ -2223,8 +2226,8 @@ void AccountDialog::initAccountForConnect()
na.setLogin( mImap.loginEdit->text().stripWhiteSpace() );
na.setStorePasswd( mImap.storePasswordCheck->isChecked() );
na.setPasswd( mImap.passwordEdit->text(), na.storePasswd() );
- na.setUseSSL( mImap.encryptionSSL->isChecked() );
na.setUseTLS( mImap.encryptionTLS->isChecked() );
+ na.setUseSTARTTLS( mImap.encryptionSTARTTLS->isChecked() );
if (mImap.authCramMd5->isChecked())
na.setAuth("CRAM-MD5");
else if (mImap.authDigestMd5->isChecked())