//XXX need to revisit if the value should be cached
return System.getProperty(KEYSTORE_PASS_PROP, "changeit");
}
private SSLContext getSSLContext(SipBindingCtx sipBindingCtx) {
ServerSocketFactory serverSF = null;
try {
//TODO This expects that the ServerSocketFactory initialized
//is a seperated instance. A brief check of the grizzly
//classes involved reveals that it is for the default JSSE14 factories
SSLImplementation sslHelper = SSLImplementation.getInstance();
serverSF = sslHelper.getServerSocketFactory();
serverSF.setAttribute("keystoreType", "JKS");
serverSF.setAttribute("keystore", keyStore);
serverSF.setAttribute("keystorePass", keypass);
serverSF.setAttribute("keypass", keypass);
serverSF.setAttribute("truststoreType", "JKS");
serverSF.setAttribute("truststore", trustStore);
String keyAlias = sipBindingCtx.getSSLAttribute("CertNickname");
serverSF.setAttribute("keyAlias",
((keyAlias != null) ? keyAlias : "s1as")); //Default GF s1sa
serverSF.init();
} catch (IOException e) {
//TODO Logging
} catch (ClassNotFoundException e) {
//TODO Logging
}
return serverSF.getSSLContext();
}