jitterentropy/jitterentropy-execution-flow.patch
Vladis Dronov e4f793f49c Update to the latest upstream v3.3.0
- Update to the upstream v3.3.0 commit 418c1e6
- Add small fixes which have missed the v3.3.0 release
  https://github.com/smuellerDD/jitterentropy-library/pull/71

Signed-off-by: Vladis Dronov <vdronov@redhat.com>
2021-09-16 20:23:53 +02:00

32 lines
1.0 KiB
Diff

diff -up src/jitterentropy-base.c.orig src/jitterentropy-base.c
index 30109dc..1911241 100644
--- src/jitterentropy-base.c
+++ src/jitterentropy-base.c
@@ -710,6 +710,8 @@ int jent_entropy_init_ex(unsigned int osr, unsigned int flags)
if (ret)
return ret;
+ ret = ENOTIME;
+
/* Test without internal timer unless caller does not want it */
if (!(flags & JENT_FORCE_INTERNAL_TIMER))
ret = jent_time_entropy_init(osr,
diff -up src/jitterentropy-timer.c.orig src/jitterentropy-timer.c
index 72b17ce..42c5214 100644
--- src/jitterentropy-timer.c
+++ src/jitterentropy-timer.c
@@ -202,8 +202,8 @@ int jent_notime_enable(struct rand_data *ec, unsigned int flags)
if (jent_force_internal_timer || (flags & JENT_FORCE_INTERNAL_TIMER)) {
/* Self test not run yet */
if (!jent_force_internal_timer &&
- jent_time_entropy_init(flags | JENT_FORCE_INTERNAL_TIMER,
- ec->osr))
+ jent_time_entropy_init(ec->osr,
+ flags | JENT_FORCE_INTERNAL_TIMER))
return EHEALTH;
ec->enable_notime = 1;
--
2.26.3