Class InsecureTrustManagerFactory


  • public final class InsecureTrustManagerFactory
    extends SimpleTrustManagerFactory
    An insecure TrustManagerFactory that trusts all X.509 certificates without any verification.

    NOTE: Never use this TrustManagerFactory in production. It is purely for testing purposes, and thus it is very insecure.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static javax.net.ssl.TrustManagerFactory INSTANCE  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected javax.net.ssl.TrustManager[] engineGetTrustManagers()
      Returns one trust manager for each type of trust material.
      protected void engineInit​(java.security.KeyStore keyStore)
      Initializes this factory with a source of certificate authorities and related trust material.
      protected void engineInit​(javax.net.ssl.ManagerFactoryParameters managerFactoryParameters)
      Initializes this factory with a source of provider-specific key material.
      • Methods inherited from class javax.net.ssl.TrustManagerFactory

        getAlgorithm, getDefaultAlgorithm, getInstance, getInstance, getInstance, getProvider, getTrustManagers, init, init
      • Methods inherited from class java.lang.Object

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

      • INSTANCE

        public static final javax.net.ssl.TrustManagerFactory INSTANCE
    • Method Detail

      • engineInit

        protected void engineInit​(java.security.KeyStore keyStore)
                           throws java.lang.Exception
        Description copied from class: SimpleTrustManagerFactory
        Initializes this factory with a source of certificate authorities and related trust material.
        Specified by:
        engineInit in class SimpleTrustManagerFactory
        Throws:
        java.lang.Exception
        See Also:
        TrustManagerFactorySpi.engineInit(KeyStore)
      • engineInit

        protected void engineInit​(javax.net.ssl.ManagerFactoryParameters managerFactoryParameters)
                           throws java.lang.Exception
        Description copied from class: SimpleTrustManagerFactory
        Initializes this factory with a source of provider-specific key material.
        Specified by:
        engineInit in class SimpleTrustManagerFactory
        Throws:
        java.lang.Exception
        See Also:
        TrustManagerFactorySpi.engineInit(ManagerFactoryParameters)