3

I have a Java application that connects to webMethods IS via SSL.

public static QueueConnection createSSLEnabledQueueConnectionToWebmethods(Context context, String username, String password, Properties props, String factoryName) throws Exception
{
    String pathToKeyStore = props.getProperty("keystore.path");
    String pathToTrustStore = props.getProperty("truststore.path");
     WmConnectionFactoryImpl factory = (WmConnectionFactoryImpl)
            context.lookup(factoryName);
    ((WmConnectionFactoryImpl)factory).setSSLKeystore(pathToKeyStore);
    ((WmConnectionFactoryImpl)factory).setSSLTruststore(pathToTrustStore);
    ((WmConnectionFactoryImpl)factory).setSSLEncrypted(true);
    return ((WmConnectionFactoryImpl)factory).createQueueConnection(username, password);
}

I have a keyStore.p12 file and a TrustStore.jks file that have been working for years in our Production environment (and still work with previous application builds).

In our Test environment, with the new application build, I can use the above keyStore and TrustStore files to establish SSL connection with webMethods. however, in the Production environment, the exact application installation results in the below error:

javax.jms.JMSSecurityException: [BRM.10.5061] JMS: SSL certificate "keystore.p12": bad certificate. at com.webmethods.jms.protocol.link.LinkSsl.createSslContext(LinkSsl.java:377) at com.webmethods.jms.protocol.link.LinkSsl.connect(LinkSsl.java:112) at com.webmethods.jms.protocol.ProtocolHandler.connect(ProtocolHandler.java:218) at com.webmethods.jms.protocol.BinaryProtocolHandler.connect(BinaryProtocolHandler.java:1950) at com.webmethods.jms.impl.WmConnectionImpl.connect(WmConnectionImpl.java:302) at com.webmethods.jms.impl.WmConnectionImpl.initConnection(WmConnectionImpl.java:280) at com.webmethods.jms.impl.WmConnectionImpl.(WmConnectionImpl.java:219) at com.webmethods.jms.impl.WmConnectionImpl.(WmConnectionImpl.java:193) at com.webmethods.jms.impl.WmQueueConnectionImpl.(WmQueueConnectionImpl.java:44) at com.webmethods.jms.impl.WmConnectionFactoryImpl.createQueueConnection(WmConnectionFactoryImpl.java:328)

Given the same application build and same key/truststore files (both configured to connect to PROD webMethods), I have the following test results:

In the TEST environment:

  1. Full application start-up with SSL connection => SUCCESSFUL
  2. Test harness performing SSL connection only => SUCCESSFUL

In the PRODUCTION environment:

  1. Full application start-up with SSL connection => FAILURE >>> bad certificate
  2. Test harness performing SSL connection only => SUCCESSFUL

I am wondering if there is anything in the JDK that could be causing the inconsistent behaviour in the PRODUCTION environment? Or is there any useful knowledge out there around the very vague "bad certificate" error?

nellaye
  • 31
  • 1

0 Answers0