2015-03-30 19:33:01 +02:00
|
|
|
#
|
|
|
|
# spec file for package mbedtls
|
|
|
|
#
|
2021-01-20 08:18:23 +01:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2015-03-30 19:33:01 +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.
|
|
|
|
|
Accepting request 657220 from home:pmonrealgonzalez:branches:security:tls
- Library package version bumped to libmbedtls12
- Update to version 2.14.1: [bsc#1118727, CVE-2018-19608]
Security
* Fix timing variations and memory access variations in RSA PKCS#1 v1.5
decryption that could lead to a Bleichenbacher-style padding oracle
attack. In TLS, this affects servers that accept ciphersuites based on
RSA decryption (i.e. ciphersuites whose name contains RSA but not
(EC)DH(E)). Discovered by Eyal Ronen (Weizmann Institute), Robert Gillham
(University of Adelaide), Daniel Genkin (University of Michigan),
Adi Shamir (Weizmann Institute), David Wong (NCC Group), and Yuval Yarom
(University of Adelaide, Data61). The attack is described in more detail
in the paper available here: http://cat.eyalro.net/cat.pdf CVE-2018-19608
* In mbedtls_mpi_write_binary(), don't leak the exact size of the number
via branching and memory access patterns. An attacker who could submit
a plaintext for RSA PKCS#1 v1.5 decryption but only observe the timing
of the decryption and not its result could nonetheless decrypt RSA
plaintexts and forge RSA signatures. Other asymmetric algorithms may
have been similarly vulnerable. Reported by Eyal Ronen, Robert Gillham,
Daniel Genkin, Adi Shamir, David Wong and Yuval Yarom.
* Wipe sensitive buffers on the stack in the CTR_DRBG and HMAC_DRBG
modules.
API Changes
* The new functions mbedtls_ctr_drbg_update_ret() and
mbedtls_hmac_drbg_update_ret() are similar to mbedtls_ctr_drbg_update()
and mbedtls_hmac_drbg_update() respectively, but the new functions
report errors whereas the old functions return void. We recommend that
applications use the new functions.
- Version 2.14.0:
Security
OBS-URL: https://build.opensuse.org/request/show/657220
OBS-URL: https://build.opensuse.org/package/show/security:tls/mbedtls?expand=0&rev=4
2018-12-11 16:42:05 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-03-30 19:33:01 +02:00
|
|
|
#
|
|
|
|
|
2021-03-23 12:39:07 +01:00
|
|
|
|
2022-01-14 14:58:34 +01:00
|
|
|
%define lib_tls libmbedtls14
|
2021-08-03 13:25:35 +02:00
|
|
|
%define lib_crypto libmbedcrypto7
|
2020-08-17 12:36:14 +02:00
|
|
|
%define lib_x509 libmbedx509-1
|
2015-03-30 19:33:01 +02:00
|
|
|
Name: mbedtls
|
2022-01-14 14:58:34 +01:00
|
|
|
Version: 2.28.0
|
2015-03-30 19:33:01 +02:00
|
|
|
Release: 0
|
2016-09-30 15:22:53 +02:00
|
|
|
Summary: Libraries for crypto and SSL/TLS protocols
|
|
|
|
License: Apache-2.0
|
2015-03-30 19:33:01 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2018-03-12 12:07:47 +01:00
|
|
|
URL: https://tls.mbed.org
|
2021-01-20 08:18:23 +01:00
|
|
|
Source: https://github.com/ARMmbed/mbedtls/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2015-08-10 09:11:21 +02:00
|
|
|
Source99: baselibs.conf
|
2015-03-30 19:33:01 +02:00
|
|
|
BuildRequires: cmake
|
2019-09-03 17:04:20 +02:00
|
|
|
BuildRequires: ninja
|
2016-07-21 07:52:59 +02:00
|
|
|
BuildRequires: pkgconfig
|
2016-09-30 15:22:53 +02:00
|
|
|
BuildRequires: pkgconfig(libpkcs11-helper-1)
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
2015-03-30 19:33:01 +02:00
|
|
|
|
|
|
|
%description
|
2016-09-30 15:22:53 +02:00
|
|
|
mbedtls implements the SSL3, TLS 1.0, 1.1 and 1.2 protocols. It
|
|
|
|
supports a number of extensions such as SSL Session Tickets (RFC
|
|
|
|
5077), Server Name Indication (SNI) (RFC 6066), Truncated HMAC (RFC
|
|
|
|
6066), Max Fragment Length (RFC 6066), Secure Renegotiation (RFC
|
|
|
|
5746) and Application Layer Protocol Negotiation (ALPN). It
|
|
|
|
understands the RSA, (EC)DH(E)-RSA, (EC)DH(E)-PSK and RSA-PSK key
|
|
|
|
exchanges.
|
|
|
|
|
|
|
|
%package -n %{lib_tls}
|
|
|
|
Summary: Transport Layer Security protocol suite
|
|
|
|
Group: System/Libraries
|
2015-03-30 19:33:01 +02:00
|
|
|
|
2016-09-30 15:22:53 +02:00
|
|
|
%description -n %{lib_tls}
|
|
|
|
mbedtls implements the SSL 3.0, TLS 1.0, 1.1 and 1.2 protocols. It
|
|
|
|
supports a number of extensions such as SSL Session Tickets (RFC
|
|
|
|
5077), Server Name Indication (SNI) (RFC 6066), Truncated HMAC (RFC
|
|
|
|
6066), Max Fragment Length (RFC 6066), Secure Renegotiation (RFC
|
|
|
|
5746) and Application Layer Protocol Negotiation (ALPN). It
|
|
|
|
understands the RSA, (EC)DH(E)-RSA, (EC)DH(E)-PSK and RSA-PSK key
|
|
|
|
exchanges.
|
|
|
|
|
|
|
|
%package -n %{lib_crypto}
|
|
|
|
Summary: Cryptographic base library for mbedtls
|
2015-03-30 19:33:01 +02:00
|
|
|
Group: System/Libraries
|
|
|
|
|
2016-09-30 15:22:53 +02:00
|
|
|
%description -n %{lib_crypto}
|
|
|
|
This subpackage of mbedtls contains a library that exposes
|
|
|
|
cryptographic ciphers, hashes, algorithms and format support such as
|
|
|
|
AES, MD5, SHA, Elliptic Curves, BigNum, PKCS, ASN.1, BASE64.
|
|
|
|
|
|
|
|
%package -n %{lib_x509}
|
|
|
|
Summary: Library to work with X.509 certificates
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %{lib_x509}
|
|
|
|
This subpackage of mbedtls contains a library that can read, verify
|
|
|
|
and write X.509 certificates, read/write Certificate Signing Requests
|
|
|
|
and read Certificate Revocation Lists.
|
2015-03-30 19:33:01 +02:00
|
|
|
|
|
|
|
%package devel
|
2016-09-30 15:22:53 +02:00
|
|
|
Summary: Development files for mbedtls, a SSL/TLS library
|
2015-03-30 19:33:01 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2016-09-30 15:22:53 +02:00
|
|
|
Requires: %{lib_crypto} = %{version}
|
|
|
|
Requires: %{lib_tls} = %{version}
|
|
|
|
Requires: %{lib_x509} = %{version}
|
2015-03-30 19:33:01 +02:00
|
|
|
|
|
|
|
%description devel
|
2016-09-30 15:22:53 +02:00
|
|
|
This subpackage contains the development files for mbedtls,
|
|
|
|
a suite of libraries for cryptographic functions and the
|
|
|
|
SSL/TLS protocol suite.
|
2015-03-30 19:33:01 +02:00
|
|
|
|
|
|
|
%prep
|
2021-03-23 08:12:35 +01:00
|
|
|
%autosetup -p1
|
2016-09-30 15:22:53 +02:00
|
|
|
sed -i 's|//\(#define MBEDTLS_ZLIB_SUPPORT\)|\1|' include/mbedtls/config.h
|
|
|
|
sed -i 's|//\(#define MBEDTLS_HAVEGE_C\)|\1|' include/mbedtls/config.h
|
|
|
|
sed -i 's|//\(#define MBEDTLS_THREADING_C\)|\1|' include/mbedtls/config.h
|
|
|
|
sed -i 's|//\(#define MBEDTLS_THREADING_PTHREAD\)|\1|' include/mbedtls/config.h
|
2015-03-30 19:33:01 +02:00
|
|
|
|
|
|
|
%build
|
2019-09-03 17:04:20 +02:00
|
|
|
%define __builder ninja
|
2021-04-15 18:00:58 +02:00
|
|
|
export CFLAGS="%{optflags} -Wno-stringop-overflow -Wno-maybe-uninitialized"
|
|
|
|
export CXXLAGS="%{optflags} -Wno-stringop-overflow -Wno-maybe-uninitialized"
|
2015-03-30 19:33:01 +02:00
|
|
|
%cmake \
|
2021-04-15 18:00:58 +02:00
|
|
|
-DUNSAFE_BUILD=ON \
|
2016-09-30 15:22:53 +02:00
|
|
|
-DLINK_WITH_PTHREAD=ON \
|
|
|
|
-DUSE_PKCS11_HELPER_LIBRARY=ON \
|
|
|
|
-DENABLE_ZLIB_SUPPORT=ON \
|
|
|
|
-DINSTALL_MBEDTLS_HEADERS=ON \
|
2016-01-15 10:38:38 +01:00
|
|
|
-DUSE_SHARED_MBEDTLS_LIBRARY=ON \
|
|
|
|
-DUSE_STATIC_MBEDTLS_LIBRARY=OFF \
|
2020-09-07 08:46:16 +02:00
|
|
|
-DENABLE_PROGRAMS=OFF \
|
|
|
|
-DCMAKE_POLICY_DEFAULT_CMP0012=NEW
|
2019-09-03 17:04:20 +02:00
|
|
|
%cmake_build
|
2015-03-30 19:33:01 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
%cmake_install
|
|
|
|
|
|
|
|
%check
|
2020-08-31 12:41:37 +02:00
|
|
|
# parallel execution fails
|
|
|
|
# %%ctest
|
|
|
|
pushd build
|
2021-01-20 08:18:23 +01:00
|
|
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
|
|
|
|
%{_bindir}/ctest --output-on-failure --force-new-ctest-process -j1
|
2015-03-30 19:33:01 +02:00
|
|
|
|
2016-09-30 15:22:53 +02:00
|
|
|
%post -n %{lib_tls} -p /sbin/ldconfig
|
|
|
|
%post -n %{lib_crypto} -p /sbin/ldconfig
|
|
|
|
%post -n %{lib_x509} -p /sbin/ldconfig
|
|
|
|
%postun -n %{lib_tls} -p /sbin/ldconfig
|
|
|
|
%postun -n %{lib_crypto} -p /sbin/ldconfig
|
|
|
|
%postun -n %{lib_x509} -p /sbin/ldconfig
|
2015-03-30 19:33:01 +02:00
|
|
|
|
|
|
|
%files devel
|
2018-03-12 12:07:47 +01:00
|
|
|
%license LICENSE
|
|
|
|
%doc ChangeLog README.md
|
2016-09-30 15:22:53 +02:00
|
|
|
%dir %{_includedir}/mbedtls
|
2020-08-17 12:36:14 +02:00
|
|
|
%dir %{_includedir}/psa
|
2016-09-30 15:22:53 +02:00
|
|
|
%{_includedir}/mbedtls/*.h
|
2020-08-17 12:36:14 +02:00
|
|
|
%{_includedir}/psa/*.h
|
2015-03-30 19:33:01 +02:00
|
|
|
%{_libdir}/libmbedtls.so
|
2016-09-30 15:22:53 +02:00
|
|
|
%{_libdir}/libmbedcrypto.so
|
|
|
|
%{_libdir}/libmbedx509.so
|
2015-03-30 19:33:01 +02:00
|
|
|
|
2016-09-30 15:22:53 +02:00
|
|
|
%files -n %{lib_tls}
|
2018-03-12 12:07:47 +01:00
|
|
|
%license LICENSE
|
2015-03-30 19:33:01 +02:00
|
|
|
%{_libdir}/libmbedtls.so.*
|
|
|
|
|
2016-09-30 15:22:53 +02:00
|
|
|
%files -n %{lib_crypto}
|
2018-03-12 12:07:47 +01:00
|
|
|
%license LICENSE
|
2016-09-30 15:22:53 +02:00
|
|
|
%{_libdir}/libmbedcrypto.so.*
|
|
|
|
|
|
|
|
%files -n %{lib_x509}
|
2018-03-12 12:07:47 +01:00
|
|
|
%license LICENSE
|
2016-09-30 15:22:53 +02:00
|
|
|
%{_libdir}/libmbedx509.so.*
|
|
|
|
|
2015-03-30 19:33:01 +02:00
|
|
|
%changelog
|