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

Richard Levitte noreply at reply.github.openssl.org
Wed Jul 13 06:00:12 UTC 2022


  Branch: refs/heads/openssl-3.0
  Home:   https://github.openssl.org/openssl/openssl
  Commit: 372f4b80e35954d19ffb255692bdd6e4807e5f7a
      https://github.openssl.org/openssl/openssl/commit/372f4b80e35954d19ffb255692bdd6e4807e5f7a
  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)

(cherry picked from commit 9574842e90e29015daa2b071e965cec9aa885c17)




More information about the openssl-commits mailing list