public class SSLHelper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SSLHelper.ErrorCode
Detailed return codes.
|
| Modifier | Constructor and Description |
|---|---|
private |
SSLHelper()
Private constructor to disallow instantiation.
|
| Modifier and Type | Method and Description |
|---|---|
static SSLHelper.ErrorCode |
initKeyManagers(java.security.KeyStore ks,
java.lang.String pw,
java.lang.Object[] result)
Initialize the key manager array using the given key store.
|
static SSLHelper.ErrorCode |
loadKeyStoreFromFile(java.security.KeyStore ks,
java.lang.String fname,
java.lang.String pw)
Given a valid key store instance and a filename to an existing file that
is a valid keystore, the contents will be loaded from the file system.
|
public static SSLHelper.ErrorCode loadKeyStoreFromFile(java.security.KeyStore ks, java.lang.String fname, java.lang.String pw)
ks - The in-memory key store into which to load.fname - The filename of the file system resource that contains the key
store from which to load.pw - A valid password needed to decrypt the contents during load or
null if no password is needed.ErrorCode.NO_ERROR on success, otherwise a descriptive
return code to explain the failure.public static SSLHelper.ErrorCode initKeyManagers(java.security.KeyStore ks, java.lang.String pw, java.lang.Object[] result)
ks - Key store from which to initialize the key managers.pw - Key entry password or null if not needed.result - An array into which the key manager array reference can be returned. The
array size must be at least 1 element and the 0 index element will be
replaced with a KeyManager[] reference on success.ErrorCode.NO_ERROR on success, otherwise a descriptive
return code to explain the failure.