summaryrefslogtreecommitdiff
path: root/random
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2021-11-17 14:44:16 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2021-11-17 14:44:16 +0900
commitd5ae5229db70f71301a3f3eefdd38a73a4fde499 (patch)
treece3a59b9776367826ac9a1978e204b9279487222 /random
parent5a26ef4f35a5d6e107bcfb0ceff5fbe7e02a22a4 (diff)
downloadlibgcrypt-d5ae5229db70f71301a3f3eefdd38a73a4fde499.tar.gz
jitterentropy: Fix building rndjent.
* random/Makefile.am: Update for new jitterentropy. * random/rndjent.c: Update to include the other files. -- GnuPG-bug-id: 5523 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'random')
-rw-r--r--random/Makefile.am16
-rw-r--r--random/rndjent.c11
2 files changed, 25 insertions, 2 deletions
diff --git a/random/Makefile.am b/random/Makefile.am
index 87326810..5db4c602 100644
--- a/random/Makefile.am
+++ b/random/Makefile.am
@@ -51,9 +51,13 @@ rndegd.c \
rndunix.c \
rndw32.c \
rndw32ce.c \
+jitterentropy-gcd.c jitterentropy-gcd.h \
+jitterentropy-health.c jitterentropy-health.h \
+jitterentropy-noise.c jitterentropy-noise.h \
+jitterentropy-sha3.c jitterentropy-sha3.h \
+jitterentropy-timer.c jitterentropy-timer.h \
jitterentropy-base.c jitterentropy.h jitterentropy-base-user.h
-
# The rndjent module needs to be compiled without optimization. */
if ENABLE_O_FLAG_MUNGING
o_flag_munging = sed -e 's/-O\([1-9sg][1-9sg]*\)/-O0/g' -e 's/-Ofast/-O0/g'
@@ -62,9 +66,19 @@ o_flag_munging = cat
endif
rndjent.o: $(srcdir)/rndjent.c jitterentropy-base-user.h \
+ $(srcdir)/jitterentropy-gcd.c $(srcdir)/jitterentropy-gcd.h \
+ $(srcdir)/jitterentropy-health.c $(srcdir)/jitterentropy-health.h \
+ $(srcdir)/jitterentropy-noise.c $(srcdir)/jitterentropy-noise.h \
+ $(srcdir)/jitterentropy-sha3.c $(srcdir)/jitterentropy-sha3.h \
+ $(srcdir)/jitterentropy-timer.c $(srcdir)/jitterentropy-timer.h \
$(srcdir)/jitterentropy-base.c $(srcdir)/jitterentropy.h
`echo $(COMPILE) -c $(srcdir)/rndjent.c | $(o_flag_munging) `
rndjent.lo: $(srcdir)/rndjent.c jitterentropy-base-user.h \
+ $(srcdir)/jitterentropy-gcd.c $(srcdir)/jitterentropy-gcd.h \
+ $(srcdir)/jitterentropy-health.c $(srcdir)/jitterentropy-health.h \
+ $(srcdir)/jitterentropy-noise.c $(srcdir)/jitterentropy-noise.h \
+ $(srcdir)/jitterentropy-sha3.c $(srcdir)/jitterentropy-sha3.h \
+ $(srcdir)/jitterentropy-timer.c $(srcdir)/jitterentropy-timer.h \
$(srcdir)/jitterentropy-base.c $(srcdir)/jitterentropy.h
`echo $(LTCOMPILE) -c $(srcdir)/rndjent.c | $(o_flag_munging) `
diff --git a/random/rndjent.c b/random/rndjent.c
index 56648a87..c467d513 100644
--- a/random/rndjent.c
+++ b/random/rndjent.c
@@ -43,6 +43,8 @@
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
+#include <unistd.h>
+#include <errno.h>
#include "types.h"
#include "g10lib.h"
@@ -84,7 +86,14 @@
#define JENT_PRIVATE_COMPILE 1
#include "jitterentropy-base.c"
-
+#ifdef JENT_CONF_ENABLE_INTERNAL_TIMER
+#include <pthread.h>
+#endif /* JENT_CONF_ENABLE_INTERNAL_TIMER */
+#include "jitterentropy-gcd.c"
+#include "jitterentropy-health.c"
+#include "jitterentropy-noise.c"
+#include "jitterentropy-sha3.c"
+#include "jitterentropy-timer.c"
/* This is the lock we use to serialize access to this RNG. The extra
* integer variable is only used to check the locking state; that is,