[openssl/openssl] 957484: Pre-declare all core dispatch table functions, and...

Richard Levitte noreply at reply.github.openssl.org
Wed Jul 13 05:58:51 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.openssl.org/openssl/openssl
  Commit: 9574842e90e29015daa2b071e965cec9aa885c17
      https://github.openssl.org/openssl/openssl/commit/9574842e90e29015daa2b071e965cec9aa885c17
  Author: Richard Levitte <levitte at openssl.org>
  Date:   2022-07-13 (Wed, 13 Jul 2022)

  Changed paths:
    M crypto/provider_core.c
    M crypto/rand/prov_seed.c
    M include/crypto/rand.h

  Log Message:
  -----------
  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 at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18198)




More information about the openssl-commits mailing list