java.lang.Object
org.snmp4j.transport.tls.DefaultSSLEngineConfiguration
- All Implemented Interfaces:
SSLEngineConfigurator
The
DefaultSSLEngineConfiguration
implements the SSL engine configuration based on
X509Certificate
trust management.- Since:
- 3.6.0
- Author:
- Frank Fock
-
Constructor Summary
ConstructorDescriptionDefaultSSLEngineConfiguration
(X509TlsTransportMappingConfig tlsTransportMappingConfig, TLSTMTrustManagerFactory trustManagerFactory, String defaultProtocolVersion) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Configure the supplied SSLEngine for TLS.getSSLContext
(boolean useClientMode, TransportStateReference transportStateReference) Gets the SSLContext for this SSL connection.
-
Constructor Details
-
DefaultSSLEngineConfiguration
public DefaultSSLEngineConfiguration(X509TlsTransportMappingConfig tlsTransportMappingConfig, TLSTMTrustManagerFactory trustManagerFactory, String defaultProtocolVersion)
-
-
Method Details
-
getDefaultProtocolVersion
-
getTlsTransportMappingConfig
-
getTrustManagerFactory
-
configure
Description copied from interface:SSLEngineConfigurator
Configure the supplied SSLEngine for TLS. Configuration includes enabled protocol(s), cipher codes, etc.- Specified by:
configure
in interfaceSSLEngineConfigurator
- Parameters:
sslEngine
- aSSLEngine
to configure.
-
getSSLContext
public SSLContext getSSLContext(boolean useClientMode, TransportStateReference transportStateReference) throws GeneralSecurityException Description copied from interface:SSLEngineConfigurator
Gets the SSLContext for this SSL connection.- Specified by:
getSSLContext
in interfaceSSLEngineConfigurator
- Parameters:
useClientMode
-true
if the connection is established in client mode.transportStateReference
- the transportStateReference with additional security information for the SSL connection to establish.- Returns:
- the SSLContext.
- Throws:
GeneralSecurityException
- if the TLS context initialization failed because of configuration errors.
-