mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-19 13:48:58 +00:00
Small improvement
This commit is contained in:
parent
8163660d23
commit
d95aebfcc0
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue