summaryrefslogtreecommitdiffstats
path: root/scripts/nssdb-sslserver-request.sh
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2017-10-20 21:30:52 +0200
committerEndi S. Dewata <edewata@redhat.com>2017-10-20 21:31:27 +0200
commit1cbf6fc8c9381f0835530dc0753f7c7af7502d88 (patch)
tree7c874c3cb422f8719fe49ffbdb67fa0273964bb0 /scripts/nssdb-sslserver-request.sh
parenta2412da7c00eceb51aa946fcd120ae9441e94e33 (diff)
downloadpki-dev-1cbf6fc8c9381f0835530dc0753f7c7af7502d88.zip
pki-dev-1cbf6fc8c9381f0835530dc0753f7c7af7502d88.tar.gz
pki-dev-1cbf6fc8c9381f0835530dc0753f7c7af7502d88.tar.xz
Added NSSDB scripts.
Diffstat (limited to 'scripts/nssdb-sslserver-request.sh')
-rwxr-xr-xscripts/nssdb-sslserver-request.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/nssdb-sslserver-request.sh b/scripts/nssdb-sslserver-request.sh
new file mode 100755
index 0000000..5f3657c
--- /dev/null
+++ b/scripts/nssdb-sslserver-request.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+certutil -R \
+ -d nssdb \
+ -f nssdb/password.txt \
+ -z nssdb/noise.bin \
+ -s "CN=$HOSTNAME,OU=pki-tomcat,O=EXAMPLE" \
+ -o nssdb/sslserver.csr.der \
+ -k rsa \
+ -g 2048 \
+ -Z SHA256 \
+ --keyUsage critical,dataEncipherment,keyEncipherment,digitalSignature,nonRepudiation \
+ --extKeyUsage serverAuth
+
+openssl req -inform der -in nssdb/sslserver.csr.der -out nssdb/sslserver.csr