Package com.opencloud.slee.remote
Class RhinoSsl
- java.lang.Object
-
- com.opencloud.slee.remote.RhinoSsl
-
public class RhinoSsl extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
JAVAXSSL_KEYSTORE_ATTRIBUTE
static String
JAVAXSSL_KEYSTOREPASS_ATTRIBUTE
static String
JAVAXSSL_TRUSTSTORE_ATTRIBUTE
static String
JAVAXSSL_TRUSTSTOREPASS_ATTRIBUTE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkSslProperties(String storeDirectory, Properties configProps)
Verifies that required system properties are set, and if they are not, attempt to set them using the supplied properties.static void
checkSslProperties(Properties configProps)
Verifies that required system properties are set, and if they are not, attempt to set them using the supplied properties.static Properties
createSslProperties(String storeDirectory, String trustStore, String trustStorePass, String keyStore, String keyStorePass)
Create a new properties object to be passed to the `RhinoConnectionFactory.connect( ... )` methods that require an SSL properties object.static Properties
createSslProperties(String storeDirectory, Properties properties)
Create a new properties object using the given properties, with the key store file names made relative to `storeDirectory`.
-
-
-
Field Detail
-
JAVAXSSL_TRUSTSTORE_ATTRIBUTE
public static final String JAVAXSSL_TRUSTSTORE_ATTRIBUTE
- See Also:
- Constant Field Values
-
JAVAXSSL_TRUSTSTOREPASS_ATTRIBUTE
public static final String JAVAXSSL_TRUSTSTOREPASS_ATTRIBUTE
- See Also:
- Constant Field Values
-
JAVAXSSL_KEYSTORE_ATTRIBUTE
public static final String JAVAXSSL_KEYSTORE_ATTRIBUTE
- See Also:
- Constant Field Values
-
JAVAXSSL_KEYSTOREPASS_ATTRIBUTE
public static final String JAVAXSSL_KEYSTOREPASS_ATTRIBUTE
- See Also:
- Constant Field Values
-
-
Method Detail
-
checkSslProperties
public static void checkSslProperties(Properties configProps)
Verifies that required system properties are set, and if they are not, attempt to set them using the supplied properties. Once set, these properties cannot be changed, and the keystore files will be read only once -- if a store changes on disk the application must be restarted (this is default Java behaviour and cannot be changed).- Parameters:
configProps
- checked when there are missing system properties- Throws:
IllegalArgumentException
- if there is an error reading the specified key stores
-
checkSslProperties
public static void checkSslProperties(String storeDirectory, Properties configProps)
Verifies that required system properties are set, and if they are not, attempt to set them using the supplied properties. If `storeDirectory` is not null, make key store file names relative to the given directory before checking they exist.- Parameters:
configProps
- checked when there are missing system properties
-
createSslProperties
public static Properties createSslProperties(String storeDirectory, Properties properties)
Create a new properties object using the given properties, with the key store file names made relative to `storeDirectory`. If `storeDirectory` is null, `properties` is returned unchanged.- Returns:
- a new properties object with updated file names
-
createSslProperties
public static Properties createSslProperties(String storeDirectory, String trustStore, String trustStorePass, String keyStore, String keyStorePass)
Create a new properties object to be passed to the `RhinoConnectionFactory.connect( ... )` methods that require an SSL properties object. If storeDirectory is not null, make the key stores file name properties relative to the given directory when adding them to the properties object.- Returns:
- a properties object containing given properties
-
-