Need to know a little bit more. Which email provider? Is TLS supported from the server side? Did the server has special ports for TLS?
// Order taken from OpenSSL 1.0.1c
private static final String[] ORDERED_KNOWN_CIPHERS = {
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
"TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
"TLS_DHE_DSS_WITH_AES_256_CBC_SHA",
"TLS_ECDH_RSA_WITH_AES_256_CBC_SHA",
"TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA",
"TLS_RSA_WITH_AES_256_CBC_SHA",
"TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
"TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
"TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA",
"TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA",
"SSL_RSA_WITH_3DES_EDE_CBC_SHA",
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
"TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
"TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
"TLS_ECDH_RSA_WITH_AES_128_CBC_SHA",
"TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA",
"TLS_RSA_WITH_AES_128_CBC_SHA",
"TLS_ECDHE_RSA_WITH_RC4_128_SHA",
"TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
"TLS_ECDH_RSA_WITH_RC4_128_SHA",
"TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
"SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA",
"SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
"SSL_RSA_WITH_RC4_128_SHA",
"SSL_RSA_WITH_RC4_128_MD5",
};
private static final String[] BLACKLISTED_CIPHERS = {
"SSL_RSA_WITH_DES_CBC_SHA",
"SSL_DHE_RSA_WITH_DES_CBC_SHA",
"SSL_DHE_DSS_WITH_DES_CBC_SHA",
"SSL_RSA_EXPORT_WITH_RC4_40_MD5",
"SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
"SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
"SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
};
private static final String[] ORDERED_KNOWN_PROTOCOLS = {
"TLSv1.2", "TLSv1.1", "TLSv1", "SSLv3"
};
And the reason is: socket.getEnabledProtocols in the code above returned [SSLv3, TLSv1].
The actual socket class is OpenSSLSocketImplWrapper.
I have no idea why it does not include TLSv1.1 and TLSv1.2.
I tested this on three devices -- HTC One Max with 4.4.2, Nexus 5 with 4.4.4, and a Samsung S4 Mini with 4.2.2 -- and it's the same on all of them. TLSv1.1 and TLSv1.2 are not listed as supported.
This Android code looks interesting, it says "No TLSv1.1 or TLSv1.2 support on SSLEngine based provider". But *the* provider in Android 4.1+ is OpenSSL, as far as I know (they switched from Bouncy Castle used in earlier versions).
https://android.googlesource.com/platform/libcore/+/cf6b19bbe9eba2ec41eeb3f0f1c2da1ad5e6800e/support/src/test/java/libcore/java/security/StandardNames.java#550
Since you seem to be quite knowledgeable about computer security stuff, maybe you can shed some light on this?
>>> These changes should appear in the next major platform release
I can confirm that Android Preview L (I've used the emulator) has TLSv1.1 and TLSv1.2 support and it works with Aqua.
Aug 3 11:01:35 li463-125 postfix/submission/smtpd[21143]: Anonymous TLS connection established from [snip]: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)
One caveat:
It only works with "STARTTLS (strict)" and "SSL (strict)".
The "STARTTLS (accept any)" and "SSL (accept any)" variations use TLSv1 even when my code asks for TLSv1.2.
@0brad0
So there you have it. Just wait for the next -beta build of AquaMail.
Thanks for bringing it up.
One caveat:
It only works with "STARTTLS (strict)" and "SSL (strict)".
The "STARTTLS (accept any)" and "SSL (accept any)" variations use TLSv1 even when my code asks for TLSv1.2.
@0brad0
So there you have it. Just wait for the next -beta build of AquaMail.
Thanks for bringing it up.
Can you please explain why that is that it only works with strict mode? Frustrating since I am using self signed certs and this wouldn't help me.
Well either way it is still a step forward and a bug fixed 😉
Do you ever interact with the author of K9? If so can you please pass this issue on to the author.
For home use, check https://www.startssl.com for free server certificates. I am using this and works fine. The root certificate is in the Android Trust Base.
I was using cacert.org certificates but their root and intermediate certificates are not included in Android.
SSL strict:
Aug 4 14:45:45 li463-125 postfix/smtps/smtpd[17656]: Anonymous TLS connection established from [snip]: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)
SSL accept any:
Aug 4 14:46:37 li463-125 postfix/smtps/smtpd[17656]: Anonymous TLS connection established from [snip]: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)
STARTTLS strict:
Aug 4 14:47:24 li463-125 postfix/submission/smtpd[17705]: Anonymous TLS connection established from [snip]: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)
STARTTLS accept any:
Aug 4 14:48:09 li463-125 postfix/submission/smtpd[17705]: Anonymous TLS connection established from [snip]: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)
© 2026 Aqua Mail. All Rights Reserved.