- java.lang.Object
-
- org.snmp4j.transport.tls.TlsTrustManager
-
- All Implemented Interfaces:
TrustManager
,X509TrustManager
public class TlsTrustManager extends Object implements X509TrustManager
Deprecated.UseTLSTMExtendedTrustManager
instead.TheTlsTrustManager
verifies the trust for clients and servers connected based on the certificates, and fingerprints provided.- Version:
- 3.3.0
- Author:
- Frank Fock
-
-
Constructor Summary
Constructors Constructor Description TlsTrustManager(X509TrustManager trustManager, boolean useClientMode, TransportStateReference tmStateReference, CounterSupport tlstmCounters, TlsTmSecurityCallback<X509Certificate> securityCallback)
Deprecated.Creates a newTlsTrustManager
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
checkClientTrusted(X509Certificate[] x509Certificates, String s)
Deprecated.void
checkServerTrusted(X509Certificate[] x509Certificates, String s)
Deprecated.X509Certificate[]
getAcceptedIssuers()
Deprecated.static X509Certificate[]
getAcceptedIssuers(X509TrustManager trustManager, TlsTmSecurityCallback<X509Certificate> securityCallback)
Deprecated.Gets the acceptedX509Certificate
s from the givenX509TrustManager
and security callback.protected TlsTmSecurityCallback<X509Certificate>
getSecurityCallback()
Deprecated.
-
-
-
Constructor Detail
-
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 Detail
-
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
public X509Certificate[] 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
protected TlsTmSecurityCallback<X509Certificate> getSecurityCallback()
Deprecated.
-
-