Skip to content

Instantly share code, notes, and snippets.

View mpielikis's full-sized avatar

Mindaugas Pielikis mpielikis

  • Lithuania, Vilnius
View GitHub Profile
@danquack
danquack / create_cert.sh
Last active September 27, 2021 03:30
Securing traffic with ACM Private Certificate Authority
# Create x509 cert if not building for cloud (common in local builds)
if [[ -z "${ROOTCA}" ]]; then flags="-x509 -days 365"; fi
mkdir -p /etc/ssl/{certs,private}
openssl req $flags -nodes -new -newkey rsa:4096 -keyout /etc/ssl/private/server.key -out /etc/ssl/certs/server.crt -subj "/CN=${HOSTNAME}"