com.myjavaworld.jftp.ssl
Class JFTPTrustManager

java.lang.Object
  extended by com.myjavaworld.jftp.ssl.JFTPTrustManager
All Implemented Interfaces:
TrustManager, X509TrustManager

public class JFTPTrustManager
extends Object
implements X509TrustManager

Author:
Sai Pullabhotla, psai [at] jMethods [dot] com To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Constructor Summary
JFTPTrustManager(JFTP jftp, String hostName)
          Creates a new instance of JFTPTrustManager.
 
Method Summary
 void checkClientTrusted(X509Certificate[] chain, String authType)
           
 void checkServerTrusted(X509Certificate[] chain, String authType)
           
 X509Certificate[] getAcceptedIssuers()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JFTPTrustManager

public JFTPTrustManager(JFTP jftp,
                        String hostName)
                 throws KeyStoreException,
                        NoSuchAlgorithmException
Creates a new instance of JFTPTrustManager.

Parameters:
jftp - JFTP instance
hostName - Host name against which the host name verification is to be done.
Throws:
KeyStoreException
NoSuchAlgorithmException
Method Detail

getAcceptedIssuers

public X509Certificate[] getAcceptedIssuers()
Specified by:
getAcceptedIssuers in interface X509TrustManager

checkClientTrusted

public void checkClientTrusted(X509Certificate[] chain,
                               String authType)
                        throws CertificateException
Specified by:
checkClientTrusted in interface X509TrustManager
Throws:
CertificateException

checkServerTrusted

public void checkServerTrusted(X509Certificate[] chain,
                               String authType)
                        throws CertificateException
Specified by:
checkServerTrusted in interface X509TrustManager
Throws:
CertificateException


Copyright © 2000-2012 jMethods, Inc.. All Rights Reserved.