Passing SSL parameters as System properties.

Passing SSL parameters as System properties.

book

Article ID: KB0085207

calendar_today

Updated On:

Products Versions
TIBCO Enterprise Message Service -
Not Applicable -

Description

Description:
If a constructor with only an EMS URL is used as shown below, the following SSL parameters can be passed as System properties to the EMS client application.

new com.tibco.tibjms.TibjmsTopicConnectionFactory(serverUrl);

Note that com.tibco.tibjms.ssl.auth_only can be configured in factories by enabling the ssl_auth_only parameter, or by calling TibjmsSSL.setAuthOnly.  Refer to EMS User's Guide.


com.tibco.tibjms.ssl.verify_host
com.tibco.tibjms.ssl.verify_hostname
com.tibco.tibjms.ssl.expected_hostname
com.tibco.tibjms.ssl.identity
com.tibco.tibjms.ssl.password
com.tibco.tibjms.ssl.trace
com.tibco.tibjms.ssl.trusted
com.tibco.tibjms.ssl.vendor
com.tibco.tibjms.ssl.ciphers
com.tibco.tibjms.ssl.issuer
com.tibco.tibjms.ssl.private_key


Issue/Introduction

Passing SSL parameters as System properties.

Resolution

There are two approaches.

1). Using the Java command line:

java  -Dcom.tibco.tibjms.ssl.verify_host=false -Dcom.tibco.tibjms.ssl.trace=true  -Dcom.tibco.tibjms.ssl.identity=client_identity.p12 -Dcom.tibco.tibjms.ssl.password=password tibjmsSSL_mod

2). In a property file:

ssl.properties

==

com.tibco.tibjms.ssl.verify_host=false
com.tibco.tibjms.ssl.verify_hostname=false
com.tibco.tibjms.ssl.identity=client_identity.p12
com.tibco.tibjms.ssl.password=password

===

In the application, add the following before the createConnection call:

===

System.getProperties().load(new FileInputStream("my.properties"));
TopicConnection connection = factory.createTopicConnection(userName,password);