Fixed scriptlets to work with openssl-3.0
Resolves: rhbz#1985918
This commit is contained in:
parent
9ee22a01a6
commit
c7f4d269b1
14
postfix.spec
14
postfix.spec
@ -49,7 +49,7 @@
|
|||||||
Name: postfix
|
Name: postfix
|
||||||
Summary: Postfix Mail Transport Agent
|
Summary: Postfix Mail Transport Agent
|
||||||
Version: 3.5.9
|
Version: 3.5.9
|
||||||
Release: 9%{?dist}
|
Release: 10%{?dist}
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
URL: http://www.postfix.org
|
URL: http://www.postfix.org
|
||||||
License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+)
|
License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+)
|
||||||
@ -502,7 +502,7 @@ fi
|
|||||||
# Create self-signed SSL certificate
|
# Create self-signed SSL certificate
|
||||||
if [ ! -f %{sslkey} ]; then
|
if [ ! -f %{sslkey} ]; then
|
||||||
umask 077
|
umask 077
|
||||||
%{_bindir}/openssl genrsa 4096 > %{sslkey} 2> /dev/null
|
%{_bindir}/openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:4096 -out %{sslkey}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f %{sslcert} ]; then
|
if [ ! -f %{sslcert} ]; then
|
||||||
@ -511,8 +511,10 @@ if [ ! -f %{sslcert} ]; then
|
|||||||
FQDN=localhost.localdomain
|
FQDN=localhost.localdomain
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%{_bindir}/openssl req -new -key %{sslkey} -x509 -sha256 -days 365 -set_serial $RANDOM -out %{sslcert} \
|
req_cmd="%{_bindir}/openssl req -new -key %{sslkey} -x509 -sha256 -days 365 -set_serial $RANDOM -out %{sslcert} \
|
||||||
-subj "/C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=${FQDN}/emailAddress=root@${FQDN}"
|
-subj /C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=${FQDN}/emailAddress=root@${FQDN}"
|
||||||
|
# openssl-3.0 and fallback for backward compatibility with openssl < 3.0
|
||||||
|
$req_cmd -noenc -copy_extension none 2>/dev/null || $req_cmd
|
||||||
chmod 644 %{sslcert}
|
chmod 644 %{sslcert}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -785,6 +787,10 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 2 2021 Jaroslav Škarvada <jskarvad@redhat.com> - 2:3.5.9-10
|
||||||
|
- Fixed scriptlets to work with openssl-3.0
|
||||||
|
Resolves: rhbz#1985918
|
||||||
|
|
||||||
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 2:3.5.9-9
|
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 2:3.5.9-9
|
||||||
- Rebuilt for RHEL 9 BETA for openssl 3.0
|
- Rebuilt for RHEL 9 BETA for openssl 3.0
|
||||||
Related: rhbz#1971065
|
Related: rhbz#1971065
|
||||||
|
Loading…
Reference in New Issue
Block a user