Class X509CertificateTrustManager

  • All Implemented Interfaces:
    javax.net.ssl.TrustManager, javax.net.ssl.X509TrustManager

    public class X509CertificateTrustManager
    extends java.lang.Object
    implements javax.net.ssl.X509TrustManager
    Deprecated.
    no longer used.
    This class is used to trust certificates exchanged during an SSL socket handshake. It allows the user to accept the certificate so that connections can be made without requiring the server to have a certificate signed by a CA (Verisign, Thawte, etc.).
    Author:
    Stephen M. Kennedy
    • Constructor Summary

      Constructors 
      Constructor Description
      X509CertificateTrustManager​(javax.net.ssl.TrustManager[] managers, java.security.KeyStore keyStore)
      Deprecated.
       
    • Method Summary

      Modifier and Type Method Description
      void checkClientTrusted​(java.security.cert.X509Certificate[] chain, java.lang.String type)
      Deprecated.
       
      void checkServerTrusted​(java.security.cert.X509Certificate[] chain, java.lang.String type)
      Deprecated.
      Checks the server certificate.
      java.security.cert.X509Certificate[] getAcceptedIssuers()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • X509CertificateTrustManager

        public X509CertificateTrustManager​(javax.net.ssl.TrustManager[] managers,
                                           java.security.KeyStore keyStore)
        Deprecated.
    • Method Detail

      • checkClientTrusted

        public void checkClientTrusted​(java.security.cert.X509Certificate[] chain,
                                       java.lang.String type)
                                throws java.security.cert.CertificateException
        Deprecated.
        Specified by:
        checkClientTrusted in interface javax.net.ssl.X509TrustManager
        Throws:
        java.security.cert.CertificateException
      • checkServerTrusted

        public void checkServerTrusted​(java.security.cert.X509Certificate[] chain,
                                       java.lang.String type)
                                throws java.security.cert.CertificateException
        Deprecated.
        Checks the server certificate. If it isn't trusted by the trust manager passed to the constructor, then the user will be prompted to accept the certificate.
        Specified by:
        checkServerTrusted in interface javax.net.ssl.X509TrustManager
        Parameters:
        chain - a chain
        type - a type
        Throws:
        java.security.cert.CertificateException
      • getAcceptedIssuers

        public java.security.cert.X509Certificate[] getAcceptedIssuers()
        Deprecated.
        Specified by:
        getAcceptedIssuers in interface javax.net.ssl.X509TrustManager