mirror of
https://github.com/hak5/nano-tetra-modules.git
synced 2025-10-29 16:58:09 +00:00
* 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>
36 lines
511 B
Bash
Executable File
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;'
|