Gurpreet_40964
Oct 24, 2013Nimbostratus
I need to know how we can alter the default behaviour of Icontrol api, when setting SSL configuration
Its very uncomfortable to use iControl api in an application which is installed in websphere. Reason being below code in Interfaces.java:
//------------------------------------------------------------------- // Constructor //------------------------------------------------------------------- public Interfaces() { System.setProperty("javax.net.ssl.trustStore", System.getProperty("user.home") + "/.keystore"); XTrustProvider.install(); }
public Interfaces(String hostname, String username, String password)
{
System.setProperty("javax.net.ssl.trustStore", System.getProperty("user.home") + "/.keystore");
XTrustProvider.install();
initialize(hostname, username, password);
}
public Interfaces(String hostname, long port, String username, String password)
{
System.setProperty("javax.net.ssl.trustStore", System.getProperty("user.home") + "/.keystore");
XTrustProvider.install();
initialize(hostname, port, username, password);
}
As you can see api automatically sets truststore path (System.setProperty("javax.net.ssl.trustStore", System.getProperty("user.home") + "/.keystore");) , It alters default behavior of Websphere. We get following error:
[9/19/13 10:47:27:638 MST] 00000022 SystemOut O ; nested exception is:
java.net.SocketException: java.lang.Exception: Truststore file does not exist: /home/wsadmin/.keystore
We have explicitly set keystore for websphere but still its looking into /home/wsadmin as this is getting set in interface. java.
So in short is there any way to unset 'System.setProperty("javax.net.ssl.trustStore", System.getProperty("user.home") + "/.keystore");'