Class InsecureTrustManagerFactory

java.lang.Object
javax.net.ssl.TrustManagerFactory
io.netty.handler.ssl.util.SimpleTrustManagerFactory
io.netty.handler.ssl.util.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.

  • Nested Class Summary

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final javax.net.ssl.TrustManagerFactory
     
    private static final InternalLogger
     
    private static final javax.net.ssl.TrustManager
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected javax.net.ssl.TrustManager[]
    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 Details

    • logger

      private static final InternalLogger logger
    • INSTANCE

      public static final javax.net.ssl.TrustManagerFactory INSTANCE
    • tm

      private static final javax.net.ssl.TrustManager tm
  • Constructor Details

    • InsecureTrustManagerFactory

      private InsecureTrustManagerFactory()
  • Method Details

    • 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)
    • engineGetTrustManagers

      protected javax.net.ssl.TrustManager[] engineGetTrustManagers()
      Description copied from class: SimpleTrustManagerFactory
      Returns one trust manager for each type of trust material.
      Specified by:
      engineGetTrustManagers in class SimpleTrustManagerFactory
      See Also:
      • TrustManagerFactorySpi.engineGetTrustManagers()