You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

To Generate a New Keystore

To generate a new keystore, run the following command (on one line) within the /opt/shrine/ directory:

$ keytool 
-genkeypair 
-keysize 2048 
-alias $KEYSTORE_ALIAS 
-dname "CN=$KEYSTORE_ALIAS, OU=$KEYSTORE_HUMAN, O=SHRINE Network, L=$KEYSTORE_CITY, S=$KEYSTORE_STATE, C=$KEYSTORE_COUNTRY" 
-keyalg RSA 
-keypass $KEYSTORE_PASSWORD 
-storepass $KEYSTORE_PASSWORD 
-keystore $KEYSTORE_FILE
-storetype pkcs12 
-validity 7300

Most importantly, ensure that $KEYSTORE_ALIAS matches the publicly-accessible hostname of the machine that will be using this keystore.

 

For example, a sample site might run this:

$ keytool 
-genkeypair 
-keysize 2048 
-alias shrine-example.harvard.edu 
-dname "CN=shrine-example.harvard.edu, OU=SHRINE Example, O=SHRINE Network, L=Boston, S=MA, C=US" 
-keyalg RSA 
-keypass password 
-storepass password 
-keystore shrine.keystore
-storetype pkcs12 
-validity 7300

This will generate a shrine.keystore file within the /opt/shrine directory. You can then verify the creation of the keystore by running:

$ keytool -list -keystore shrine.keystore -storepass password

 

 

  • No labels