com.ibm.websphere.ssl

Class SSLConfig

  1. java.lang.Object
  2. extended byjava.util.Dictionary<K,V>
  3. extended byjava.util.Hashtable<java.lang.Object,java.lang.Object>
  4. extended byjava.util.Properties
  5. extended bycom.ibm.websphere.ssl.SSLConfig
All implemented interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>

  1. public class SSLConfig
  2. extends java.util.Properties
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:
Serialized Form

Constructor Summary

Constructor and Description
SSLConfig()
Constructor.
SSLConfig(java.util.Properties props)
Constructor.
SSLConfig(java.lang.String configURL)
Constructor.

Method Summary

Modifier and Type Method and Description
  1. void
decodePasswords()
This method attempts to decode the values of any property that contains "password" in any case.
  1. boolean
equals(java.lang.Object config)
This method determines if the current instance of SSLConfig equals the one passed into the equals method.
  1. java.lang.String
getDynamicSelectionProperty()
This method returns the com.ibm.ssl.dynamicSelectionInfo property value.
  1. SSLConfig[]
loadPropertiesFile(java.lang.String propertiesURL,boolean multiConfigURL)
Load ConfigURL from a url string that names a properties file.
  1. boolean
requiredPropertiesArePresent()
This ensures there is at least a keystore, truststore or crypto configured.
  1. java.lang.Object
setProperty(java.lang.String name,java.lang.String value,boolean processEscapeSequences)
Set the given name/value pair as a property.
  1. java.lang.String
toString()
This method prints the SSL properties to trace without printing passwords.
  1. void
validateSSLConfig()
This method attempts to validate a set of SSL configuration properties by trying to create an SSLContext from them.
  1. static
  2. java.lang.String
validateURL(java.lang.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, contains, containsKey, containsValue, elements, entrySet, get, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, values
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SSLConfig

  1. public SSLConfig()
Constructor.

SSLConfig

  1. public SSLConfig(java.util.Properties props)
Constructor.
Parameters:
props -

SSLConfig

  1. public SSLConfig(java.lang.String configURL)
Constructor.
Parameters:
configURL -

Method Detail

validateSSLConfig

  1. public void validateSSLConfig()
  2. throws java.lang.Exception
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:
java.lang.Exception

requiredPropertiesArePresent

  1. public boolean requiredPropertiesArePresent( )
This ensures there is at least a keystore, truststore or crypto configured.
Returns:
boolean

toString

  1. public java.lang.String 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.
Overrides:
toString in class java.util.Hashtable<java.lang.Object,java.lang.Object>
Returns:
String
See Also:
Object.toString()

loadPropertiesFile

  1. public SSLConfig[] loadPropertiesFile( java.lang.String propertiesURL,
  2. boolean multiConfigURL)
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 properties
multiConfigURL -
Returns:
SSLConfig[]

decodePasswords

  1. 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

  1. public static java.lang.String validateURL( java.lang.String propertiesURL)
This method tries to normalize the ConfigURL value in an attempt to correct any URL parsing errors.
Parameters:
propertiesURL -
Returns:
String

getDynamicSelectionProperty

  1. public java.lang.String getDynamicSelectionProperty( )
This method returns the com.ibm.ssl.dynamicSelectionInfo property value.
Returns:
String

equals

  1. public boolean equals(java.lang.Object config)
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.
Specified by:
equals in interface java.util.Map<java.lang.Object,java.lang.Object>
Overrides:
equals in class java.util.Hashtable<java.lang.Object,java.lang.Object>
Parameters:
config -
Returns:
boolean

setProperty

  1. public java.lang.Object setProperty( java.lang.String name,
  2. java.lang.String value,
  3. boolean processEscapeSequences)
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