summaryrefslogtreecommitdiffstats
path: root/scripts/ca-clone-prep.sh
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2017-08-01 04:54:31 +0200
committerEndi S. Dewata <edewata@redhat.com>2017-08-01 04:54:31 +0200
commit41d7cfc3d97918e736331af85818a6969161803b (patch)
treed133582da0bef31633d364f07df806ce6a83553b /scripts/ca-clone-prep.sh
parent78fcfec59faee408142ed75e61025ccab0c72acc (diff)
downloadpki-dev-41d7cfc3d97918e736331af85818a6969161803b.tar.gz
pki-dev-41d7cfc3d97918e736331af85818a6969161803b.tar.xz
pki-dev-41d7cfc3d97918e736331af85818a6969161803b.zip
Updated CA scripts.
Diffstat (limited to 'scripts/ca-clone-prep.sh')
-rwxr-xr-xscripts/ca-clone-prep.sh19
1 files changed, 9 insertions, 10 deletions
diff --git a/scripts/ca-clone-prep.sh b/scripts/ca-clone-prep.sh
index ffd5538..3993580 100755
--- a/scripts/ca-clone-prep.sh
+++ b/scripts/ca-clone-prep.sh
@@ -1,17 +1,16 @@
#!/bin/sh -x
-echo $HOSTNAME > master.txt
+mkdir -p tmp
-grep "internal=" /var/lib/pki/pki-tomcat/conf/password.conf | awk -F= '{print $2}' > internal.txt
-echo Secret.123 > password.txt
+#echo $HOSTNAME > tmp/master.txt
-PKCS12Export -debug -d /var/lib/pki/pki-tomcat/alias -p internal.txt -w password.txt -o ca_backup_keys.p12
+grep "internal=" /var/lib/pki/pki-tomcat/conf/password.conf | awk -F= '{print $2}' > tmp/internal.txt
-pki pkcs12-cert-find --pkcs12-file ca_backup_keys.p12 --pkcs12-password Secret.123
+PKCS12Export -debug -d /var/lib/pki/pki-tomcat/alias -p tmp/internal.txt -w password.txt -o tmp/ca_backup_keys.p12
+pki pkcs12-cert-find --pkcs12-file tmp/ca_backup_keys.p12 --pkcs12-password-file password.txt
-pki-server ca-clone-prepare --pkcs12-file pki-server.p12 --pkcs12-password Secret.123
+pki-server ca-clone-prepare --pkcs12-file tmp/ca-certs.p12 --pkcs12-password-file password.txt
+pki pkcs12-cert-find --pkcs12-file tmp/ca-certs.p12 --pkcs12-password-file password.txt
-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 .
+#cp ~/.dogtag/pki-tomcat/ca_admin.cert tmp
+#cp ~/.dogtag/pki-tomcat/ca_admin_cert.p12 tmp