From 46ceca3c91cc7b8e8f522009e7338a9a96952e6e Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Fri, 8 Jun 2018 11:03:32 +0200 Subject: [PATCH] rand/rand_unix.c: omit error from DSO_global_lookup. If built with no-dso, DSO_global_lookup leaves "unsupported" message in error queue. Since there is a fall-back code, it's unnecessary distraction. Reviewed-by: Rich Salz Reviewed-by: Kurt Roeckx (Merged from https://github.com/openssl/openssl/pull/6436) --- crypto/rand/rand_unix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c index 9f17494d11..e8222e9873 100644 --- a/crypto/rand/rand_unix.c +++ b/crypto/rand/rand_unix.c @@ -247,7 +247,9 @@ int syscall_random(void *buf, size_t buflen) * - Linux since 3.17 with glibc 2.25 * - FreeBSD since 12.0 (1200061) */ + ERR_set_mark(); p_getentropy.p = DSO_global_lookup("getentropy"); + ERR_pop_to_mark(); if (p_getentropy.p != NULL) return p_getentropy.f(buf, buflen) == 0 ? buflen : 0; -- 2.34.1