private void populateMap() {
    try {
      final KeyStore keyStore = KeyStore.getInstance("JKS");
      final char[] passPhrase = pubKeyPass != null ? pubKeyPass.toCharArray() : null;
      final FileInputStream keyStoreFile = new FileInputStream(pubKeyFilePath);

      try {
        keyStore.load(keyStoreFile, passPhrase);
      } finally {
        keyStoreFile.close();
      }

      for (Enumeration e = keyStore.aliases(); e.hasMoreElements();) {
        final Object alias = e.nextElement();
        final Certificate cert = keyStore.getCertificate((String) alias);
        if (cert instanceof X509Certificate) {
          aliasCertificateMap.put(alias, cert);
        }
      }

    } catch (Exception e) {
      throw new AuthenticationFailedException(
          "Exception while getting public keys: " + e.getMessage(), e);
    }
  }
An implementation of {@link Authenticator} that uses PKCS.
geode-dunit/src/main/java/org/apache/geode/security/templates/PKCSAuthenticator.java