diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2021-08-06 16:57:19 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2021-08-06 16:57:19 +0900 |
commit | ca6797c5c5c61a0eae1f5aa82988d4870fe5edab (patch) | |
tree | ceb4ac156526f31b5c661bfa13cf75825766b367 /src/visibility.h | |
parent | 538090d829483696de6342f2ea564b2e25d6a294 (diff) | |
download | libgcrypt-ca6797c5c5c61a0eae1f5aa82988d4870fe5edab.tar.gz |
fips: Fix check_binary_integrity.
* src/fips.c: Define FIPS_FORCE_FILE macro earlier.
(check_binary_integrity): Use the address of gcry_check_version.
* src/visibility.h [FIPS_FORCE_FILE] (gcry_check_version): Allow
internal use of exported function.
--
GnuPG-bug-id: 5550
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'src/visibility.h')
-rw-r--r-- | src/visibility.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/visibility.h b/src/visibility.h index b7e8369a..c44cb836 100644 --- a/src/visibility.h +++ b/src/visibility.h @@ -298,7 +298,12 @@ MARK_VISIBLEX (_gcry_mpi_get_const) between a public and an internal version is that the internal version use gpg_err_code_t and the public version gpg_error_t. */ +#if defined(FIPS_FORCE_FILE) +/* It's valid use in src/fips.c to get the address of gcry_check_version. */ +#else #define gcry_check_version _gcry_USE_THE_UNDERSCORED_FUNCTION +#endif + #define gcry_control _gcry_USE_THE_UNDERSCORED_FUNCTION #define gcry_set_allocation_handler _gcry_USE_THE_UNDERSCORED_FUNCTION |