summaryrefslogtreecommitdiffstats
path: root/scripts/certs-create.sh
blob: 790acafc6731df5fc638d3b86a601ab2b21450e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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