summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-05-19 15:24:25 +0100
committerMatt Caswell <matt@openssl.org>2020-06-19 10:19:31 +0100
commit11a1b341f3bc6a0afe75f9432f623026624fb720 (patch)
tree8beadffedb50c9c324a3234832bb5dd80f56ca95 /include
parent9d2d857f135abd281591ee0c2b58e01a710c3cea (diff)
Make EVP_PKEY_CTX_[get|set]_ec_paramgen_curve_name more generic
We rename these function to EVP_PKEY_CTX_get_group_name and EVP_PKEY_CTX_set_group_name so that they can be used for other algorithms other than EC. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/11914)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/core_names.h2
-rw-r--r--include/openssl/ec.h4
-rw-r--r--include/openssl/evp.h3
3 files changed, 4 insertions, 5 deletions
diff --git a/include/openssl/core_names.h b/include/openssl/core_names.h
index 96b9d7e684..9d99bc486f 100644
--- a/include/openssl/core_names.h
+++ b/include/openssl/core_names.h
@@ -195,6 +195,7 @@ extern "C" {
#define OSSL_PKEY_PARAM_MGF1_DIGEST "mgf1-digest"
#define OSSL_PKEY_PARAM_MGF1_PROPERTIES "mgf1-properties"
#define OSSL_PKEY_PARAM_TLS_ENCODED_PT "tls-encoded-pt"
+#define OSSL_PKEY_PARAM_GROUP_NAME "group-name"
/* Diffie-Hellman/DSA public/private key */
#define OSSL_PKEY_PARAM_PUB_KEY "pub"
@@ -222,7 +223,6 @@ extern "C" {
#define OSSL_PKEY_PARAM_DH_PRIV_LEN "priv_len"
/* Elliptic Curve Domain Parameters */
-#define OSSL_PKEY_PARAM_EC_NAME "curve-name"
#define OSSL_PKEY_PARAM_EC_PUB_X "qx"
#define OSSL_PKEY_PARAM_EC_PUB_Y "qy"
diff --git a/include/openssl/ec.h b/include/openssl/ec.h
index 90e109b61e..1302e27bb0 100644
--- a/include/openssl/ec.h
+++ b/include/openssl/ec.h
@@ -1450,10 +1450,6 @@ DEPRECATEDIN_3_0(void EC_KEY_METHOD_get_verify
# endif
# endif
-int EVP_PKEY_CTX_set_ec_paramgen_curve_name(EVP_PKEY_CTX *ctx,
- const char *name);
-int EVP_PKEY_CTX_get_ec_paramgen_curve_name(EVP_PKEY_CTX *ctx,
- char *name, size_t namelen);
int EVP_PKEY_CTX_set_ec_paramgen_curve_nid(EVP_PKEY_CTX *ctx, int nid);
# define EVP_PKEY_CTX_set_ec_param_enc(ctx, flag) \
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index 9ce2f5e2ac..2b39d613b0 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -1886,6 +1886,9 @@ int EVP_str2ctrl(int (*cb)(void *ctx, int cmd, void *buf, size_t buflen),
int EVP_hex2ctrl(int (*cb)(void *ctx, int cmd, void *buf, size_t buflen),
void *ctx, int cmd, const char *hex);
+int EVP_PKEY_CTX_set_group_name(EVP_PKEY_CTX *ctx, const char *name);
+int EVP_PKEY_CTX_get_group_name(EVP_PKEY_CTX *ctx, char *name, size_t namelen);
+
# ifdef __cplusplus
}
# endif