forked from pool/fipscheck
Accepting request 503203 from home:dmolkentin:branches:security
- Port to OpenSSL 1.1 (osc#1042649) Adds openssl-1_1-port.patch OBS-URL: https://build.opensuse.org/request/show/503203 OBS-URL: https://build.opensuse.org/package/show/security/fipscheck?expand=0&rev=12
This commit is contained in:
parent
07513a0ba9
commit
111e45e6ea
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 12 14:21:41 UTC 2017 - daniel.molkentin@suse.com
|
||||
|
||||
- Port to OpenSSL 1.1 (osc#1042649)
|
||||
Adds openssl-1_1-port.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 13 08:50:02 UTC 2015 - jengelh@inai.de
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package fipscheck
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -27,6 +27,7 @@ Group: Development/Libraries/C and C++
|
||||
Url: http://fedorahosted.org/fipscheck/
|
||||
Source0: http://fedorahosted.org/releases/f/i/%{name}/%{name}-%{version}.tar.bz2
|
||||
Source1: baselibs.conf
|
||||
Patch0: openssl-1_1-port.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: libopenssl-devel >= 0.9.8j
|
||||
Requires: %{lname} = %{version}
|
||||
@ -57,6 +58,7 @@ This package contains development files for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%configure --disable-static --libdir=/%{_lib}
|
||||
|
50
openssl-1_1-port.patch
Normal file
50
openssl-1_1-port.patch
Normal file
@ -0,0 +1,50 @@
|
||||
Index: fipscheck-1.4.1/src/filehmac.c
|
||||
===================================================================
|
||||
--- fipscheck-1.4.1.orig/src/filehmac.c
|
||||
+++ fipscheck-1.4.1/src/filehmac.c
|
||||
@@ -166,7 +166,7 @@ compute_file_hmac(const char *path, void
|
||||
int prelink = 0;
|
||||
#endif
|
||||
int rv = -1;
|
||||
- HMAC_CTX c;
|
||||
+ HMAC_CTX *c;
|
||||
unsigned char rbuf[READ_BUFFER_LENGTH];
|
||||
size_t len;
|
||||
unsigned int hlen;
|
||||
@@ -178,7 +178,7 @@ compute_file_hmac(const char *path, void
|
||||
}
|
||||
}
|
||||
|
||||
- HMAC_CTX_init(&c);
|
||||
+ c = HMAC_CTX_new();
|
||||
|
||||
#ifdef CALL_PRELINK
|
||||
if (access(PATH_PRELINK, X_OK) == 0) {
|
||||
@@ -197,15 +197,15 @@ compute_file_hmac(const char *path, void
|
||||
goto end;
|
||||
}
|
||||
|
||||
- HMAC_Init(&c, hmackey, sizeof(hmackey)-1, EVP_sha256());
|
||||
+ HMAC_Init_ex(c, hmackey, sizeof(hmackey)-1, EVP_sha256(), NULL);
|
||||
|
||||
while ((len=fread(rbuf, 1, sizeof(rbuf), f)) != 0) {
|
||||
- HMAC_Update(&c, rbuf, len);
|
||||
+ HMAC_Update(c, rbuf, len);
|
||||
}
|
||||
|
||||
len = sizeof(rbuf);
|
||||
/* reuse rbuf for hmac */
|
||||
- HMAC_Final(&c, rbuf, &hlen);
|
||||
+ HMAC_Final(c, rbuf, &hlen);
|
||||
|
||||
*buf = malloc(hlen);
|
||||
if (*buf == NULL) {
|
||||
@@ -219,7 +219,7 @@ compute_file_hmac(const char *path, void
|
||||
|
||||
rv = 0;
|
||||
end:
|
||||
- HMAC_CTX_cleanup(&c);
|
||||
+ HMAC_CTX_free(c);
|
||||
|
||||
if (f)
|
||||
fclose(f);
|
Loading…
Reference in New Issue
Block a user