generatecerts.sh 829 B

1234567891011121314
  1. #!/bin/bash
  2. #
  3. # Creates a new self-signed certificate and imports it into a new truststore
  4. # It also imports the www servers certificate to allow communication with it
  5. #
  6. cd ~/jplag_webservice/tomcat50-jwsdp
  7. rm server.keystore
  8. rm tomcat.cer
  9. rm server.trust
  10. keytool -genkey -dname "CN=www.ipd.uni-karlsruhe.de, OU=[IPD] JPlag Team, O=Uni Karlsruhe, L=Karlsruhe, S=Baden-Wuerttemberg, C=DE" -alias tomcat -keyalg RSA -keystore server.keystore -storepass gulpie! -keypass gulpie!
  11. keytool -export -alias tomcat -keystore server.keystore -file tomcat.cer -storepass gulpie!
  12. keytool -import -alias tomcat-server -keystore server.trust -trustcacerts -file tomcat.cer -storepass gulpie! -noprompt
  13. keytool -import -alias apache-server -keystore server.trust -trustcacerts -file /etc/apache2/ssl.crt/www-06.crt -storepass gulpie! -noprompt