fix: Update Lets Encrypt root certificate.

This commit is contained in:
huanghongxun 2021-10-21 22:42:59 +08:00
parent 516975688f
commit ac78b69ec2
2 changed files with 1 additions and 28 deletions

View File

@ -61,10 +61,7 @@ public final class Main {
checkDirectoryPath();
// This environment check will take ~300ms
thread(() -> {
fixLetsEncrypt();
// checkDSTRootCAX3();
}, "CA Certificate Check", true);
thread(Main::fixLetsEncrypt, "CA Certificate Check", true);
Logging.start(Metadata.HMCL_DIRECTORY.resolve("logs"));
@ -107,30 +104,6 @@ public final class Main {
}
}
// Lets Encrypt uses ISRG Root X1 as root certificate instead.
// private static void checkDSTRootCAX3() {
// TrustManagerFactory tmf;
// try {
// tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
// tmf.init((KeyStore) null);
// } catch (NoSuchAlgorithmException | KeyStoreException e) {
// LOG.log(Level.WARNING, "Failed to init TrustManagerFactory", e);
// // don't know what to do here
// return;
// }
// for (TrustManager tm : tmf.getTrustManagers()) {
// if (tm instanceof X509TrustManager) {
// for (X509Certificate cert : ((X509TrustManager) tm).getAcceptedIssuers()) {
// if ("CN=DST Root CA X3, O=Digital Signature Trust Co.".equals((cert.getSubjectDN().getName()))) {
// return;
// }
// }
// }
// }
// showWarningAndContinue(i18n("fatal.missing_dst_root_ca_x3"));
// }
/**
* Indicates that a fatal error has occurred, and that the application cannot start.
*/