This is an IBM Automation portal for Integration products. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).
We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:
Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,
Post an idea.
Get feedback from the IBM team and other customers to refine your idea.
Follow the idea through the IBM Ideas process.
Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.
IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.
ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.
See this idea on ideas.ibm.com
I am requesting that the IBM MQ Java classes be enhanced to use the default SSLContext. I would expect a Java property could be introduced to enable this changed behaviour to be specified on the Java command line (eg: -DuseDefaultSSLContext=true)
Java provides the SSLContext class to represent a secure socket protocol implementation which acts as a factory for secure socket factories or SSLEngines. This class can be initialized with a set of key and trust managers and set as the default SSLContext.
However, the IBM MQ Java classes do not make use of this default SSLContext, but instead create their own.
This completely defeats the purpose of being able to configure a default SSLContext to specify specific key stores, trust stores and their passwords.
One approach to workaround this problem is to use MQConnectionFactory.setSSLSocketFactory(SSLContext.getDefault(). However, this is not a valid approach when the Java program is designed to work with any JMS provider, such as TIBCO EMS, not just IBM MQ. In this case the Java code is restricted to using the javax.jms classes.
Idea priority | High |
RFE ID | 130693 |
RFE URL | |
RFE Product | IBM MQ |
By clicking the "Post Comment" or "Submit Idea" button, you are agreeing to the IBM Ideas Portal Terms of Use.
Do not place IBM confidential, company confidential, or personal information into any field.
This has come up as a question on the IBM MQ development patterns / samples repository
https://github.com/ibm-messaging/mq-dev-patterns/issues/10
Where the proposed usage is
SSLContext sslContext = null;
try(FileInputStream keyStoreInput = new FileInputStream(keyStoreLocation);
FileInputStream trustStoreInput = new FileInputStream(trustStoreLocation)) {
KeyStore keyStore = KeyStore.getInstance("PKCS12");
keyStore.load(keyStoreInput, keystorePassword.toCharArray());
KeyStore trustStore = KeyStore.getInstance("JKS");
trustStore.load(trustStoreInput, truststorePassword.toCharArray());
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
trustManagerFactory.init(trustStore);
keyManagerFactory.init(keyStore, keystorePassword.toCharArray());
sslContext = SSLContext.getInstance("SSLv3");
// Initialize our SSL context from the key/trust managers
sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);
} catch (Exception e) {
e.printStackTrace();
}
This is something we will consider implementing as part of a broader update around JSSE capabilities in a future version of MQ.