diff --git a/tboot-1.9.6-openssl11.patch b/tboot-1.9.6-openssl11.patch new file mode 100644 index 0000000..1583832 --- /dev/null +++ b/tboot-1.9.6-openssl11.patch @@ -0,0 +1,27 @@ +diff -up tboot-1.9.6/lcptools/hash.c.openssl11 tboot-1.9.6/lcptools/hash.c +--- tboot-1.9.6/lcptools/hash.c.openssl11 2017-07-12 01:03:58.000000000 +0200 ++++ tboot-1.9.6/lcptools/hash.c 2018-02-06 11:28:05.062843233 +0100 +@@ -74,13 +74,19 @@ bool hash_buffer(const unsigned char* bu + return false; + + if ( hash_alg == TB_HALG_SHA1_LG ) { +- EVP_MD_CTX ctx; ++ EVP_MD_CTX *ctx; + const EVP_MD *md; + + md = EVP_sha1(); +- EVP_DigestInit(&ctx, md); +- EVP_DigestUpdate(&ctx, buf, size); +- EVP_DigestFinal(&ctx, hash->sha1, NULL); ++ if ( md == NULL ) ++ return false; ++ ctx = EVP_MD_CTX_create(); ++ if ( ctx == NULL ) ++ return false; ++ EVP_DigestInit(ctx, md); ++ EVP_DigestUpdate(ctx, buf, size); ++ EVP_DigestFinal(ctx, hash->sha1, NULL); ++ EVP_MD_CTX_destroy(ctx); + return true; + } + else diff --git a/tboot.spec b/tboot.spec index dceb095..160a13d 100644 --- a/tboot.spec +++ b/tboot.spec @@ -1,15 +1,16 @@ Summary: Performs a verified launch using Intel TXT Name: tboot Version: 1.9.6 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 Group: System Environment/Base License: BSD URL: http://sourceforge.net/projects/tboot/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Patch1: tboot-1.9.6-openssl11.patch BuildRequires: trousers-devel -BuildRequires: compat-openssl10-devel +BuildRequires: openssl-devel ExclusiveArch: %{ix86} x86_64 %description @@ -19,6 +20,7 @@ and verified launch of an OS kernel/VMM. %prep %setup -q +%patch1 -p1 -b .openssl11 %build CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS @@ -67,6 +69,9 @@ make debug=y DISTDIR=$RPM_BUILD_ROOT install /boot/tboot-syms %changelog +* Tue Feb 06 2018 Tomáš Mráz - 1:1.9.6-2 +- Patch to build with OpenSSL-1.1.x + * Sun Feb 04 2018 Filipe Rosset - 1:1.9.6-1 - Upgrade to latest upstream version