Package com.ibm.websphere.ssl
Class SSLConfig
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Object,
Object>
SSLConfig is responsible for maintaining all of the properties for an
individual SSL configuration that can be used to create an SSLContext.
This class represents a single SSLConfig in the runtime. It uses an underlying Properties object to hold the data.
- Since:
- WAS 7.0
- See Also:
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
This method attempts to decode the values of any property that contains "password" in any case.boolean
This method determines if the current instance of SSLConfig equals the one passed into the equals method.This method returns the com.ibm.ssl.dynamicSelectionInfo property value.loadPropertiesFile
(String propertiesURL, boolean multiConfigURL) Load ConfigURL from a url string that names a properties file.boolean
This ensures there is at least a keystore, truststore or crypto configured.setProperty
(String name, String value, boolean processEscapeSequences) Set the given name/value pair as a property.toString()
This method prints the SSL properties to trace without printing passwords.void
This method attempts to validate a set of SSL configuration properties by trying to create an SSLContext from them.static String
validateURL
(String propertiesURL) This method tries to normalize the ConfigURL value in an attempt to correct any URL parsing errors.Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
Methods inherited from class java.util.Hashtable
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Constructor Details
-
SSLConfig
public SSLConfig()Constructor. -
SSLConfig
Constructor.- Parameters:
props
-
-
SSLConfig
Constructor.- Parameters:
configURL
-
-
-
Method Details
-
validateSSLConfig
This method attempts to validate a set of SSL configuration properties by trying to create an SSLContext from them. An error message will be printed whenever validation is enabled and it fails.- Throws:
Exception
-
requiredPropertiesArePresent
public boolean requiredPropertiesArePresent()This ensures there is at least a keystore, truststore or crypto configured.- Returns:
- boolean
-
toString
This method prints the SSL properties to trace without printing passwords. Any property that contains "password" in any case will have the value masked. -
loadPropertiesFile
Load ConfigURL from a url string that names a properties file. This method does not check that values are in valid range,- Parameters:
propertiesURL
- - the properties file to load the SSL propertiesmultiConfigURL
-- Returns:
- SSLConfig[]
-
decodePasswords
public void decodePasswords()This method attempts to decode the values of any property that contains "password" in any case. If the value is not decoded, it simply leaves it alone, otherwise the encoded value is decoded. -
validateURL
This method tries to normalize the ConfigURL value in an attempt to correct any URL parsing errors.- Parameters:
propertiesURL
-- Returns:
- String
-
getDynamicSelectionProperty
This method returns the com.ibm.ssl.dynamicSelectionInfo property value.- Returns:
- String
-
equals
This method determines if the current instance of SSLConfig equals the one passed into the equals method. This is called to verify if an SSLConfig changed when the properties. -
setProperty
Set the given name/value pair as a property. The process flag determines whether to check for and handle unicode characters in the provided value.- Parameters:
name
-value
-processEscapeSequences
-- Returns:
- Object - value stored
-