Nick aa43cb5e23
PortalAuth, Papers, and CursedScreech Updates (#87)
* Version 1.9

* Version 2.0

* Version 1.6

* Updated Papers to v2.0

* Replaced readKeys.sh with cfgNginx.py

* Fixed PKCS12 export bug

Co-authored-by: combsn <combsn@usc.edu>
2020-07-19 21:24:52 +01:00

36 lines
511 B
Bash
Executable File

#!/bin/sh
help() {
echo "Usage: ./testEncrypt.sh <opts>";
echo '';
echo 'Parameters:';
echo '';
echo -e '\t-d:\tDirectory where key resides';
echo -e '\t-k:\tName of key to test';
echo '';
}
if [ "$#" -lt 2 ]; then
help;
exit;
fi
KEY=''
KEYDIR=''
while [ "$#" -gt 0 ]
do
if [[ "$1" == "-k" ]]; then
KEY="$2.key"
fi
if [[ "$1" == "-d" ]]; then
KEYDIR="$2"
fi
shift
done;
openssl rsa -in $KEYDIR$KEY -passin pass:_ | awk 'NR==0;'