]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
explicitly set ec points properties in pre-3.0 openssl
authorAydın Mercan <aydin@isc.org>
Wed, 14 Jan 2026 14:32:01 +0000 (17:32 +0300)
committerAydın Mercan <aydin@isc.org>
Mon, 2 Feb 2026 08:50:14 +0000 (11:50 +0300)
Generating a P-256 key in pre-3.0 wasn't explicitly using uncompressed
named curves in DNSSEC but was when generating an epheremal TLS key.

lib/isc/ossl_wrap/ossl1_1.c

index e5d63e2706e0456d9211d75119b1769e14b1594d..7726e9cac3d0c3e79e9722b373241e28ac8711a3 100644 (file)
@@ -122,6 +122,9 @@ generate_ec_key(EVP_PKEY **pkeyp, const int nid) {
                CLEANUP(OSSL_WRAP_ERROR("EC_KEY_generate_key"));
        }
 
+       EC_KEY_set_asn1_flag(eckey, OPENSSL_EC_NAMED_CURVE);
+       EC_KEY_set_conv_form(eckey, POINT_CONVERSION_UNCOMPRESSED);
+
        pkey = EVP_PKEY_new();
        if (pkey == NULL) {
                CLEANUP(OSSL_WRAP_ERROR("EVP_PKEY_new"));