diff options
author | Daiki Ueno <dueno@redhat.com> | 2020-04-06 14:37:53 +0200 |
---|---|---|
committer | Daiki Ueno <dueno@redhat.com> | 2020-04-24 18:30:21 +0200 |
commit | b2cf035b754211c34d0559e57e1dbc82365af83a (patch) | |
tree | 621d760509c96afb23e4f444218a42f9f919422b /lib | |
parent | 804a7da030609a3eafcf25f6905f450ad000e0a8 (diff) | |
download | gnutls-b2cf035b754211c34d0559e57e1dbc82365af83a.tar.gz |
fips: check library soname during configuretmp-check-soname
Previously, we hard-coded the sonames of linked libraries for FIPS
integrity checking. That required downstream packagers to manually
adjust the relevant code in lib/fips.c, when a new interface version
of the dependent libraries (nettle, gmp) becomes available and linked
to libgnutls.
This patch automates that process with the configure script.
Signed-off-by: Daiki Ueno <dueno@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fips.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/fips.c b/lib/fips.c index 902af56749..3c43250aaf 100644 --- a/lib/fips.c +++ b/lib/fips.c @@ -135,10 +135,12 @@ void _gnutls_fips_mode_reset_zombie(void) } } -#define GNUTLS_LIBRARY_NAME "libgnutls.so.30" -#define NETTLE_LIBRARY_NAME "libnettle.so.6" -#define HOGWEED_LIBRARY_NAME "libhogweed.so.4" -#define GMP_LIBRARY_NAME "libgmp.so.10" +/* These only works with the platform where SONAME is part of the ABI. + * For example, *_SONAME will be set to "none" on Windows platforms. */ +#define GNUTLS_LIBRARY_NAME GNUTLS_LIBRARY_SONAME +#define NETTLE_LIBRARY_NAME NETTLE_LIBRARY_SONAME +#define HOGWEED_LIBRARY_NAME HOGWEED_LIBRARY_SONAME +#define GMP_LIBRARY_NAME GMP_LIBRARY_SONAME #define HMAC_SUFFIX ".hmac" #define HMAC_SIZE 32 |