final SSLContext ctx = SSLContext.getInstance("TLSv1");
// get the key and trust managers
final KeyManager[] kms = SSLUtils.getKeyManagers();
J2EEKeyManager[] jkms = new J2EEKeyManager[kms.length];
for (int i = 0; i < kms.length; i++) {
jkms[i] = new J2EEKeyManager((X509KeyManager)kms[i], sslc.getCertNickname());
}
final TrustManager[] tms = null; //not needed really untill we support client auth
final SecureRandom sr = null; // need to handle better?
// now initialize the SSLContext gotten above and return
ctx.init(jkms, tms, sr);