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
ConstructorsConstructorDescriptionDefaultSSLEngineConfiguration(X509TlsTransportMappingConfig tlsTransportMappingConfig, TLSTMTrustManagerFactory trustManagerFactory, String defaultProtocolVersion) -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure 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:SSLEngineConfiguratorConfigure the supplied SSLEngine for TLS. Configuration includes enabled protocol(s), cipher codes, etc.- Specified by:
configurein interfaceSSLEngineConfigurator- Parameters:
sslEngine- aSSLEngineto configure.
-
getSSLContext
public SSLContext getSSLContext(boolean useClientMode, TransportStateReference transportStateReference) throws GeneralSecurityException Description copied from interface:SSLEngineConfiguratorGets the SSLContext for this SSL connection.- Specified by:
getSSLContextin interfaceSSLEngineConfigurator- Parameters:
useClientMode-trueif 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.
-