add cert generator scripts, arrange scripts dir
This commit is contained in:
17
scripts/certs/gen-ca.sh
Executable file
17
scripts/certs/gen-ca.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
cd "$DIR"
|
||||
|
||||
rm -f ca.crt
|
||||
rm -f ca.key
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
read -s pass
|
||||
else
|
||||
pass=$1
|
||||
fi
|
||||
|
||||
subj="/C=BG/ST=Bulgaria/L=Sofia/O=S.M.I.R.K.Y./CN=localhost"
|
||||
openssl genrsa -des3 -out ca.key -passout pass:$pass 4096
|
||||
openssl req -new -x509 -days 365 -key ca.key -subj $subj -passin pass:$pass -out ca.crt -passin pass:$pass
|
||||
|
||||
Reference in New Issue
Block a user