From 0c67f1f4cf64b0225065012250881b804f1d5884 Mon Sep 17 00:00:00 2001 From: cketti Date: Fri, 30 Jul 2010 00:58:22 +0000 Subject: [PATCH] Only ask for POP3 capabilities before authorization if TLS should be used. Always ask after authorization. --- src/com/fsck/k9/mail/store/Pop3Store.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/fsck/k9/mail/store/Pop3Store.java b/src/com/fsck/k9/mail/store/Pop3Store.java index 1926626ed..5657a34fc 100644 --- a/src/com/fsck/k9/mail/store/Pop3Store.java +++ b/src/com/fsck/k9/mail/store/Pop3Store.java @@ -256,11 +256,11 @@ public class Pop3Store extends Store // Eat the banner executeSimpleCommand(null); - mCapabilities = getCapabilities(); - if (mConnectionSecurity == CONNECTION_SECURITY_TLS_OPTIONAL || mConnectionSecurity == CONNECTION_SECURITY_TLS_REQUIRED) { + mCapabilities = getCapabilities(); + if (mCapabilities.stls) { writeLine("STLS"); @@ -296,6 +296,8 @@ public class Pop3Store extends Store { throw new AuthenticationFailedException(null, me); } + + mCapabilities = getCapabilities(); } catch (SSLException e) {