I have generated certificate,public key and trust store for server1 and server2 as per the commands mention above
BUT
While I am trying to combine both public certs to the trust store as per the commands mention in Step 9
Combine
Step 9: Add both public cert to the truststore .
keytool -import -alias Server1 -file D:\Certificates\Server1_publickey.cer -keystore D:\Certificates\Server2_trustore.jks ( This command is working good BUT 2nd commands failing with below exception)
keytool -import -alias Server2 -file D:\Certificates\Server2_publickey.cer -keystore D:\Certificates\Server1_trustore.jks
keytool -list -v -keystore D:\Certificates\Server2_trustore.jks
Exception while combining both public certs to trust store? Pls explain why it’s failing or how to combine both public certs to trust store ?
D:\webMethods\jvm\jvm\jre\bin>keytool -import -alias Server2 -file D:\Certificates\Server2_publickey.cer -keystore D:\Certificates\Server1_trustore.jks
Enter keystore password:
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect
WM Env : 9.7
This is just a POC so,I kept password similar from step 1 to step 9 and even had tried on different webMethods installation directory where keytool utility is present.
commands in step 1-8 is working fine but while executing step 9 command
Is it full/single commands or combination of 2 commands which we have to execute individually ?
D:\webMethods\jvm\jvm\jre\bin>keytool -import -alias Server1 -file D:\Certificates\Server1_publickey.cer -keystore D:\Certificates\Server2_trustore.jks
Enter keystore password: → Working good but when i enter next line/commands shown below it’s failing with exception
D:\webMethods\jvm\jvm\jre\bin>keytool -import -alias Server2 -file D:\Certificates\Server2_publickey.cer -keystore D:\Certificates\Server1_trustore.jks
Enter keystore password:
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect
what does “keytool -list -v -keystore D:\Certificates\Server1_trustore.jks” return instead “keytool -list -v -keystore D:\Certificates\Server2_trustore.jks”?
What did “keytool -list -v -keystore D:\Certificates\Server2_trustore.jks” in the previous try?
I cannot see any thing wrong with the original commands, so I guess there must have been a typo in at least one of the passwords used in the first 8 steps which causes the error message in step 9.
Did you try to re-create the truststores and try step 9 again?.
Must likely you will only need to create one single truststore for both certificates:
keytool -import -trustcacerts -alias Server1 -file D:\Certificates\Server1_publickey.cer -keystore D:\Certificates\Servers_trustore.jks
keytool -import -trustcacerts -alias Server2 -file D:\Certificates\Server2_publickey.cer -keystore D:\Certificates\Servers_trustore.jks
keytool -list -v -keystore D:\Certificates\Servers_trustore.jks
Yeah, I have tried twice but get struck while combining certs into trust store at step 9
While I am trying to combine both certs into single trust store file by using step 9 command but no luck Can you tell me what was the wrong in below command ?
-noprompt do not prompt
-trustcacerts trust certificates from cacerts
-protected password through protected mechanism
-alias alias name of the entry to process
-file input file name
-keypass key password
-keystore keystore name
-storepass keystore password
-storetype keystore type
-providername provider name
-providerclass provider class name
-providerarg provider argument
-providerpath provider classpath
-v verbose output
-noprompt do not prompt
-trustcacerts trust certificates from cacerts
-protected password through protected mechanism
-alias alias name of the entry to process
-file input file name
-keypass key password
-keystore keystore name
-storepass keystore password
-storetype keystore type
-providername provider name
-providerclass provider class name
-providerarg provider argument
-providerpath provider classpath
-v verbose output