From d0fd8ccb832a281853ea5de21dd7ae9d6154144e Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 9 Apr 2026 21:24:06 +0200 Subject: [PATCH] Disabled BouncyCastle for Gmail --- app/src/main/java/eu/faircode/email/EmailService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/EmailService.java b/app/src/main/java/eu/faircode/email/EmailService.java index a90112b62d..4405be4a67 100644 --- a/app/src/main/java/eu/faircode/email/EmailService.java +++ b/app/src/main/java/eu/faircode/email/EmailService.java @@ -493,6 +493,8 @@ public class EmailService implements AutoCloseable { boolean bc = prefs.getBoolean("bouncy_castle", false); boolean fips = prefs.getBoolean("bc_fips", false); + if (host.endsWith(".gmail.com")) + bc = false; factory = new SSLSocketFactoryService( context, host, port, insecure, dane, ssl_harden, strict, cert_strict, cert_transparency, check_names, @@ -717,7 +719,7 @@ public class EmailService implements AutoCloseable { if (ex.getMessage() != null && (ex.getMessage().contains("Session invalidated") || ex.getMessage().contains("Command Error. 12"))) - throw new AuthenticationFailedException(ex.getMessage(), ex); + throw new AuthenticationFailedException(ex.getMessage(), ex); /* com.sun.mail.util.MailConnectException: Couldn't connect to host, port: 74.125.140.108, 993; timeout 20000;