@Test public void testLoadTrustStoreWithWrongFileType() throws Exception { String path = x509TestContext.getTrustStoreFile(KeyStoreFileType.JKS) .getAbsolutePath(); KeyStore ts = new PEMFileLoader.Builder() .setTrustStorePath(path) .setTrustStorePassword(x509TestContext.getTrustStorePassword()) .build() .loadTrustStore(); Assert.assertEquals(0, ts.size()); }
@Override public KeyStore loadTrustStore() throws IOException, GeneralSecurityException { return PemReader.loadTrustStore(new File(trustStorePath)); }
PEMFileLoader extends FileKeyStoreLoader { @Override public KeyStore loadTrustStore() throws IOException, GeneralSecurityException { return PemReader.loadTrustStore(new File(trustStorePath)); } }
PEMFileLoader extends FileKeyStoreLoader { @Override public KeyStore loadTrustStore() throws IOException, GeneralSecurityException { return PemReader.loadTrustStore(new File(trustStorePath)); } private  PEMFileLoader(String keyStorePath,
                          String trustStorePath,
                          String keyStorePassword,
                          String trustStorePassword); }
PEMFileLoader extends FileKeyStoreLoader { @Override public KeyStore loadTrustStore() throws IOException, GeneralSecurityException { return PemReader.loadTrustStore(new File(trustStorePath)); } private  PEMFileLoader(String keyStorePath,
                          String trustStorePath,
                          String keyStorePassword,
                          String trustStorePassword); @Override KeyStore loadKeyStore(); @Override KeyStore loadTrustStore(); }
PEMFileLoader extends FileKeyStoreLoader { @Override public KeyStore loadTrustStore() throws IOException, GeneralSecurityException { return PemReader.loadTrustStore(new File(trustStorePath)); } private  PEMFileLoader(String keyStorePath,
                          String trustStorePath,
                          String keyStorePassword,
                          String trustStorePassword); @Override KeyStore loadKeyStore(); @Override KeyStore loadTrustStore();  }