1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 13:12:25 -05:00

Only ask for POP3 capabilities before authorization if TLS should be used. Always ask after authorization.

This commit is contained in:
cketti 2010-07-30 00:58:22 +00:00
parent 91e55f6fa1
commit 0c67f1f4cf

View File

@ -256,11 +256,11 @@ public class Pop3Store extends Store
// Eat the banner // Eat the banner
executeSimpleCommand(null); executeSimpleCommand(null);
mCapabilities = getCapabilities();
if (mConnectionSecurity == CONNECTION_SECURITY_TLS_OPTIONAL if (mConnectionSecurity == CONNECTION_SECURITY_TLS_OPTIONAL
|| mConnectionSecurity == CONNECTION_SECURITY_TLS_REQUIRED) || mConnectionSecurity == CONNECTION_SECURITY_TLS_REQUIRED)
{ {
mCapabilities = getCapabilities();
if (mCapabilities.stls) if (mCapabilities.stls)
{ {
writeLine("STLS"); writeLine("STLS");
@ -296,6 +296,8 @@ public class Pop3Store extends Store
{ {
throw new AuthenticationFailedException(null, me); throw new AuthenticationFailedException(null, me);
} }
mCapabilities = getCapabilities();
} }
catch (SSLException e) catch (SSLException e)
{ {