]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
load_pubkey_from_engine() should load public key
authorMatthijs Mekking <matthijs@isc.org>
Wed, 25 Nov 2020 08:23:57 +0000 (09:23 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Tue, 26 Jan 2021 14:03:43 +0000 (15:03 +0100)
The 'function load_pubkey_from_engine()' made a call to the libssl
function 'ENGINE_load_private_key'.  This is a copy paste error and
should be 'ENGINE_load_public_key'.

(cherry picked from commit 370285a62dd1fb5e29972c4160332c729ba67aeb)

lib/dns/opensslecdsa_link.c

index f54ae5b769d60430f749e3fe25664bd6075de535..9fdb2eb31ba551267b07aaaefc5a6626d225908e 100644 (file)
@@ -630,7 +630,7 @@ load_pubkey_from_engine(EC_KEY *eckey, const char *engine, const char *label) {
                return (DST_R_NOENGINE);
        }
 
-       EVP_PKEY *pubkey = ENGINE_load_private_key(ep, label, NULL, NULL);
+       EVP_PKEY *pubkey = ENGINE_load_public_key(ep, label, NULL, NULL);
        if (pubkey == NULL) {
                return (dst__openssl_toresult2("ENGINE_load_public_key",
                                               ISC_R_NOTFOUND));