]> 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:01:04 +0000 (15:01 +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'.

lib/dns/opensslecdsa_link.c

index dd3c1bbf6659beae51fa8bd4e6550dfd4eb1671e..98c41a79389731965cc62c8e9bc8bc2022ab9ff1 100644 (file)
@@ -628,7 +628,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));