code: public static TrustManagerFactory getTrustManagerFactory(String trustStoreFilename, StoreProperties storeProperties)
        throws IOException, GeneralSecurityException {
      InputStream is = getResourceAsStream(trustStoreFilename);
      if (is == null) {
        throw new FileNotFoundException("Certificate file not found: " + getFilenameInfo(trustStoreFilename));
      }
      try {
        return getTrustManagerFactory(is, storeProperties);
      }
      finally {
        try {
          is.close();
        }
        catch (IOException ex) {
          // ignore
        }
      }
    }
docs: Build TrustManagerFactory.
  @param trustStoreFilename Truststore file name
  @param storeProperties store properties
  @return TrustManagerFactory
  @throws IOException
  @throws GeneralSecurityException