Hello,
Over the past few days, I've spent a lot of time working on this issue.
On my laptop, I ran cross-checks on certificates, store formats, creation syntax, MQ Explorer versions, and more.
The goal was to create a documented, reproducible process.
Environment:
- Windows 11 Pro 35 H2
- IBM MQ version 9.4.2
- MQ Explorer versions 9.4.0.0, 9.4.4, 9.4.5
Here is a summary of my findings:
If you create a JKS keystore directly using runmqktool, the password is not recognized in MQ Explorer.
However, if you create a PKCS12 keystore using runmqakm and then convert that keystore to JKS using runmqktool, there are no longer any password issues with MQ Explorer.
Example 1: Direct JKS
runmqktool -importcert -keystore magcli1b.jks -storepass Pangolin19 -alias “CA_OFDC_A” -file CA_OFDC_A.crt -storetype JKS
(the storetype parameter is important; otherwise, by default a PKCS12 keystore is created)
runmqktool -importkeystore -srckeystore CLIS1.p12 -srcstoretype PKCS12 -srcstorepass mqseries -destkeystore magcli1b.jks -deststorepass Pangolin19 -deststoretype jks
runmqktool -list -storetype jks -keystore magcli1b.jks -storepass Pangolin19
Certificates detected
* default, - personal, ! secure, # secret key
! CA_OFDC_A
- clientmq1
--> The keystore password is therefore: Pangolin19
Using this keystore in MQ Explorer:
The keystore file could not be opened using the specified password (AMQ4508).
Example 2: PKCS12 -> JKS
runmqakm -keydb -create -db magcli1a.p12 -pw Pangolin19 -type pkcs12
runmqakm -cert -add -db magcli1a.p12 -pw Pangolin19 -label “CA_OFDC_A” -file CA_OFDC_A.crt -format ascii -fips
runmqakm -cert -import -file CLIS1.p12 -pw mqseries -type pkcs12 -target magcli1a.p12 -target_pw Pangolin19 -target_type pkcs12
runmqakm -cert -list -db magcli1a.p12 -pw Pangolin19
Certificates detected
* default, - personal, ! secure, # secret key
! CA_OFDC_A
- clientmq1
runmqktool -importkeystore -srckeystore magcli1a.p12 -srcstoretype pkcs12 -srcstorepass Pangolin19 -destkeystore magcli1a.jks -deststoretype jks -deststorepass Pangolin19
Using this keystore in MQ Explorer: ok
--> These tests are fully reproducible (on my laptop and on a Windows administration workstation)
I have a feeling that the way runmqktool (and therefore keytool) encrypts passwords isn't compatible with MQ Explorer.
Any ideas ?
Thanks in advance.