ftpsClient.setTrustManager(this.trustManager);
FTPSClient mFtps = new FTPSClient(); mFtps.setTrustManager(TrustManagerUtils.getAcceptAllTrustManager());
/** * @void, check if trust all certifcates. */ public void checkIfCertificate() { if (securityCert) { ftpsClient.setTrustManager(TrustManagerUtils.getValidateServerCertificateTrustManager()); KeyManager keyManager = null; try { keyManager = KeyManagerUtils.createClientKeyManager(new File(pathTokesytore), storePass); } catch (IOException e) { LOGGER.error("", e); } catch (GeneralSecurityException e) { LOGGER.error("",e); } ftpsClient.setKeyManager(keyManager); } else { ftpsClient.setTrustManager(TrustManagerUtils.getAcceptAllTrustManager()); } }
trustMgrFactory.init(trustStore); client.setTrustManager(trustMgrFactory.getTrustManagers()[0]);
ftpClient.setTrustManager(trustManager[0]); KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); kmf.init(null, null);
@Override protected FTPSClient createClient(final FileSystemOptions fileSystemOptions) throws FileSystemException { final FTPSClient client; if (builder.getFtpsMode(fileSystemOptions) == FtpsMode.IMPLICIT) { client = new FTPSClient(true); } else { client = new FTPSClient(); } final TrustManager trustManager = builder.getTrustManager(fileSystemOptions); if (trustManager != null) { client.setTrustManager(trustManager); } final KeyManager keyManager = builder.getKeyManager(fileSystemOptions); if (keyManager != null) { client.setKeyManager(keyManager); } return client; }
@Override protected FTPSClient createClient(final FileSystemOptions fileSystemOptions) throws FileSystemException { final FTPSClient client; if (builder.getFtpsMode(fileSystemOptions) == FtpsMode.IMPLICIT) { client = new FTPSClient(true); } else { client = new FTPSClient(); } final TrustManager trustManager = builder.getTrustManager(fileSystemOptions); if (trustManager != null) { client.setTrustManager(trustManager); } final KeyManager keyManager = builder.getKeyManager(fileSystemOptions); if (keyManager != null) { client.setKeyManager(keyManager); } return client; }
@Override protected FTPSClient createClient(final FileSystemOptions fileSystemOptions) throws FileSystemException { final FTPSClient client; if (builder.getFtpsMode(fileSystemOptions) == FtpsMode.IMPLICIT) { client = new FTPSClient(true); } else { client = new FTPSClient(); } final TrustManager trustManager = builder.getTrustManager(fileSystemOptions); if (trustManager != null) { client.setTrustManager(trustManager); } final KeyManager keyManager = builder.getKeyManager(fileSystemOptions); if (keyManager != null) { client.setKeyManager(keyManager); } return client; }
ftps.setTrustManager(TrustManagerUtils.getAcceptAllTrustManager()); } else if ("valid".equals(trustmgr)) { ftps.setTrustManager(TrustManagerUtils.getValidateServerCertificateTrustManager()); } else if ("none".equals(trustmgr)) { ftps.setTrustManager(null);
X509TrustManager defaultTrustManager = TrustManagerUtils.getDefaultTrustManager(keyStore); ftpClient.setTrustManager(defaultTrustManager);
ftpsClient.setTrustManager(this.trustManager);
ftpsClient.setTrustManager(this.trustManager);
ftpsClient.setTrustManager(this.trustManager);