]> git.ipfire.org Git - thirdparty/openssl.git/commit
Pre-declare all core dispatch table functions, and fix the internal ones
authorRichard Levitte <levitte@openssl.org>
Thu, 28 Apr 2022 06:15:53 +0000 (08:15 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 13 Jul 2022 05:56:51 +0000 (07:56 +0200)
commit9574842e90e29015daa2b071e965cec9aa885c17
tree974905995b9d6e95a9b6fa6f02dcf3c5124b00cf
parenta0ff8e413e94ba46720a4bf3a5032c50531c526c
Pre-declare all core dispatch table functions, and fix the internal ones

When assigning pointers to functions in an OSSL_DISPATCH table, we try
to ensure that those functions are properly defined or declared with
an extra declaration using the corresponding function typedefs that
are defined by include/openssl/core_dispatch.h.

For the core dispatch table, found in crypto/provider_core.c, it seems
we forgot this habit, and thus didn't ensure well enough that the
function pointers that are assigned in the table can actually be used
for those dispatch table indexes.

This change adds all the missing declarations, and compensates for
differences with functions that do the necessary casting, making those
explicit rather than implicit, thereby trying to assure that we know
what we're doing.

One function is not fixed in this change, because there's a controversy,
a clash between the signature of BIO_ctrl() and OSSL_FUNC_BIO_ctrl_fn.
They have different return types.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18198)
crypto/provider_core.c
crypto/rand/prov_seed.c
include/crypto/rand.h