]> git.ipfire.org Git - thirdparty/bind9.git/commit
Simplify opensslecdsa_fromlabel
authorMatthijs Mekking <matthijs@isc.org>
Tue, 5 Jan 2021 09:53:17 +0000 (10:53 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Tue, 26 Jan 2021 14:01:26 +0000 (15:01 +0100)
commit393052d6ff7a79c557554823a06a27ea4da2079b
tree9380de101627c44d59f6046f1f6d9f9a8f5e4455
parent1fcd0ef8bda011dbec33f067ba4b39461682cb21
Simplify opensslecdsa_fromlabel

The 'opensslecdsa_fromlabel()' function does not need to get the
OpenSSL engine twice to load the private and public key. Also no need
to call 'dst_key_to_eckey()' as the EC_KEY can be derived from the
loaded EVP_PKEY's.

Add some extra checks to ensure the key has the same base id and curve
(group nid) as the dst key.

Since we already have the EVP_PKEY, no need to call 'finalize_eckey()',
instead just set the right values in the key structure.
lib/dns/opensslecdsa_link.c