2020-04-24 10:03:40 +02:00
|
|
|
#
|
|
|
|
# spec file for package openssl-3
|
|
|
|
#
|
2023-01-31 13:15:10 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2020-04-24 10:03:40 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define ssletcdir %{_sysconfdir}/ssl
|
|
|
|
%define sover 3
|
2023-01-31 13:15:10 +01:00
|
|
|
%define _rname openssl
|
|
|
|
%define man_suffix 3ssl
|
2020-04-24 10:03:40 +02:00
|
|
|
Name: openssl-3
|
2023-01-31 13:15:10 +01:00
|
|
|
# Don't forget to update the version in the "openssl" meta-package!
|
2023-11-28 12:04:23 +01:00
|
|
|
Version: 3.2.0
|
2020-04-24 10:03:40 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Secure Sockets and Transport Layer Security
|
2020-06-30 14:20:26 +02:00
|
|
|
License: Apache-2.0
|
2020-04-24 10:03:40 +02:00
|
|
|
URL: https://www.openssl.org/
|
2021-09-08 11:17:59 +02:00
|
|
|
Source: https://www.%{_rname}.org/source/%{_rname}-%{version}.tar.gz
|
2020-04-24 10:03:40 +02:00
|
|
|
# to get mtime of file:
|
|
|
|
Source1: %{name}.changes
|
|
|
|
Source2: baselibs.conf
|
2021-09-08 11:17:59 +02:00
|
|
|
Source3: https://www.%{_rname}.org/source/%{_rname}-%{version}.tar.gz.asc
|
2020-04-24 10:03:40 +02:00
|
|
|
# https://www.openssl.org/about/
|
|
|
|
# http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xA2D29B7BF295C759#/openssl.keyring
|
|
|
|
Source4: %{_rname}.keyring
|
|
|
|
Source5: showciphers.c
|
2023-01-31 13:15:10 +01:00
|
|
|
# PATCH-FIX-OPENSUSE: Do not install html docs as it takes ages
|
|
|
|
Patch1: openssl-no-html-docs.patch
|
2020-04-24 10:03:40 +02:00
|
|
|
Patch2: openssl-truststore.patch
|
|
|
|
Patch3: openssl-pkgconfig.patch
|
2021-07-17 11:30:23 +02:00
|
|
|
Patch4: openssl-DEFAULT_SUSE_cipher.patch
|
2020-04-24 10:03:40 +02:00
|
|
|
Patch5: openssl-ppc64-config.patch
|
2023-01-31 13:15:10 +01:00
|
|
|
# Add crypto-policies support
|
2023-11-28 12:04:23 +01:00
|
|
|
Patch6: openssl-Add-support-for-PROFILE-SYSTEM-system-default-cipher.patch
|
|
|
|
Patch7: openssl-Override-default-paths-for-the-CA-directory-tree.patch
|
|
|
|
# PATCH-FIX-OPENSUSE: Revert of 0e55c3ab8d702ffc897c9beb51d19b14b789618
|
|
|
|
# Makefile: Call mknum.pl on 'make ordinals' only if needed
|
|
|
|
Patch8: openssl-Revert-Makefile-Call-mknum.pl-on-make-ordinals-only-if.patch
|
2023-10-24 18:01:48 +02:00
|
|
|
# PATCH-FIX-FEDORA Add FIPS_mode compatibility macro and flag support
|
2023-11-28 12:04:23 +01:00
|
|
|
Patch9: openssl-Add-FIPS_mode-compatibility-macro.patch
|
|
|
|
Patch10: openssl-Add-Kernel-FIPS-mode-flag-support.patch
|
2020-04-24 10:03:40 +02:00
|
|
|
BuildRequires: pkgconfig
|
2022-03-23 13:54:06 +01:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
2023-01-31 13:15:10 +01:00
|
|
|
Requires: libopenssl3 = %{version}-%{release}
|
2022-02-02 16:34:23 +01:00
|
|
|
Requires: openssl
|
2023-01-31 13:15:10 +01:00
|
|
|
Provides: ssl
|
|
|
|
# Needed for clean upgrade path, boo#1070003
|
|
|
|
Obsoletes: openssl-1_0_0
|
|
|
|
# Needed for clean upgrade from former openssl-1_1_0, boo#1081335
|
|
|
|
Obsoletes: openssl-1_1_0
|
2023-03-10 06:38:15 +01:00
|
|
|
%{?suse_build_hwcaps_libs}
|
2023-03-27 13:56:02 +02:00
|
|
|
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150400
|
|
|
|
Requires: crypto-policies
|
|
|
|
%endif
|
2022-01-28 20:30:29 +01:00
|
|
|
|
2020-04-24 10:03:40 +02:00
|
|
|
%description
|
|
|
|
OpenSSL is a software library to be used in applications that need to
|
|
|
|
secure communications over computer networks against eavesdropping or
|
|
|
|
need to ascertain the identity of the party at the other end.
|
|
|
|
OpenSSL contains an implementation of the SSL and TLS protocols.
|
|
|
|
|
|
|
|
%package -n libopenssl3
|
|
|
|
Summary: Secure Sockets and Transport Layer Security
|
2023-05-30 18:00:51 +02:00
|
|
|
BuildRequires: fipscheck
|
2020-04-24 10:03:40 +02:00
|
|
|
Recommends: ca-certificates-mozilla
|
2023-03-27 13:56:02 +02:00
|
|
|
Conflicts: %{name} < %{version}-%{release}
|
2023-01-31 13:15:10 +01:00
|
|
|
# Needed for clean upgrade from former openssl-1_1_0, boo#1081335
|
|
|
|
Obsoletes: libopenssl1_1_0
|
2023-03-27 13:56:02 +02:00
|
|
|
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150400
|
|
|
|
Requires: crypto-policies
|
|
|
|
%endif
|
2023-05-30 18:00:51 +02:00
|
|
|
# Merge back the hmac files bsc#1185116
|
|
|
|
Provides: libopenssl3-hmac = %{version}-%{release}
|
|
|
|
Obsoletes: libopenssl3-hmac < %{version}-%{release}
|
|
|
|
# Needed for clean upgrade from former openssl-1_1_0, boo#1081335
|
|
|
|
Obsoletes: libopenssl1_1_0-hmac
|
|
|
|
# Needed for clean upgrade from SLE-12 openssl-1_0_0, bsc#1158499
|
|
|
|
Obsoletes: libopenssl-1_0_0-hmac
|
2020-04-24 10:03:40 +02:00
|
|
|
|
|
|
|
%description -n libopenssl3
|
|
|
|
OpenSSL is a software library to be used in applications that need to
|
|
|
|
secure communications over computer networks against eavesdropping or
|
|
|
|
need to ascertain the identity of the party at the other end.
|
|
|
|
OpenSSL contains an implementation of the SSL and TLS protocols.
|
|
|
|
|
|
|
|
%package -n libopenssl-3-devel
|
|
|
|
Summary: Development files for OpenSSL
|
|
|
|
Requires: libopenssl3 = %{version}
|
2022-03-23 13:54:06 +01:00
|
|
|
Requires: pkgconfig(zlib)
|
2020-04-24 10:03:40 +02:00
|
|
|
Recommends: %{name} = %{version}
|
2023-06-21 15:05:11 +02:00
|
|
|
Provides: ssl-devel
|
|
|
|
Conflicts: ssl-devel
|
2023-01-31 13:15:10 +01:00
|
|
|
# Needed for clean upgrade from former openssl-1_1_0, boo#1081335
|
|
|
|
Obsoletes: libopenssl-1_1_0-devel
|
|
|
|
# Needed for clean upgrade from SLE-12 openssl-1_0_0, bsc#1158499
|
|
|
|
Obsoletes: libopenssl-1_0_0-devel
|
2020-04-24 10:03:40 +02:00
|
|
|
|
|
|
|
%description -n libopenssl-3-devel
|
|
|
|
This subpackage contains header files for developing applications
|
|
|
|
that want to make use of the OpenSSL C API.
|
|
|
|
|
|
|
|
%package doc
|
2023-10-19 11:40:34 +02:00
|
|
|
Summary: Manpages and additional documentation for openssl
|
|
|
|
Conflicts: libopenssl-3-devel < %{version}-%{release}
|
2020-04-24 10:03:40 +02:00
|
|
|
Conflicts: openssl-doc
|
|
|
|
Provides: openssl-doc = %{version}
|
|
|
|
Obsoletes: openssl-doc < %{version}
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
This package contains optional documentation provided in addition to
|
|
|
|
this package's base documentation.
|
|
|
|
|
|
|
|
%prep
|
2021-09-08 11:17:59 +02:00
|
|
|
%autosetup -p1 -n %{_rname}-%{version}
|
2020-04-24 10:03:40 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
%ifarch armv5el armv5tel
|
|
|
|
export MACHINE=armv5el
|
|
|
|
%endif
|
|
|
|
%ifarch armv6l armv6hl
|
|
|
|
export MACHINE=armv6l
|
|
|
|
%endif
|
|
|
|
|
|
|
|
./config \
|
2023-01-31 13:15:10 +01:00
|
|
|
no-mdc2 no-ec2m no-sm2 no-sm4 \
|
|
|
|
enable-rfc3779 enable-camellia enable-seed \
|
2020-04-24 10:03:40 +02:00
|
|
|
%ifarch x86_64 aarch64 ppc64le
|
|
|
|
enable-ec_nistp_64_gcc_128 \
|
|
|
|
%endif
|
2023-01-31 13:15:10 +01:00
|
|
|
enable-fips \
|
2022-03-23 13:54:06 +01:00
|
|
|
zlib \
|
2020-04-24 10:03:40 +02:00
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--libdir=%{_lib} \
|
|
|
|
--openssldir=%{ssletcdir} \
|
|
|
|
%{optflags} \
|
|
|
|
-Wa,--noexecstack \
|
|
|
|
-Wl,-z,relro,-z,now \
|
|
|
|
-fno-common \
|
|
|
|
-DTERMIO \
|
|
|
|
-DPURIFY \
|
|
|
|
-D_GNU_SOURCE \
|
|
|
|
-DOPENSSL_NO_BUF_FREELISTS \
|
|
|
|
$(getconf LFS_CFLAGS) \
|
|
|
|
-Wall \
|
2022-03-23 13:54:06 +01:00
|
|
|
--with-rand-seed=getrandom \
|
|
|
|
--system-ciphers-file=%{_sysconfdir}/crypto-policies/back-ends/openssl.config
|
2020-04-24 10:03:40 +02:00
|
|
|
|
|
|
|
# Show build configuration
|
|
|
|
perl configdata.pm --dump
|
|
|
|
|
2023-01-31 13:15:10 +01:00
|
|
|
# Do not run this in a production package the FIPS symbols must be patched-in
|
2020-10-17 08:43:41 +02:00
|
|
|
# util/mkdef.pl crypto update
|
2023-01-31 13:15:10 +01:00
|
|
|
|
2020-04-24 10:03:40 +02:00
|
|
|
%make_build depend
|
|
|
|
%make_build all
|
|
|
|
|
|
|
|
%check
|
2023-01-31 13:15:10 +01:00
|
|
|
# Relax the crypto-policies requirements for the regression tests
|
2023-11-28 12:04:23 +01:00
|
|
|
# Revert patch7 before running tests
|
|
|
|
patch -p1 -R < %{PATCH7}
|
2023-01-31 13:15:10 +01:00
|
|
|
export OPENSSL_SYSTEM_CIPHERS_OVERRIDE=xyz_nonexistent_file
|
2022-03-23 13:54:06 +01:00
|
|
|
|
2020-04-24 10:03:40 +02:00
|
|
|
export MALLOC_CHECK_=3
|
|
|
|
export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
|
2023-11-28 12:04:23 +01:00
|
|
|
#export HARNESS_VERBOSE=yes
|
|
|
|
%ifarch %{ix86} #Skip test, see issue#22837
|
|
|
|
LD_LIBRARY_PATH="$PWD" make TESTS='-test_symbol_presence' test -j16
|
|
|
|
%else
|
2023-01-31 13:15:10 +01:00
|
|
|
LD_LIBRARY_PATH="$PWD" make test -j16
|
2023-11-28 12:04:23 +01:00
|
|
|
%endif
|
2023-01-31 13:15:10 +01:00
|
|
|
|
2020-10-17 08:43:41 +02:00
|
|
|
# show ciphers
|
2020-04-24 10:03:40 +02:00
|
|
|
gcc -o showciphers %{optflags} -I%{buildroot}%{_includedir} %{SOURCE5} -L%{buildroot}%{_libdir} -lssl -lcrypto
|
|
|
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./showciphers
|
|
|
|
|
|
|
|
%install
|
2023-01-31 13:15:10 +01:00
|
|
|
%make_install %{?_smp_mflags} MANSUFFIX=%{man_suffix}
|
2022-01-28 20:30:29 +01:00
|
|
|
|
2023-01-31 13:15:10 +01:00
|
|
|
rename so.%{sover} so.%{version} %{buildroot}%{_libdir}/*.so.%{sover}
|
|
|
|
for lib in %{buildroot}%{_libdir}/*.so.%{version} ; do
|
|
|
|
chmod 755 ${lib}
|
|
|
|
ln -sf $(basename ${lib}) %{buildroot}%{_libdir}/$(basename ${lib} .%{version})
|
|
|
|
ln -sf $(basename ${lib}) %{buildroot}%{_libdir}/$(basename ${lib} .%{version}).%{sover}
|
|
|
|
done
|
|
|
|
|
|
|
|
# Remove static libraries
|
2020-04-24 10:03:40 +02:00
|
|
|
rm -f %{buildroot}%{_libdir}/lib*.a
|
2023-01-31 13:15:10 +01:00
|
|
|
|
2020-10-30 10:36:36 +01:00
|
|
|
# Remove the cnf.dist
|
2023-01-31 13:15:10 +01:00
|
|
|
rm -f %{buildroot}%{ssletcdir}/openssl.cnf.dist
|
|
|
|
rm -f %{buildroot}%{ssletcdir}/ct_log_list.cnf.dist
|
|
|
|
|
|
|
|
# Make a copy of the default openssl.cnf file
|
|
|
|
cp %{buildroot}%{ssletcdir}/openssl.cnf %{buildroot}%{ssletcdir}/openssl-orig.cnf
|
|
|
|
|
|
|
|
# Create openssl ca-certificates dir required by nodejs regression tests [bsc#1207484]
|
2023-03-27 13:56:02 +02:00
|
|
|
mkdir -p %{buildroot}%{_localstatedir}/lib/ca-certificates/openssl
|
|
|
|
install -d -m 555 %{buildroot}%{_localstatedir}/lib/ca-certificates/openssl
|
2023-01-31 13:15:10 +01:00
|
|
|
|
|
|
|
# Remove the fipsmodule.cnf because FIPS module is loaded automatically
|
|
|
|
rm -f %{buildroot}%{ssletcdir}/fipsmodule.cnf
|
|
|
|
|
2020-04-24 10:03:40 +02:00
|
|
|
ln -sf ./%{_rname} %{buildroot}/%{_includedir}/ssl
|
|
|
|
mkdir %{buildroot}/%{_datadir}/ssl
|
2023-01-31 13:15:10 +01:00
|
|
|
mv %{buildroot}/%{ssletcdir}/misc %{buildroot}/%{_datadir}/ssl/
|
|
|
|
|
2020-10-30 10:36:36 +01:00
|
|
|
# Avoid file conflicts with man pages from other packages
|
2020-04-24 10:03:40 +02:00
|
|
|
pushd %{buildroot}/%{_mandir}
|
2020-05-24 09:32:32 +02:00
|
|
|
find . -type f -exec chmod 644 {} +
|
2023-01-31 13:15:10 +01:00
|
|
|
mv man5/config.5%{man_suffix} man5/openssl.cnf.5
|
2020-04-24 10:03:40 +02:00
|
|
|
popd
|
|
|
|
|
|
|
|
# Do not install demo scripts executable under /usr/share/doc
|
2020-05-24 09:32:32 +02:00
|
|
|
find demos -type f -perm /111 -exec chmod 644 {} +
|
2020-04-24 10:03:40 +02:00
|
|
|
|
|
|
|
# Place showciphers.c for %%doc macro
|
|
|
|
cp %{SOURCE5} .
|
|
|
|
|
2023-01-31 13:15:10 +01:00
|
|
|
# Compute the FIPS hmac using the brp-50-generate-fips-hmac script
|
|
|
|
export BRP_FIPSHMAC_FILES="%{buildroot}%{_libdir}/libssl.so.%{sover} %{buildroot}%{_libdir}/libcrypto.so.%{sover}"
|
|
|
|
|
|
|
|
%post -p "/bin/bash"
|
|
|
|
if [ "$1" -gt 1 ] ; then
|
|
|
|
# Check if the packaged default config file for openssl-3, called openssl.cnf,
|
|
|
|
# is the original or if it has been modified and alert the user in that case
|
|
|
|
# that a copy of the original file openssl-orig.cnf can be used if needed.
|
|
|
|
cmp --silent %{ssletcdir}/openssl.cnf %{ssletcdir}/openssl-orig.cnf 2>/dev/null
|
|
|
|
if [ "$?" -eq 1 ] ; then
|
|
|
|
echo -e " The openssl-3 default config file openssl.cnf is different from" ;
|
|
|
|
echo -e " the original one shipped by the package. A copy of the original" ;
|
|
|
|
echo -e " file is packaged and named as openssl-orig.cnf if needed."
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2020-04-24 10:03:40 +02:00
|
|
|
%post -n libopenssl3 -p /sbin/ldconfig
|
|
|
|
%postun -n libopenssl3 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files -n libopenssl3
|
Accepting request 821489 from home:pmonrealgonzalez:branches:security:tls
- Update to 3.0.0 Alpha 5
* Deprecated the 'ENGINE' API. Engines should be replaced with
providers going forward.
* Reworked the recorded ERR codes to make better space for system errors.
To distinguish them, the macro 'ERR_SYSTEM_ERROR()' indicates
if the given code is a system error (true) or an OpenSSL error (false).
* Reworked the test perl framework to better allow parallel testing.
* Added ciphertext stealing algorithms AES-128-CBC-CTS, AES-192-CBC-CTS and
AES-256-CBC-CTS to the providers. CS1, CS2 and CS3 variants are supported.
* 'Configure' has been changed to figure out the configuration target if
none is given on the command line. Consequently, the 'config' script is
now only a mere wrapper. All documentation is changed to only mention
'Configure'.
* Added a library context that applications as well as other libraries can use
to form a separate context within which libcrypto operations are performed.
- There are two ways this can be used:
1) Directly, by passing a library context to functions that take
such an argument, such as 'EVP_CIPHER_fetch' and similar algorithm
fetching functions.
2) Indirectly, by creating a new library context and then assigning
it as the new default, with 'OPENSSL_CTX_set0_default'.
- All public OpenSSL functions that take an 'OPENSSL_CTX' pointer,
apart from the functions directly related to 'OPENSSL_CTX', accept
NULL to indicate that the default library context should be used.
- Library code that changes the default library context using
'OPENSSL_CTX_set0_default' should take care to restore it with a
second call before returning to the caller.
* The security strength of SHA1 and MD5 based signatures in TLS has been
reduced. This results in SSL 3, TLS 1.0, TLS 1.1 and DTLS 1.0 no longer
working at the default security level of 1 and instead requires security
OBS-URL: https://build.opensuse.org/request/show/821489
OBS-URL: https://build.opensuse.org/package/show/security:tls/openssl-3?expand=0&rev=13
2020-07-17 13:26:23 +02:00
|
|
|
%license LICENSE.txt
|
2023-01-31 13:15:10 +01:00
|
|
|
%attr(0755,root,root) %{_libdir}/libssl.so.%{version}
|
2020-04-24 10:03:40 +02:00
|
|
|
%{_libdir}/libssl.so.%{sover}
|
2023-01-31 13:15:10 +01:00
|
|
|
%attr(0755,root,root) %{_libdir}/libcrypto.so.%{version}
|
2020-04-24 10:03:40 +02:00
|
|
|
%{_libdir}/libcrypto.so.%{sover}
|
|
|
|
%{_libdir}/engines-%{sover}
|
|
|
|
%dir %{_libdir}/ossl-modules
|
2023-01-31 13:15:10 +01:00
|
|
|
%{_libdir}/ossl-modules/fips.so
|
2020-04-24 10:03:40 +02:00
|
|
|
%{_libdir}/ossl-modules/legacy.so
|
2023-01-31 13:15:10 +01:00
|
|
|
%{_libdir}/.libssl.so.%{sover}.hmac
|
|
|
|
%{_libdir}/.libcrypto.so.%{sover}.hmac
|
|
|
|
|
2020-04-24 10:03:40 +02:00
|
|
|
%files -n libopenssl-3-devel
|
2023-01-31 13:15:10 +01:00
|
|
|
%doc NOTES*.md CONTRIBUTING.md HACKING.md AUTHORS.md ACKNOWLEDGEMENTS.md
|
2020-04-24 10:03:40 +02:00
|
|
|
%{_includedir}/%{_rname}/
|
|
|
|
%{_includedir}/ssl
|
2023-01-31 13:15:10 +01:00
|
|
|
%{_libdir}/*.so
|
|
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
%doc README.md
|
|
|
|
%doc doc/html/* doc/HOWTO/* demos
|
2020-04-24 10:03:40 +02:00
|
|
|
%doc showciphers.c
|
2023-10-19 11:40:34 +02:00
|
|
|
%{_mandir}/man3/*
|
2020-04-24 10:03:40 +02:00
|
|
|
|
2023-01-31 13:15:10 +01:00
|
|
|
%files
|
|
|
|
%license LICENSE.txt
|
|
|
|
%doc CHANGES.md NEWS.md FAQ.md README.md
|
2020-04-24 10:03:40 +02:00
|
|
|
%dir %{ssletcdir}
|
2023-01-31 13:15:10 +01:00
|
|
|
%config %{ssletcdir}/openssl-orig.cnf
|
|
|
|
%config (noreplace) %{ssletcdir}/openssl.cnf
|
|
|
|
%config (noreplace) %{ssletcdir}/ct_log_list.cnf
|
2020-04-24 10:03:40 +02:00
|
|
|
%attr(700,root,root) %{ssletcdir}/private
|
2023-01-31 13:15:10 +01:00
|
|
|
%dir %{_datadir}/ssl
|
|
|
|
%{_datadir}/ssl/misc
|
2023-03-27 13:56:02 +02:00
|
|
|
%dir %{_localstatedir}/lib/ca-certificates/
|
|
|
|
%dir %{_localstatedir}/lib/ca-certificates/openssl
|
2023-01-31 13:15:10 +01:00
|
|
|
%{_bindir}/%{_rname}
|
|
|
|
%{_bindir}/c_rehash
|
|
|
|
%{_mandir}/man1/*
|
|
|
|
%{_mandir}/man5/*
|
|
|
|
%{_mandir}/man7/*
|
2020-04-24 10:03:40 +02:00
|
|
|
|
|
|
|
%changelog
|