Patch to build with OpenSSL-1.1.x
This commit is contained in:
parent
23a5e179b1
commit
724e0db5f2
27
tboot-1.9.6-openssl11.patch
Normal file
27
tboot-1.9.6-openssl11.patch
Normal file
@ -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
|
@ -1,15 +1,16 @@
|
|||||||
Summary: Performs a verified launch using Intel TXT
|
Summary: Performs a verified launch using Intel TXT
|
||||||
Name: tboot
|
Name: tboot
|
||||||
Version: 1.9.6
|
Version: 1.9.6
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
|
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://sourceforge.net/projects/tboot/
|
URL: http://sourceforge.net/projects/tboot/
|
||||||
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
||||||
|
Patch1: tboot-1.9.6-openssl11.patch
|
||||||
BuildRequires: trousers-devel
|
BuildRequires: trousers-devel
|
||||||
BuildRequires: compat-openssl10-devel
|
BuildRequires: openssl-devel
|
||||||
ExclusiveArch: %{ix86} x86_64
|
ExclusiveArch: %{ix86} x86_64
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -19,6 +20,7 @@ and verified launch of an OS kernel/VMM.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch1 -p1 -b .openssl11
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
|
CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
|
||||||
@ -67,6 +69,9 @@ make debug=y DISTDIR=$RPM_BUILD_ROOT install
|
|||||||
/boot/tboot-syms
|
/boot/tboot-syms
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 06 2018 Tomáš Mráz <tmraz@redhat.com> - 1:1.9.6-2
|
||||||
|
- Patch to build with OpenSSL-1.1.x
|
||||||
|
|
||||||
* Sun Feb 04 2018 Filipe Rosset <rosset.filipe@gmail.com> - 1:1.9.6-1
|
* Sun Feb 04 2018 Filipe Rosset <rosset.filipe@gmail.com> - 1:1.9.6-1
|
||||||
- Upgrade to latest upstream version
|
- Upgrade to latest upstream version
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user