new upstream version 1.7.6
This commit is contained in:
parent
0aa4874598
commit
1c953f2503
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ libgcrypt-1.4.5-hobbled.tar.bz2
|
||||
/libgcrypt-1.6.6-hobbled.tar.xz
|
||||
/libgcrypt-1.7.3-hobbled.tar.xz
|
||||
/libgcrypt-1.7.5-hobbled.tar.xz
|
||||
/libgcrypt-1.7.6-hobbled.tar.xz
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -up libgcrypt-1.7.3/random/rndlinux.c.use-poll libgcrypt-1.7.3/random/rndlinux.c
|
||||
--- libgcrypt-1.7.3/random/rndlinux.c.use-poll 2016-11-22 16:05:05.114761069 +0100
|
||||
+++ libgcrypt-1.7.3/random/rndlinux.c 2016-11-22 16:16:05.373139721 +0100
|
||||
diff -up libgcrypt-1.7.6/random/rndlinux.c.use-poll libgcrypt-1.7.6/random/rndlinux.c
|
||||
--- libgcrypt-1.7.6/random/rndlinux.c.use-poll 2017-01-30 14:20:13.665662981 +0100
|
||||
+++ libgcrypt-1.7.6/random/rndlinux.c 2017-01-30 14:27:45.957027214 +0100
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
@ -9,7 +9,7 @@ diff -up libgcrypt-1.7.3/random/rndlinux.c.use-poll libgcrypt-1.7.3/random/rndli
|
||||
#if defined(__linux__) && defined(HAVE_SYSCALL)
|
||||
# include <sys/syscall.h>
|
||||
#endif
|
||||
@@ -211,9 +212,11 @@ _gcry_rndlinux_gather_random (void (*add
|
||||
@@ -211,9 +212,8 @@ _gcry_rndlinux_gather_random (void (*add
|
||||
return with something we will actually use 100ms. */
|
||||
while (length)
|
||||
{
|
||||
@ -17,13 +17,10 @@ diff -up libgcrypt-1.7.3/random/rndlinux.c.use-poll libgcrypt-1.7.3/random/rndli
|
||||
- struct timeval tv;
|
||||
int rc;
|
||||
+ struct pollfd pfd;
|
||||
+
|
||||
+ pfd.fd = fd;
|
||||
+ pfd.events = POLLIN;
|
||||
|
||||
/* If we collected some bytes update the progress indicator. We
|
||||
do this always and not just if the select timed out because
|
||||
@@ -227,33 +230,19 @@ _gcry_rndlinux_gather_random (void (*add
|
||||
/* If we have a modern Linux kernel and we want to read from the
|
||||
* the non-blocking /dev/urandom, we first try to use the new
|
||||
@@ -269,33 +269,22 @@ _gcry_rndlinux_gather_random (void (*add
|
||||
any_need_entropy = 1;
|
||||
}
|
||||
|
||||
@ -35,13 +32,10 @@ diff -up libgcrypt-1.7.3/random/rndlinux.c.use-poll libgcrypt-1.7.3/random/rndli
|
||||
-#ifdef FD_SETSIZE
|
||||
- if (fd < FD_SETSIZE)
|
||||
-#endif
|
||||
+ pfd.fd = fd;
|
||||
+ pfd.events = POLLIN;
|
||||
+
|
||||
+ if ( !(rc=poll(&pfd, 1, delay)) )
|
||||
+ {
|
||||
+ any_need_entropy = 1;
|
||||
+ delay = 3000; /* Use 3 seconds henceforth. */
|
||||
+ continue;
|
||||
+ }
|
||||
+ else if( rc == -1 )
|
||||
{
|
||||
- FD_ZERO(&rfds);
|
||||
- FD_SET(fd, &rfds);
|
||||
@ -61,6 +55,12 @@ diff -up libgcrypt-1.7.3/random/rndlinux.c.use-poll libgcrypt-1.7.3/random/rndli
|
||||
- we have ever blocked. */
|
||||
- continue;
|
||||
- }
|
||||
+ any_need_entropy = 1;
|
||||
+ delay = 3000; /* Use 3 seconds henceforth. */
|
||||
+ continue;
|
||||
+ }
|
||||
+ else if( rc == -1 )
|
||||
+ {
|
||||
+ log_error ("poll() error: %s\n", strerror(errno));
|
||||
+ if (!delay)
|
||||
+ delay = 1000; /* Use 1 second if we encounter an error before
|
||||
@ -68,4 +68,4 @@ diff -up libgcrypt-1.7.3/random/rndlinux.c.use-poll libgcrypt-1.7.3/random/rndli
|
||||
+ continue;
|
||||
}
|
||||
|
||||
/* If we have a modern Linux kernel and we want to read from the
|
||||
/* Read from the device. */
|
@ -1,5 +1,5 @@
|
||||
Name: libgcrypt
|
||||
Version: 1.7.5
|
||||
Version: 1.7.6
|
||||
Release: 1%{?dist}
|
||||
URL: http://www.gnupg.org/
|
||||
Source0: libgcrypt-%{version}-hobbled.tar.xz
|
||||
@ -27,7 +27,7 @@ Patch6: libgcrypt-1.7.3-fips-cfgrandom.patch
|
||||
# update the CAVS tests
|
||||
Patch7: libgcrypt-1.7.3-fips-cavs.patch
|
||||
# use poll instead of select when gathering randomness
|
||||
Patch11: libgcrypt-1.7.3-use-poll.patch
|
||||
Patch11: libgcrypt-1.7.6-use-poll.patch
|
||||
# slight optimalization of mpicoder.c to silence Valgrind (#968288)
|
||||
Patch13: libgcrypt-1.6.1-mpicoder-gccopt.patch
|
||||
# fix tests to work with approved ECC
|
||||
@ -197,6 +197,9 @@ exit 0
|
||||
%license COPYING
|
||||
|
||||
%changelog
|
||||
* Mon Jan 30 2017 Tomáš Mráz <tmraz@redhat.com> 1.7.6-1
|
||||
- new upstream version 1.7.6
|
||||
|
||||
* Fri Dec 16 2016 Tomáš Mráz <tmraz@redhat.com> 1.7.5-1
|
||||
- new upstream version 1.7.5
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (libgcrypt-1.7.5-hobbled.tar.xz) = 687a4d01e02d8a92faeec6e9e9a3dbd32e71df9da83c2f1d69c2d8a625ce572d1ee1f025f4b5563b294f450849d65ce3da31a9e9f9cd47438da3b558e6e15c77
|
||||
SHA512 (libgcrypt-1.7.6-hobbled.tar.xz) = 4aa981f4b270e480324dc3b021781c0b01a0f1fc5950654ccd379d47acbb791a2df612f212191ecac50c39a7ba83cc62de9a9271c663aad6d49721de14ecced5
|
||||
|
Loading…
Reference in New Issue
Block a user