🦈🏠🐜 Initial Commit 🐜🦈🏠

This commit is contained in:
Jason
2022-07-11 23:40:12 -04:00
commit a7ee103963
14 changed files with 512 additions and 0 deletions

33
bin/setup-dh.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202207112331-git
# @Author : Jason Hempstead
# @Contact : jason@casjaysdev.com
# @License : LICENSE.md
# @ReadME : ca-setup.sh --help
# @Copyright : Copyright: (c) Jason Hempstead, Casjays Developments
# @Created : Monday, Jul 11, 2022 23:31 EDT
# @File : ca-setup.sh
# @Description :
# @TODO :
# @Other :
# @Resource :
# @sudo/root : no
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
APPNAME="$(basename "$0")"
VERSION="202207112331-git"
USER="${SUDO_USER:-${USER}}"
HOME="${USER_HOME:-${HOME}}"
SRC_DIR="${BASH_SOURCE%/*}"
SSL_DIR="${MY_SSL_HOME:-$(cd "$SRC_DIR/../CasjaysDev" && echo "$PWD" || exit 1)}"
SSL_DH_DIR="${MY_SSL_DH_HOME:-$(cd "$SRC_DIR/../dh" && echo "$PWD" || exit 1)}"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
mkdir -p "$SSL_DH_DIR"
cd "$SSL_DH_DIR" || exit 1
umask 022
for legth in 512 1024 2048 4096; do
if openssl dhparam -out "dh_$legth.tmp" "$legth"; then
mv -f "dh_$legth.tmp" "dh_$legth.pem"
chmod 644 "dh_$legth.pem"
fi
done