Update mellon_create_metadata.sh to work with new openssl

Resolves: rhbz#2097703 Use of RANDFILE = /dev/urandom in openssl config
          break in OpenSSL 3
This commit is contained in:
Tomas Halman 2022-07-01 15:04:51 +02:00
parent 79df3e2f46
commit e8e1fa6d86
2 changed files with 14 additions and 4 deletions

View File

@ -55,9 +55,9 @@ echo
umask 0077
TEMPLATEFILE="$(mktemp -t mellon_create_sp.XXXXXXXXXX)"
ERRORFILE="$(mktemp -t mellon_create_err.XXXXXXXXXX)"
cat >"$TEMPLATEFILE" <<EOF
RANDFILE = /dev/urandom
[req]
default_bits = 2048
default_keyfile = privkey.pem
@ -68,9 +68,14 @@ policy = policy_anything
commonName = $HOST
EOF
openssl req -utf8 -batch -config "$TEMPLATEFILE" -new -x509 -days 3652 -nodes -out "$OUTFILE.cert" -keyout "$OUTFILE.key" 2>/dev/null
openssl req -utf8 -batch -config "$TEMPLATEFILE" -new -x509 -days 3652 -nodes -out "$OUTFILE.cert" -keyout "$OUTFILE.key" 2>"$ERRORFILE" || (
echo "Failed to generate certificate!" >&2
cat "$ERRORFILE" >&2;
rm -f "$TEMPLATEFILE" "$ERRORFILE"
exit 1
)
rm -f "$TEMPLATEFILE"
rm -f "$TEMPLATEFILE" "$ERRORFILE"
CERT="$(grep -v '^-----' "$OUTFILE.cert")"

View File

@ -1,7 +1,7 @@
Summary: A SAML 2.0 authentication module for the Apache Httpd Server
Name: mod_auth_mellon
Version: 0.18.0
Release: 2%{?dist}
Release: 3%{?dist}
Source0: https://github.com/latchset/mod_auth_mellon/archive/refs/tags/v0.18.0.tar.gz
Source1: auth_mellon.conf
Source2: 10-auth_mellon.conf
@ -107,6 +107,11 @@ in the doc directory for instructions on using the diagnostics build.
%dir /run/%{name}/
%changelog
* Fri Jun 1 2022 Tomas Halman <thalman@redhat.com> - 0.18.0-2
- Update mellon_create_metadata.sh to work with new openssl
- Resolves: rhbz#2097703 Use of RANDFILE = /dev/urandom in openssl config
break in OpenSSL 3
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild