I am new to java and jboss
I tried these commands on my Centos5.4 final machine
where I can find the .JKS and .dat files ?
keytool -export -keystore myhost-keystore.dat -alias myhost -storetype JKS -storepass jonpassword \
-file myhost-cer
keytool -import -keystore truststore.dat -alias myhost -storetype JKS -file myhost-cert
-noprompt -keypass jonpassword -storepass jonpassword
Thanks
It looks like you’ve skipped the first step, which is to create the keystore. Following the instructions here, you should first run this command:
That will create the
myhost-keystore.datfile in the current directory. After that, you should be able run thekeytool -export ...command, which will create themyhost-cerfile, again in the current directory. And finally, thekeytool -import ...command will import that certificate into a new keystore file namedtruststore.datin the current directory.Note that JKS is a keystore type, not the name of a file.