Last change
on this file since 36486 was 36486, checked in by davidb, 20 months ago |
Version of using webswing with Greenstone, albeit hardwird for /opt/greenstone3-svn/
|
-
Property svn:executable
set to
*
|
File size:
965 bytes
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 |
|
---|
3 | # Based on details at:
|
---|
4 | # https://docs.pega.com/security/86/creating-keystorejks-and-truststorejks-files
|
---|
5 |
|
---|
6 | echo ""
|
---|
7 | echo "Removing keystore and truststore"
|
---|
8 | rm -f ssl/gs3-webswing-{keystore,truststore}.jks gs3-webswing-truststore.cer
|
---|
9 |
|
---|
10 | echo ""
|
---|
11 | echo "Generating self-signed certificate in keystore"
|
---|
12 | keytool -genkey -alias gs3-ws-server \
|
---|
13 | -keyalg RSA -keysize 2048 -keypass 123123 \
|
---|
14 | -dname "cn=localhost, ou=GreenstoneDL, o=www.greenstone.org, l=Waikato, c=NZ" \
|
---|
15 | -validity 999999 \
|
---|
16 | -keystore ssl/gs3-webswing-keystore.jks \
|
---|
17 | -storepass 123123
|
---|
18 |
|
---|
19 | echo ""
|
---|
20 | echo "Exporting certificate from keystore"
|
---|
21 | keytool -export -alias gs3-ws-server \
|
---|
22 | -file gs3-webswing-keystore.cer \
|
---|
23 | -keystore ssl/gs3-webswing-keystore.jks \
|
---|
24 | -storepass 123123
|
---|
25 |
|
---|
26 | echo ""
|
---|
27 | echo "Importing certificate into Truststore"
|
---|
28 | keytool -import -alias gs3-ws-client \
|
---|
29 | -file gs3-webswing-keystore.cer \
|
---|
30 | -keystore ssl/gs3-webswing-truststore.jks \
|
---|
31 | -storepass 123123 -storetype JKS \
|
---|
32 | -noprompt
|
---|
33 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.