public class RhinoSsl extends Object
Modifier and Type | Field and Description |
---|---|
static String |
JAVAXSSL_KEYSTORE_ATTRIBUTE |
static String |
JAVAXSSL_KEYSTOREPASS_ATTRIBUTE |
static String |
JAVAXSSL_TRUSTSTORE_ATTRIBUTE |
static String |
JAVAXSSL_TRUSTSTOREPASS_ATTRIBUTE |
Modifier and Type | Method and Description |
---|---|
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 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 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 . |
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. |
public static final String JAVAXSSL_TRUSTSTORE_ATTRIBUTE
public static final String JAVAXSSL_TRUSTSTOREPASS_ATTRIBUTE
public static final String JAVAXSSL_KEYSTORE_ATTRIBUTE
public static final String JAVAXSSL_KEYSTOREPASS_ATTRIBUTE
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).
configProps
- checked when there are missing system propertiesIllegalArgumentException
- if there is an error reading the specified key storespublic 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.
configProps
- checked when there are missing system propertiespublic 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.
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.