Module org.snmp4j

Class TlsTrustManager

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

    Deprecated. 

    public class TlsTrustManager
    extends java.lang.Object
    implements javax.net.ssl.X509TrustManager
    The TlsTrustManager verifies the trust for clients and servers connected based on the certificates, and fingerprints provided.
    Version:
    3.3.0
    Author:
    Frank Fock
    • Constructor Detail

      • TlsTrustManager

        public TlsTrustManager​(javax.net.ssl.X509TrustManager trustManager,
                               boolean useClientMode,
                               TransportStateReference tmStateReference,
                               CounterSupport tlstmCounters,
                               TlsTmSecurityCallback<java.security.cert.X509Certificate> securityCallback)
        Deprecated. 
        Creates a new TlsTrustManager.
        Parameters:
        trustManager - the X509 trust manager to be used to validate certificates.
        useClientMode - determines if the trust is established as client (true) or server (false).
        tmStateReference - the TransportStateReference that optionally contains a TlsTmSecurityCallback which will then take precedence over the TlsTmSecurityCallback provided as parameter (which could then be null).
        tlstmCounters - the CounterSupport for recording events created by this trust manager.
        securityCallback - the TlsTmSecurityCallback to be used (if tmStateReference does not provide some) to validate peers.
    • Method Detail

      • checkClientTrusted

        public void checkClientTrusted​(java.security.cert.X509Certificate[] x509Certificates,
                                       java.lang.String s)
                                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[] x509Certificates,
                                       java.lang.String s)
                                throws java.security.cert.CertificateException
        Deprecated. 
        Specified by:
        checkServerTrusted in interface javax.net.ssl.X509TrustManager
        Throws:
        java.security.cert.CertificateException
      • getAcceptedIssuers

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

        public static java.security.cert.X509Certificate[] getAcceptedIssuers​(javax.net.ssl.X509TrustManager trustManager,
                                                                              TlsTmSecurityCallback<java.security.cert.X509Certificate> securityCallback)
        Deprecated. 
        Gets the accepted X509Certificates from the given X509TrustManager and security callback.
        Parameters:
        trustManager - a X509TrustManager providing the accepted issuers.
        securityCallback - a security callback that is ask to accept any returned issuer.
        Returns:
        a probably empty or null array of accepted issuers.
        Since:
        3.1.1
      • getSecurityCallback

        protected TlsTmSecurityCallback<java.security.cert.X509Certificate> getSecurityCallback​()
        Deprecated.