java.lang.Object
org.snmp4j.transport.tls.TlsTrustManager
- All Implemented Interfaces:
TrustManager
,X509TrustManager
Deprecated.
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 Summary
ConstructorDescriptionTlsTrustManager
(X509TrustManager trustManager, boolean useClientMode, TransportStateReference tmStateReference, CounterSupport tlstmCounters, TlsTmSecurityCallback<X509Certificate> securityCallback) Deprecated.Creates a newTlsTrustManager
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkClientTrusted
(X509Certificate[] x509Certificates, String s) Deprecated.void
checkServerTrusted
(X509Certificate[] x509Certificates, String s) Deprecated.Deprecated.static X509Certificate[]
getAcceptedIssuers
(X509TrustManager trustManager, TlsTmSecurityCallback<X509Certificate> securityCallback) Deprecated.Gets the acceptedX509Certificate
s from the givenX509TrustManager
and security callback.protected TlsTmSecurityCallback
<X509Certificate> Deprecated.
-
Constructor Details
-
TlsTrustManager
public TlsTrustManager(X509TrustManager trustManager, boolean useClientMode, TransportStateReference tmStateReference, CounterSupport tlstmCounters, TlsTmSecurityCallback<X509Certificate> securityCallback) Deprecated.Creates a newTlsTrustManager
.- 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
- theTransportStateReference
that optionally contains aTlsTmSecurityCallback
which will then take precedence over theTlsTmSecurityCallback
provided as parameter (which could then benull
).tlstmCounters
- theCounterSupport
for recording events created by this trust manager.securityCallback
- theTlsTmSecurityCallback
to be used (iftmStateReference
does not provide some) to validate peers.
-
-
Method Details
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException Deprecated.- Specified by:
checkClientTrusted
in interfaceX509TrustManager
- Throws:
CertificateException
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException Deprecated.- Specified by:
checkServerTrusted
in interfaceX509TrustManager
- Throws:
CertificateException
-
getAcceptedIssuers
Deprecated.- Specified by:
getAcceptedIssuers
in interfaceX509TrustManager
-
getAcceptedIssuers
public static X509Certificate[] getAcceptedIssuers(X509TrustManager trustManager, TlsTmSecurityCallback<X509Certificate> securityCallback) Deprecated.Gets the acceptedX509Certificate
s from the givenX509TrustManager
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
Deprecated.
-
TLSTMExtendedTrustManager
instead.