summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2017-11-14 20:48:34 -0600
committerEndi S. Dewata <edewata@redhat.com>2017-11-14 20:49:50 -0600
commit119ee54e48a55987f1d0054edc6d3a820d50c434 (patch)
tree7d2a2f525f616a5582f920b9c09bfda04039a3cd
parented6d88989ef73b0b91d01800659b2c9059a238c4 (diff)
downloadpki-dev-119ee54e48a55987f1d0054edc6d3a820d50c434.zip
pki-dev-119ee54e48a55987f1d0054edc6d3a820d50c434.tar.gz
pki-dev-119ee54e48a55987f1d0054edc6d3a820d50c434.tar.xz
Added scripts for secrets.
-rwxr-xr-xscripts/secret-archive.sh9
-rwxr-xr-xscripts/secret-find.sh3
-rwxr-xr-xscripts/secret-retrieve.sh5
3 files changed, 17 insertions, 0 deletions
diff --git a/scripts/secret-archive.sh b/scripts/secret-archive.sh
new file mode 100755
index 0000000..a70553d
--- /dev/null
+++ b/scripts/secret-archive.sh
@@ -0,0 +1,9 @@
+#!/bin/sh -x
+
+ID=$1
+
+mkdir -p tmp
+openssl rand -out tmp/input.bin 2048
+
+pki -d ~/.dogtag/pki-tomcat/ca/alias -c Secret.123 -n caadmin kra-key-archive --clientKeyID $ID --input-data tmp/input.bin
+
diff --git a/scripts/secret-find.sh b/scripts/secret-find.sh
new file mode 100755
index 0000000..f2d2be6
--- /dev/null
+++ b/scripts/secret-find.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pki -d ~/.dogtag/pki-tomcat/ca/alias -c Secret.123 -n caadmin kra-key-find
diff --git a/scripts/secret-retrieve.sh b/scripts/secret-retrieve.sh
new file mode 100755
index 0000000..8f55fb3
--- /dev/null
+++ b/scripts/secret-retrieve.sh
@@ -0,0 +1,5 @@
+#!/bin/sh -x
+
+ID=$1
+
+pki -d ~/.dogtag/pki-tomcat/ca/alias -c Secret.123 -n caadmin kra-key-retrieve --keyID $ID --output-data tmp/output.bin