Jump to content

What is the proper java code for connecting to EMS using SSL


John Huh 2

Recommended Posts

What is the proper java code for connecting to EMS using SSL

 

TibjmsAdmin(java.lang.Stringurl, java.lang.StringuserName, java.lang.Stringpassword, java.util.MapsslParams)

 

I can't figure out how to code the sslParams part.

 

Thanks in advance.

 

/john

Link to comment
Share on other sites

  • 3 years later...

The proper way would be like this:

Map sslParams = new Hashtable();

sslParams.put(TibjmsSSL.TRUSTED_CERTIFICATES, trustedCAs);

sslParams.put(TibjmsSSL.ENABLE_VERIFY_HOST_NAME, true);

sslParams.put(TibjmsSSL.ENABLE_VERIFY_HOST, false);

// Establish a connection.

TibjmsAdmin admin = new TibjmsAdmin(brokerUrl, user, pass, sslParams));

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...