Drop ASN1_PKEY_CTRL_SUPPORTS_MD_NID
authorTomas Mraz <tomas@openssl.org>
Fri, 7 May 2021 14:56:34 +0000 (16:56 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 13 May 2021 11:17:05 +0000 (13:17 +0200)
This is a legacy ASN1_PKEY_CTRL that was added after
1.1.1 and is not needed.

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15198)

crypto/evp/p_lib.c
include/openssl/evp.h

index 5cfc7405f3fd54fc8fd710b5425b9a03050027bb..d997ae80e1a6386753931d2a9c4c946a9a0daa67 100644 (file)
@@ -1337,9 +1337,8 @@ int EVP_PKEY_get_group_name(const EVP_PKEY *pkey, char *gname, size_t gname_sz,
 
 int EVP_PKEY_supports_digest_nid(EVP_PKEY *pkey, int nid)
 {
 
 int EVP_PKEY_supports_digest_nid(EVP_PKEY *pkey, int nid)
 {
-    int rv, default_nid;
+    int rv = -2, default_nid;
 
 
-    rv = evp_pkey_asn1_ctrl(pkey, ASN1_PKEY_CTRL_SUPPORTS_MD_NID, nid, NULL);
     if (rv == -2) {
         /*
          * If there is a mandatory default digest and this isn't it, then
     if (rv == -2) {
         /*
          * If there is a mandatory default digest and this isn't it, then
index 9d4867ea990801b157be089a4f9ff9c9c24b629c..e17dec8a2cb758b57131701a80bf56b21e62cd7e 100644 (file)
@@ -1513,8 +1513,7 @@ int EVP_PBE_get(int *ptype, int *ppbe_nid, size_t num);
 
 # define ASN1_PKEY_CTRL_SET1_TLS_ENCPT   0x9
 # define ASN1_PKEY_CTRL_GET1_TLS_ENCPT   0xa
 
 # define ASN1_PKEY_CTRL_SET1_TLS_ENCPT   0x9
 # define ASN1_PKEY_CTRL_GET1_TLS_ENCPT   0xa
-# define ASN1_PKEY_CTRL_SUPPORTS_MD_NID  0xb
-# define ASN1_PKEY_CTRL_CMS_IS_RI_TYPE_SUPPORTED 0xc
+# define ASN1_PKEY_CTRL_CMS_IS_RI_TYPE_SUPPORTED 0xb
 
 int EVP_PKEY_asn1_get_count(void);
 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
 
 int EVP_PKEY_asn1_get_count(void);
 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);