summaryrefslogtreecommitdiffstats
path: root/scripts/certs-create.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/certs-create.sh')
-rwxr-xr-xscripts/certs-create.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/certs-create.sh b/scripts/certs-create.sh
new file mode 100755
index 0000000..790acaf
--- /dev/null
+++ b/scripts/certs-create.sh
@@ -0,0 +1,13 @@
+#!/bin/sh -x
+
+. ./ca-include.sh
+
+cd ../certs
+
+openssl genrsa -out private.key 1024
+
+openssl req -new -key private.key -out server.csr -subj "/O=$REALM/CN=$HOSTNAME"
+openssl req -new -key private.key -out testuser.csr -subj "/O=EXAMPLE-COM/UID=testuser/CN=Test User"
+
+openssl x509 -req -days 365 -in server.csr -signkey private.key -out server.crt
+openssl x509 -req -days 365 -in testuser.csr -signkey private.key -out testuser.crt