NLnetLabs / ldns

LDNS is a DNS library that facilitates DNS tool programming
https://nlnetlabs.nl/ldns
BSD 3-Clause "New" or "Revised" License
295 stars 99 forks source link

1.7.1 fails to build with OpenSSL 3.0.0 beta2 #135

Closed thesamesam closed 3 years ago

thesamesam commented 3 years ago

Reported downstream in Gentoo first.

/var/tmp/portage/net-libs/ldns-1.7.1-r4/work/ldns-1.7.1/dnssec_sign.c: In function ‘ldns_pkey_is_ecdsa’:
/var/tmp/portage/net-libs/ldns-1.7.1-r4/work/ldns-1.7.1/dnssec_sign.c:420:26: error: ‘key’ undeclared (first use in this function); did you mean ‘pkey’?
  420 |         if(EVP_PKEY_type(key->type) != EVP_PKEY_EC)
      |                          ^~~
      |                          pkey

I've attached the full build.log too.

wcawijngaards commented 3 years ago

The current code base already has some fixes compared to 1.7.1, but also needed to be fixed for the lib64 directory used by openssl 3.0.0, and also for the define of a function to another, causing the configure test to fail to link with it, even though it is present. The fixed code now checks for then new function presence EVP_PKEY_get_base_id.