Forum Discussion

Gurpreet_40964's avatar
Gurpreet_40964
Icon for Nimbostratus rankNimbostratus
Oct 24, 2013

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");'

 

  • Right now it's hardcoded in the client library. We provide the source so you can rebuild it if necessary for your needs.

     

    For the next release (BIG-IP 11.5), I'll build in an option in the library that you can call to not add the trustStore property.

     

    -Joe