#!/usr/bin/env bash
if [ -z "$3" ]; then
echo "Usage: $0 [commonname] [csr path] [key path]";
exit 1;
fi
openssl req -sha256 -keyout $3 -nodes -newkey rsa:2048 -out $2 -subj "/CN=$1"