SNMP++: chicken and egg openssl check?

In the latest snmp++, 3.6.6.

The file “include/snmp_pp/auth_priv.h” includes <openssl/macros.h>, in order to check preprocessor symbols - and uses one to decide whether to include an openssl v3 header.

However, the file <openssl/macros.h> was (AFAICT) only introduced in openssl v3…

From my information openssl/macros.h was available already in 2019 in OpenSSL but OpenSSL was introduced 2021. Do you have a concrete compilation error with more details and the used OpenSSL version that we can debug?

Yes, the macros.h header was available in 2019, from the birth of OpenSSL v3, but for any versions less than v3 the header is not available.

Realistically, that’s going to be OpenSSL version 1.1.1.

Yes, this is an old (now unsupported) version. However, we have legacy code that is tied to this (via buildroot).

At the moment we’ve simply patched the header to remove the include statement, then all compiles.

I have a openssl-1.1.1h.tar.gz that does not contain the macros.h file, so I think we should just replace the macros.h with opensslv.h which defines the used OPENSSL_VERSION_NUMBER.

1 Like