summaryrefslogtreecommitdiff
path: root/ci/docker/createcert.sh
blob: 15cd8d5bfe683bbe0a857f870e2d6f203be4e974 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env bash
# Get absolute path to current directory this script is in
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

WEB_FQDN="eduvpnserver"

# Create self signed cert and key
openssl req \
	-nodes \
	-subj "/CN=${WEB_FQDN}" \
	-x509 \
	-sha256 \
	-newkey rsa:2048 \
	-keyout "${SCRIPT_DIR}/selfsigned/${WEB_FQDN}.key" \
	-out "${SCRIPT_DIR}/selfsigned/${WEB_FQDN}.crt" \
	-days 90