]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
EVP_PKEY_base_id not always available
authorWillem Toorop <willem@nlnetlabs.nl>
Mon, 5 Dec 2016 09:04:13 +0000 (10:04 +0100)
committerWillem Toorop <willem@nlnetlabs.nl>
Mon, 5 Dec 2016 09:04:13 +0000 (10:04 +0100)
dnssec_sign.c

index cd77951ae2a238fb6d6b739ce11a8c0d7b2cdee6..17766f3ae4d524a66ad7afbcfb3ee7063040aa03 100644 (file)
@@ -396,8 +396,13 @@ ldns_pkey_is_ecdsa(EVP_PKEY* pkey)
 {
         EC_KEY* ec;
         const EC_GROUP* g;
+#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
         ec = EVP_PKEY_get1_EC_KEY(pkey);
         g = EC_KEY_get0_group(ec);
         if(!g) {