You are going to use a keytool (provided with the JDK) to manipulate the keys and certificates.
one for the server side (use for SSL),
one as an example of the client side (use for "trust", should be performed for each client, on the client side).
mkdir -p etc/keystores cd etc/keystores keytool -genkey -keyalg RSA -validity 365 -alias serverkey -keypass password -storepass password -keystore keystore.jks keytool -genkey -keyalg RSA -validity 365 -alias clientkey -keypass password -storepass password -keystore client.jks
keytool -export -rfc -keystore client.jks -storepass password -alias clientkey -file client.cer keytool -import -trustcacerts -keystore keystore.jks -storepass password -alias clientkey -file client.cer
keytool -list -v -keystore keystore.jks ... Alias name: clientkey Creation date: Dec 12, 2012 Entry type: trustedCertEntry ...
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!