summaryrefslogtreecommitdiffstats
path: root/scripts/httpclient.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/httpclient.sh')
-rwxr-xr-xscripts/httpclient.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/httpclient.sh b/scripts/httpclient.sh
new file mode 100755
index 0000000..5454ee9
--- /dev/null
+++ b/scripts/httpclient.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+PKCS10Client -d ~/.dogtag/pki-tomcat/ca/alias -p Secret.123 \
+ -a rsa -l 1024 \
+ -n "uid=testuser,ou=people,dc=example,dc=com" \
+ -o /tmp/httpclient.pem
+
+AtoB /tmp/httpclient.pem /tmp/httpclient.bin
+
+cat > httpclient.cfg << EOF
+host=$HOSTNAME
+port=8443
+secure=true
+
+input=/tmp/httpclient.bin
+output=/tmp/httpclient.out
+
+tokenname=internal
+dbdir=/root/.dogtag/pki-tomcat/ca/alias
+clientmode=false
+password=Secret.123
+nickname=caadmin
+
+servlet=/ca/ee/ca/profileSubmit
+EOF
+
+HttpClient httpclient.cfg