Version
SslConfiguration
public class SslConfiguration
extends java.lang.Object
Provides a flexible SSL/TLS configuration model for securing SMPP connections. This class allows fine-tuning of protocols, cipher suites, authentication, and certificate validation behavior. It supports both one-way and two-way SSL.
Fields:
DEFAULT_KEYMANAGERFACTORY_ALGORITHM, DEFAULT_TRUSTMANAGERFACTORY_ALGORITHM
Constructor:
public SslConfiguration()
Initializes a new, empty SSL configuration with default settings.
Methods:
Protocol Configuration |
|
public String getProtocol() | Returns the SSL protocol (e.g., TLSv1.3). |
setProtocol(String protocol) | Sets the SSL protocol. |
public String[] getIncludeProtocols() | Returns the list of explicitly included protocols. |
public void setIncludeProtocols(String... protocols) | Sets protocols to include. |
public String[] getExcludeProtocols() | Returns protocols to be excluded. |
public void setExcludeProtocols(String... protocols) | Sets protocols to exclude. |
public void addExcludeProtocols(String... protocol) | Adds to the list of excluded protocols. |
Cipher Suite Configuration |
|
public String[] getIncludeCipherSuites() | Returns cipher suites to be included. |
public void setIncludeCipherSuites(String... cipherSuites) | Sets cipher suites to include. |
public String[] getExcludeCipherSuites() | Returns cipher suites to be excluded. |
public void setExcludeCipherSuites(String... cipherSuites) | Sets cipher suites to exclude. |
public void addExcludeCipherSuites(String... cipher) | Adds to the list of excluded cipher suites. |
Keystore / Truststore Configuration |
|
public String getKeyStorePath() | Returns the path to the keystore file. |
public void setKeyStorePath(String keyStorePath) | Sets the keystore file path. |
public String getKeyStoreProvider() | Returns the keystore provider. |
public void setKeyStoreProvider(String keyStoreProvider) | Sets the keystore provider. |
public String getKeyStoreType() | Returns the keystore type (e.g., JKS, PKCS12). |
public void setKeyStoreType(String keyStoreType) | Sets the keystore type. |
public String getKeyStorePassword() | Returns the keystore password. |
public void setKeyStorePassword(String password) | Sets the keystore password. |
public String getKeyManagerPassword() | Returns the key manager password. |
public void setKeyManagerPassword(String password) | Sets the key manager password. |
public String getKeyManagerFactoryAlgorithm() | Returns the algorithm for the KeyManagerFactory. |
public void setKeyManagerFactoryAlgorithm(String algorithm) | Sets the KeyManagerFactory algorithm. |
public String getTrustStorePath() | Returns the path to the truststore file. |
public void setTrustStorePath(String trustStorePath) | Sets the truststore path. |
public String getTrustStoreProvider() | Returns the truststore provider. |
public void setTrustStoreProvider(String trustStoreProvider) | Sets the truststore provider. |
public String getTrustStoreType() | Returns the truststore type. |
public void setTrustStoreType(String trustStoreType) | Sets the truststore type. |
public String getTrustStorePassword() | Returns the truststore password. |
public void setTrustStorePassword(String password) | Sets the truststore password. |
public String getTrustManagerFactoryAlgorithm() | Returns the algorithm for the TrustManagerFactory. |
public void setTrustManagerFactoryAlgorithm(String algorithm) | Sets the TrustManagerFactory algorithm. |
Certificate and Authentication |
|
public String getCertAlias() | Gets the alias for the certificate in the keystore. |
public void setCertAlias(String certAlias) | Sets the certificate alias. |
public boolean getNeedClientAuth() | Returns whether client authentication is required. |
public void setNeedClientAuth(boolean needClientAuth) | Enables or disables required client auth. |
public boolean getWantClientAuth() | Returns whether client authentication is requested (but not mandatory). |
public void setWantClientAuth(boolean wantClientAuth) | Enables or disables optional client auth. |
public boolean isValidateCerts() | Indicates if certificate validation is enabled. |
public void setValidateCerts(boolean validateCerts) | Enables or disables cert validation. |
public boolean isValidatePeerCerts() | Returns if peer cert validation is active. |
public void setValidatePeerCerts(boolean validatePeerCerts) | Enables/disables peer certificate checks. |
public boolean isTrustAll() | Returns whether all certificates are trusted (insecure). |
public void setTrustAll(boolean trustAll) | Enables/disables trust-all behavior. |
Certificate Revocation and Security Extensions |
|
public String getCrlPath() | Returns the CRL file path. |
public void setCrlPath(String crlPath) | Sets the certificate revocation list file path. |
public int getMaxCertPathLength() | Gets the max allowed certificate path length. |
public void setMaxCertPathLength(int maxCertPathLength) | Sets max path length for cert chains. |
public boolean isEnableCRLDP() | Returns whether CRLDP (CRL Distribution Point) is enabled. |
public void setEnableCRLDP(boolean enableCRLDP) | Enables/disables CRLDP. |
public boolean isEnableOCSP() | Returns whether OCSP (Online Certificate Status Protocol) is enabled. |
public void setEnableOCSP(boolean enableOCSP) | Enables/disables OCSP. |
public String getOcspResponderURL() | Returns the OCSP responder URL. |
public void setOcspResponderURL(String ocspResponderURL) | Sets the URL for OCSP queries. |
Session Settings |
|
public boolean isAllowRenegotiate() | Returns whether SSL renegotiation is allowed. |
setAllowRenegotiatepublic void (boolean allowRenegotiate) | Enables or disables renegotiation. |
public boolean isSessionCachingEnabled() | Indicates whether SSL session caching is used. |
public void setSessionCachingEnabled(boolean enableSessionCaching) | Enables/disables session caching. |
public int getSslSessionCacheSize() | Returns the SSL session cache size. |
public void setSslSessionCacheSize(int sslSessionCacheSize) | Sets the session cache size. |
public int getSslSessionTimeout() | Returns the SSL session timeout in seconds. |
public void setSslSessionTimeout(int sslSessionTimeout) | Sets the session timeout duration. |
Provider and Randomness |
|
public String getProvider() | Returns the name of the SSL provider. |
public void setProvider(String provider) | Sets the SSL provider name. |
public String getSecureRandomAlgorithm() | Returns the secure random algorithm name. |
public void setSecureRandomAlgorithm(String algorithm) | Sets the secure random algorithm. |
Methods inherited from class java.lang.Object |
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Start innovating with Mobius
What's next? Let's talk!