]> git.ipfire.org Git - thirdparty/openssl.git/commit
syscall_random(): don't fail if the getentropy() function is a dummy
authorYury Is <yury.coder@gmail.com>
Mon, 12 Oct 2020 23:24:52 +0000 (02:24 +0300)
committerDr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com>
Wed, 14 Oct 2020 05:52:39 +0000 (07:52 +0200)
commit8e596a93bc266259f1ef0d56601e58bbfe18317a
treed564b5ee175617e5caf3b8e7c1a2826d89a6ecbd
parent58608c7c7ac664e03d8f4acffd9420e56d148320
syscall_random(): don't fail if the getentropy() function is a dummy

Several embedded toolchains may provide dummy implemented getentropy()
function which always returns -1 and sets errno to the ENOSYS.

As a result the function SSL_CTX_new() fails to create a new context.

Fixes #13002

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/13114)
providers/implementations/rands/seeding/rand_unix.c