#!/bin/bash # # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 CN=${1:-root} COUNTRY=${2:-LU} LOCATION=${3:-Luxembourg} STATE=${4:-Luxembourg} ORG=${5:-AWS} ORGUNIT=${6:-Demo} openssl genrsa -out "$CN.ca.key" 2048 openssl req -x509 -new -nodes -key "$CN.ca.key" -sha256 -days 1024 -out "$CN.ca.pem" -subj "/CN=$CN/C=$COUNTRY/L=$LOCATION/ST=$STATE/O=$ORG/OU=$ORGUNIT"