Util: Don't attempt to load hidden cert files (ticket #2622)

This commit is contained in:
zzz
2019-09-14 11:40:39 +00:00
parent 9e39cbe502
commit f1b725a320

View File

@ -487,6 +487,9 @@ public final class KeyStoreUtil {
// https://www.sslshopper.com/ssl-converter.html
// No idea if all these formats can actually be read by CertificateFactory
String alias = f.getName().toLowerCase(Locale.US);
// Mac .DS_STORE
if (alias.startsWith("."))
continue;
if (alias.endsWith(".crt") || alias.endsWith(".pem") || alias.endsWith(".key") ||
alias.endsWith(".der") || alias.endsWith(".key") || alias.endsWith(".p7b") ||
alias.endsWith(".p7c") || alias.endsWith(".pfx") || alias.endsWith(".p12") ||