File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -1180,3 +1180,22 @@ setup_rbenv_stack() {
11801180 rm -rf " $TMP_DIR "
11811181 msg_ok " rbenv stack ready (Ruby $RUBY_VERSION )"
11821182}
1183+
1184+ # ------------------------------------------------------------------------------
1185+ # Creates and installs self-signed certificates.
1186+ #
1187+ # Description:
1188+ # - Create a self-signed certificate with option to override application name
1189+ #
1190+ # Variables:
1191+ # APP - Application name (default: $APPLICATION variable)
1192+ # ------------------------------------------------------------------------------
1193+ create_selfsigned_certs () {
1194+ local app=${APP:- $(echo " ${APPLICATION,,} " | tr -d ' ' )}
1195+ $STD msg_info " Creating Self-Signed Certificate"
1196+ $STD openssl req -x509 -nodes -days 365 -newkey rsa:4096 \
1197+ -keyout /etc/ssl/private/" $app " -selfsigned.key \
1198+ -out /etc/ssl/certs/" $app " -selfsigned.crt \
1199+ -subj " /C=US/O=$app /OU=Domain Control Validated/CN=localhost"
1200+ $STD msg_ok " Created Self-Signed Certificate"
1201+ }
You can’t perform that action at this time.
0 commit comments