1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-19 13:48:58 +00:00

Small improvement

This commit is contained in:
M66B 2024-02-13 14:14:22 +01:00
parent 8163660d23
commit d95aebfcc0

View file

@ -62,6 +62,7 @@ import java.net.UnknownHostException;
import java.security.GeneralSecurityException;
import java.security.KeyStore;
import java.security.PrivateKey;
import java.security.cert.CertPathValidatorException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
@ -725,7 +726,9 @@ public class EmailService implements AutoCloseable {
boolean ioError = false;
Throwable ce = ex;
while (ce != null) {
if (factory != null && ce instanceof CertificateException)
if (factory != null &&
(ce instanceof CertificateException ||
ce instanceof CertPathValidatorException))
throw new UntrustedException(ex, factory.certificate);
if (ce instanceof IOException)
ioError = true;