agmission/Others/configs/ssl/makeClientCSR.sh

10 lines
340 B
Bash
Executable File

#!/bin/bash
if [ "$1" = "" ]; then
echo 'Exit. Your must enter client hostname (CN) !'
exit 1
fi
#cd /home/agm/ssl/
HOST_NAME="$1"
SUBJECT="/C=CA/ST=ON/L=Barrie/O=AG-NAV Inc./OU=MONGO_CLIENTS/CN=$HOST_NAME/emailAddress=software@agnav.com"
openssl req -new -nodes -newkey rsa:2048 -subj "$SUBJECT" -keyout $HOST_NAME.key -out $HOST_NAME.csr