aboutsummaryrefslogtreecommitdiffstats
path: root/postgresql-config/src/stage/opt/app/postgresql-config/etc/makecerts
diff options
context:
space:
mode:
Diffstat (limited to 'postgresql-config/src/stage/opt/app/postgresql-config/etc/makecerts')
-rwxr-xr-xpostgresql-config/src/stage/opt/app/postgresql-config/etc/makecerts4
1 files changed, 4 insertions, 0 deletions
diff --git a/postgresql-config/src/stage/opt/app/postgresql-config/etc/makecerts b/postgresql-config/src/stage/opt/app/postgresql-config/etc/makecerts
index a272f7b..46564ab 100755
--- a/postgresql-config/src/stage/opt/app/postgresql-config/etc/makecerts
+++ b/postgresql-config/src/stage/opt/app/postgresql-config/etc/makecerts
@@ -51,6 +51,8 @@ usage()
exit 1
}
+set -x
+
if [ -f "$libdir/ssl-cert-snakeoil.pem" ] && [ -f "$libdir/ssl-cert-snakeoil.key" ]; then
if [ "$1" != "--force-overwrite" ]; then
exit 0
@@ -83,6 +85,8 @@ trap "rm -f $TMPFILE $TMPOUT" EXIT 1 2 3 15
# create the certificate.
+umask 077
+
if ! openssl req -config $TMPFILE -new -x509 -days 3650 -nodes \
-out $libdir/ssl-cert-snakeoil.pem \
-keyout $libdir/ssl-cert-snakeoil.key > $TMPOUT 2>&1