]> git.ipfire.org Git - thirdparty/curl.git/commit
tidy-up: use `OPENSSL_VERSION_NUMBER`
authorViktor Szakats <commit@vsz.me>
Wed, 8 Nov 2023 04:39:54 +0000 (04:39 +0000)
committerViktor Szakats <commit@vsz.me>
Wed, 8 Nov 2023 17:55:22 +0000 (17:55 +0000)
commit9fb6cc54c59760bee23c730f668653895e713a25
tree471b700727df751cb3a544da209e8afee3d7910d
parent6d558cbfd03ad70b365ad322676c76ec47d18619
tidy-up: use `OPENSSL_VERSION_NUMBER`

Uniformly use `OPENSSL_VERSION_NUMBER` to check for OpenSSL version.
Before this patch some places used `OPENSSL_VERSION_MAJOR`.

Also fix `lib/md4.c`, which included `opensslconf.h`, but that doesn't
define any version number in these implementations: BoringSSL, AWS-LC,
LibreSSL, wolfSSL. (Only in mainline OpenSSL/quictls). Switch that to
`opensslv.h`. This wasn't causing a deeper problem because the code is
looking for v3, which is only provided by OpenSSL/quictls as of now.

According to https://github.com/openssl/openssl/issues/17517, the macro
`OPENSSL_VERSION_NUMBER` is safe to use and not deprecated.

Reviewed-by: Marcel Raad
Closes #12298
lib/md4.c
lib/vtls/openssl.c
m4/curl-amissl.m4
m4/curl-openssl.m4