From 1a7ceb6c74d930fd5dfbcd06350b4cef0228936b Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Fri, 15 May 2020 18:46:59 +0200 Subject: [PATCH] Correct the #define's of EVP_PKEY_CTRL_SET1_ID and EVP_PKEY_CTRL_GET1_ID{,_LEN} Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/11808) --- include/openssl/ec.h | 7 ++++--- include/openssl/evp.h | 10 +--------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/include/openssl/ec.h b/include/openssl/ec.h index 35dbeb9301..822e3e9b28 100644 --- a/include/openssl/ec.h +++ b/include/openssl/ec.h @@ -1500,9 +1500,10 @@ int EVP_PKEY_CTX_get0_ecdh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char **ukm); # define EVP_PKEY_CTRL_GET_EC_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 8) # define EVP_PKEY_CTRL_EC_KDF_UKM (EVP_PKEY_ALG_CTRL + 9) # define EVP_PKEY_CTRL_GET_EC_KDF_UKM (EVP_PKEY_ALG_CTRL + 10) -# define EVP_PKEY_CTRL_SET1_ID (EVP_PKEY_ALG_CTRL + 11) -# define EVP_PKEY_CTRL_GET1_ID (EVP_PKEY_ALG_CTRL + 12) -# define EVP_PKEY_CTRL_GET1_ID_LEN (EVP_PKEY_ALG_CTRL + 13) +/* TODO move next three #defines to evp.h when 'breaking' change is possible */ +# define EVP_PKEY_CTRL_SET1_ID 15 +# define EVP_PKEY_CTRL_GET1_ID 16 +# define EVP_PKEY_CTRL_GET1_ID_LEN 17 /* KDF types */ # define EVP_PKEY_ECDH_KDF_NONE 1 diff --git a/include/openssl/evp.h b/include/openssl/evp.h index 189112efaa..f1dc6204bc 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -1532,28 +1532,20 @@ int EVP_PKEY_CTX_set_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD *md); # define EVP_PKEY_CTRL_MD 1 # define EVP_PKEY_CTRL_PEER_KEY 2 - # define EVP_PKEY_CTRL_PKCS7_ENCRYPT 3 # define EVP_PKEY_CTRL_PKCS7_DECRYPT 4 - # define EVP_PKEY_CTRL_PKCS7_SIGN 5 - # define EVP_PKEY_CTRL_SET_MAC_KEY 6 - # define EVP_PKEY_CTRL_DIGESTINIT 7 - /* Used by GOST key encryption in TLS */ # define EVP_PKEY_CTRL_SET_IV 8 - # define EVP_PKEY_CTRL_CMS_ENCRYPT 9 # define EVP_PKEY_CTRL_CMS_DECRYPT 10 # define EVP_PKEY_CTRL_CMS_SIGN 11 - # define EVP_PKEY_CTRL_CIPHER 12 - # define EVP_PKEY_CTRL_GET_MD 13 - # define EVP_PKEY_CTRL_SET_DIGEST_SIZE 14 +/* TODO move here three #defines of EVP_PKEY_CTRL_*ET1_ID* from ec.h */ # define EVP_PKEY_ALG_CTRL 0x1000