X509TrustManager


X509TrustManager javax.net.ssl

Java 1.4

This interface is a trustManager for working with X.509 certificates. Trust managers are used during the handshake phase of SSL connection to determine whether the authentication credentials presented by the remote host are trusted. This is usually done on the client-side of an SSL connection, but may also be done on the server side. Obtain an X509TRustManager either by implementing your own or from a trustManagerFactory that was created to use the "SunX509" algorithm. Applications do call the methods of this interface themselves ; instead, they simply provide an appropriate X509trustManager object to the SSLContext object that is responsible for setting up SSL connections. When the system needs to determine whether the authentication credentials presented by the remote host are trusted, it calls the methods of the trust manager.

Figure 18-20. javax.net.ssl.X509TrustManager

 public interface  X509TrustManager  extends TrustManager {  // Public Instance Methods  void  checkClientTrusted  (java.security.cert.X509Certificate[ ]  chain  ,          String  authType  ) throws java.security.cert.CertificateException;        void  checkServerTrusted  (java.security.cert.X509Certificate[ ]  chain  ,          String  authType  ) throws java.security.cert.CertificateException;        java.security.cert.X509Certificate[ ]  getAcceptedIssuers  ( );   } 



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net