diff --git a/src/main/java/com/github/jlangch/venice/util/ssl/Keystores.java b/src/main/java/com/github/jlangch/venice/util/ssl/Keystores.java index 7d96e09e4..618a0c1a9 100644 --- a/src/main/java/com/github/jlangch/venice/util/ssl/Keystores.java +++ b/src/main/java/com/github/jlangch/venice/util/ssl/Keystores.java @@ -83,36 +83,36 @@ public static String subjectDN(final KeyStore keystore, final String alias) thro return certificate(keystore, alias).getSubjectDN().getName(); } - public static Map parseSubjectDN(final KeyStore keystore, final String alias) { - try { - return parseDN(subjectDN(keystore, alias)); - } - catch (Exception ex) { - throw new RuntimeException(ex.getMessage(), ex); - } - } + public static Map parseSubjectDN(final KeyStore keystore, final String alias) { + try { + return parseDN(subjectDN(keystore, alias)); + } + catch (Exception ex) { + throw new RuntimeException(ex.getMessage(), ex); + } + } public static String issuerDN(final KeyStore keystore, final String alias) throws KeyStoreException { return certificate(keystore, alias).getIssuerDN().getName(); } - public static Map parseIssuerDN(final KeyStore keystore, final String alias) { - try { - return parseDN(issuerDN(keystore, alias)); - } - catch (Exception ex) { - throw new RuntimeException(ex.getMessage(), ex); - } - } - - public static Map parseDN(final String dn) { - try { - return parse(new LdapName(dn)); - } - catch (Exception ex) { - throw new RuntimeException(ex.getMessage(), ex); - } - } + public static Map parseIssuerDN(final KeyStore keystore, final String alias) { + try { + return parseDN(issuerDN(keystore, alias)); + } + catch (Exception ex) { + throw new RuntimeException(ex.getMessage(), ex); + } + } + + public static Map parseDN(final String dn) { + try { + return parse(new LdapName(dn)); + } + catch (Exception ex) { + throw new RuntimeException(ex.getMessage(), ex); + } + } public static boolean hasExpired(final KeyStore keystore, final String alias) throws KeyStoreException { return expiryDate(keystore, alias).isBefore(LocalDateTime.now()); @@ -146,15 +146,15 @@ private static LocalDateTime toLocalDateTime(final Date date) { } } - private static Map parse(final LdapName ln) { - final Map elements = new HashMap<>(); + private static Map parse(final LdapName ln) { + final Map elements = new HashMap<>(); - for(int ii=0; ii