Handling self-signed certs with java and iControl
Hi folks -- I'd like to write a couple simple java classes to automate some tasks in our F5 LTM (such as enabling/disabling certain nodes).
To get started I downloaded iControlAssembly_11_3_0-Java.zip, extracted it, and added the iControl.jar and 3rd party (axis.jar,etc) to my development environment, and wrote a simple java program based on one of the examples, to get system info.
The problem I'm hitting is this: we are using a self-signed cert with our F5 LTM, as it's used in a test environment. When I run the java program I get this exception:
AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: javax.net.ssl.SSLException: hostname in certificate didn't match: < myf5hostname> != faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:javax.net.ssl.SSLException: hostname in certificate didn't match: != at org.apache.axis.components.net.JSSESocketFactory.verifyHostName(JSSESocketFactory.java:351)at org.apache.axis.components.net.JSSESocketFactory.verifyHostName(JSSESocketFactory.java:287)at org.apache.axis.components.net.JSSESocketFactory.verifyHostName(JSSESocketFactory.java:270)at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:216)
Any thoughts on how I can easily handle this? I'm not sure how to override the Apache SSL verification process, or where to get started, even. :(
Thx!