Bug 2008445

Summary: ldns: FTBFS because EVP_PKEY_base_id is no longer detected
Product: Red Hat Enterprise Linux 9 Reporter: Florian Weimer <fweimer>
Component: ldnsAssignee: Richard Lescak <rlescak>
Status: CLOSED ERRATA QA Contact: Petr Sklenar <psklenar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, jorton, jwboyer, pemensik, psklenar, rhel-cs-infra-services-qe
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ldns-1.7.1-8.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 13:21:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1975099    

Description Florian Weimer 2021-09-28 09:33:11 UTC
A rebuild of ldns-1.7.1-7.el9 fails with this error:

./dnssec_sign.c: In function 'ldns_pkey_is_ecdsa':
./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

Looking at the context:

#ifdef HAVE_EVP_PKEY_BASE_ID
        if(EVP_PKEY_base_id(pkey) != EVP_PKEY_EC)
                return 0;
#else
        if(EVP_PKEY_type(key->type) != EVP_PKEY_EC)
                return 0;
#endif

This happens because HAVE_EVP_PKEY_BASE_ID is not set:

checking for EVP_PKEY_base_id... no

AC_CHECK_FUNCS in configure.ac does not work for preprocessor macros, and EVP_PKEY_base_id is a preprocessor macro in OpenSSL 3.0.

Upstream Git appears to have a patch: https://github.com/NLnetLabs/ldns/commit/12ab6f7a408cd99e9b43b7db86724c2ee66bc36e

Comment 9 errata-xmlrpc 2022-05-17 13:21:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: ldns), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2497