mebada
mebada

Reputation: 2378

dummy questions about keystore?

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

Upvotes: 2

Views: 2841

Answers (2)

Jason Day
Jason Day

Reputation: 8839

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:

keytool -genkey -dname "CN=myhost.mycorp.com" -keystore myhost-keystore.dat -validity 3650 -alias myhost \
-keyalg DSA -storetype JKS -keypass jonpassword -storepass jonpassword

That will create the myhost-keystore.dat file in the current directory. After that, you should be able run the keytool -export ... command, which will create the myhost-cer file, again in the current directory. And finally, the keytool -import ... command will import that certificate into a new keystore file named truststore.dat in the current directory.

Note that JKS is a keystore type, not the name of a file.

Upvotes: 2

ring bearer
ring bearer

Reputation: 20783

cacerts default jks is at

${YOUR_JRE_HOME}/lib/security/

But for JBoss it may not be enough.

There may be some config location under server instance

Upvotes: 0

Related Questions