/** * Gets the TrustManager that validates the FTPS server's certificate. * <p> * If the params do not contain the key for the trust manager, it will return a trust manger that simply checks this * certificate for validity. * </p> * * @param opts The FileSystemOptions. * @return the trust manager instance or {@code null} * @see org.apache.commons.net.ftp.FTPSClient#setTrustManager(TrustManager) * @since 2.1 */ public TrustManager getTrustManager(final FileSystemOptions opts) { final TrustManager trustManager; if (hasParam(opts, TRUST_MANAGER)) { trustManager = (TrustManager) getParam(opts, TRUST_MANAGER); } else { trustManager = TrustManagerUtils.getValidateServerCertificateTrustManager(); } return trustManager; }
/** * Gets the TrustManager that validates the FTPS server's certificate. * <p> * If the params do not contain the key for the trust manager, it will return a trust manger that simply checks this * certificate for validity. * </p> * * @param opts The FileSystemOptions. * @return the trust manager instance or {@code null} * @see org.apache.commons.net.ftp.FTPSClient#setTrustManager(TrustManager) * @since 2.1 */ public TrustManager getTrustManager(final FileSystemOptions opts) { final TrustManager trustManager; if (hasParam(opts, TRUST_MANAGER)) { trustManager = (TrustManager) getParam(opts, TRUST_MANAGER); } else { trustManager = TrustManagerUtils.getValidateServerCertificateTrustManager(); } return trustManager; }
/** * Gets the TrustManager that validates the FTPS server's certificate. * <p> * If the params do not contain the key for the trust manager, it will return a trust manger that simply checks this * certificate for validity. * </p> * * @param opts The FileSystemOptions. * @return the trust manager instance or {@code null} * @see org.apache.commons.net.ftp.FTPSClient#setTrustManager(TrustManager) * @since 2.1 */ public TrustManager getTrustManager(final FileSystemOptions opts) { final TrustManager trustManager; if (hasParam(opts, TRUST_MANAGER)) { trustManager = (TrustManager) getParam(opts, TRUST_MANAGER); } else { trustManager = TrustManagerUtils.getValidateServerCertificateTrustManager(); } return trustManager; }
/** * Gets the TrustManager that validates the FTPS server's certificate. * <p> * If the params do not contain the key for the trust manager, it will return a trust manger that simply checks this * certificate for validity. * </p> * * @param opts The FileSystemOptions. * @return the trust manager instance or {@code null} * @see org.apache.commons.net.ftp.FTPSClient#setTrustManager(TrustManager) * @since 2.1 */ public TrustManager getTrustManager(final FileSystemOptions opts) { final TrustManager trustManager; if (hasParam(opts, TRUST_MANAGER)) { trustManager = (TrustManager)getParam(opts, TRUST_MANAGER); } else { trustManager = TrustManagerUtils.getValidateServerCertificateTrustManager(); } return trustManager; }