
Figure 7.20 Creating a Keystore with the Default Arguments
We can have more control over how this keystore is created by including more
command-line arguments.The following command will save the keystore to a dif-
ferent directory, and will make it valid for 180 days. It must all be typed on one
single line without pressing Enter.
keytool -genkey -dname "cn=Chris Jones, ou=Developer, o=Access, c=US" -alias
murphy -keystore C:\java\keystore -validity 180
After you have a keystore created, you can list its contents (see Figure 7.21).You
can use just the -list argument to list the keystore located in the user.home location,
or include the exact location ...