summaryrefslogtreecommitdiff
path: root/random/rand-internal.h
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@iki.fi>2021-01-21 22:15:50 +0200
committerJussi Kivilinna <jussi.kivilinna@iki.fi>2021-01-26 19:41:09 +0200
commit8d404a629167d67ed56e45de3e65d1e0b7cdeb24 (patch)
tree05d2f1de652f6efad983ce012298f18469e54c50 /random/rand-internal.h
parent3b34bd6e178614d6021ee7d1140646f7c8ed7519 (diff)
downloadlibgcrypt-8d404a629167d67ed56e45de3e65d1e0b7cdeb24.tar.gz
Define HW-feature flags per architecture
* random/rand-internal.h (_gcry_rndhw_poll_slow): Add requested length parameter. * random/rndhw.c (_gcry_rndhw_poll_slow): Limit accounted bytes to 50% (or 25% for RDRAND) - this code is moved from caller side. * random/rndlinux.c (_gcry_rndlinux_gather_random): Move HWF_INTEL_RDRAND check to _gcry_rndhw_poll_slow. * src/g10lib.h (HWF_PADLOCK_*, HWF_INTEL_*): Define only if HAVE_CPU_ARCH_X86. (HWF_ARM_*): Define only if HAVE_CPU_ARCH_ARM. (HWF_PPC_*): Define only if HAVE_CPU_ARCH_PPC. (HWF_S390X_*): Define only if HAVE_CPU_ARCH_S390X. -- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'random/rand-internal.h')
-rw-r--r--random/rand-internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/random/rand-internal.h b/random/rand-internal.h
index d99c6671..34221569 100644
--- a/random/rand-internal.h
+++ b/random/rand-internal.h
@@ -141,7 +141,7 @@ void _gcry_rndhw_poll_fast (void (*add)(const void*, size_t,
enum random_origins origin);
size_t _gcry_rndhw_poll_slow (void (*add)(const void*, size_t,
enum random_origins),
- enum random_origins origin);
+ enum random_origins origin, size_t req_length);