in src/main/java/org/jetbrains/nativecerts/NativeTrustedRootsDebugMain.java [21:40]
public static void main(String[] args) throws Exception {
File logFile = File.createTempFile("nativecerts-", ".log");
setupLogging(logFile);
Collection<X509Certificate> trustedCertificates = NativeTrustedCertificates.getCustomOsSpecificTrustedCertificates();
StringBuilder message = new StringBuilder("getCustomOsSpecificTrustedCertificates returned the following certificates (" + trustedCertificates.size() + " pcs):\n");
int index = 1;
for (X509Certificate certificate : trustedCertificates) {
message.append(" ").append(index).append(" / ").append(trustedCertificates.size()).append(". ")
.append(certificate.getSubjectDN()).append(" ").append(sha256hex(certificate.getEncoded()))
.append('\n');
index++;
}
LOG.info(message.toString());
//noinspection UseOfSystemOutOrSystemErr
System.out.println("\nLog file was saved at " + logFile);
}