book
Article ID: KB0092490
calendar_today
Updated On:
Description
Resolution:
If your application does not explicitly set a SSL related parameter, you can use the system property to set SSL parameters to achieve the same functionality. For example, the following can be added to the JVM args for the Java client:
-Dcom.tibco.tibjms.ssl.trusted=/path/to/trusted.1
-Dcom.tibco.tibjms.ssl.trusted2=/path/to/trusted.1
-Dcom.tibco.tibjms.ssl.trusted3=/path/to/trusted.1
-Dcom.tibco.tibjms.ssl.verify_host=disabled
-Dcom.tibco.tibjms.ssl.trace=enabled
Alternatively, you can set them programmatically via:
System.setProperty("key","value");
Note, to be able to utilize such an approach, make sure there is no explicit SSL parameters being set in the application code. That is, you cannot call any of the method in TibjmsSSL to set ssl params [ for example, TibjmsSSL.addTrustedCerts().]; or initialize an environment hashtable and pass to either the JNDI InitialContext or the ConnectionFactory creation call, e.g.
//JNDI
Hashtable env = new Hashtable();
env.put(com.tibco.tibjms.TibjmsSSL.TRUSTED_CERTIFICATES, ssl_trusted);
InitialContext jndiContext = new InitialContext(env);
//ConnectionFactory
Hashtable env = new Hashtable();
env.put(com.tibco.tibjms.TibjmsSSL.TRUSTED_CERTIFICATES, ssl_trusted);
TopicConnectionFactory factory = new com.tibco.tibjms.TibjmsTopicConnectionFactory(serverUrl,null,env);
For a full list of system properties related to SSL , consult TIBCO Support for further information.
Issue/Introduction
How to set SSL parameters for an EMS Java client via the system property.