blob: ffd553822bac8cd3bd5e34bae9f4d545c19ee78f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh -x
echo $HOSTNAME > master.txt
grep "internal=" /var/lib/pki/pki-tomcat/conf/password.conf | awk -F= '{print $2}' > internal.txt
echo Secret.123 > password.txt
PKCS12Export -debug -d /var/lib/pki/pki-tomcat/alias -p internal.txt -w password.txt -o ca_backup_keys.p12
pki pkcs12-cert-find --pkcs12-file ca_backup_keys.p12 --pkcs12-password Secret.123
pki-server ca-clone-prepare --pkcs12-file pki-server.p12 --pkcs12-password Secret.123
pki pkcs12-cert-find --pkcs12-file pki-server.p12 --pkcs12-password Secret.123
cp ~/.dogtag/pki-tomcat/ca_admin.cert .
cp ~/.dogtag/pki-tomcat/ca_admin_cert.p12 .
|