diff options
author | Matt Caswell <matt@openssl.org> | 2020-10-09 14:19:42 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-10-20 16:39:41 +0100 |
commit | 5ac8fb584a0ba8e4223e98b87a5416d67340360e (patch) | |
tree | d127cc3bc9bb60a2c0a0da2dab13b9ed779eb4dd /include | |
parent | 6a13c9c9842f54ed8d98c6f37cc4ae6c1cde8b7a (diff) |
Rename EVP_PKEY_set1_tls_encodedpoint to EVP_PKEY_set1_encoded_public_key
We do the same thing for the "get1" version. In reality this has broader
use than just TLS (it can also be used in CMS), and "encodedpoint" only
makes sense when you are talking about EC based algorithms.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13105)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/core_names.h | 2 | ||||
-rw-r--r-- | include/openssl/evp.h | 21 |
2 files changed, 19 insertions, 4 deletions
diff --git a/include/openssl/core_names.h b/include/openssl/core_names.h index 4a4bd36cbe..6a50f10da7 100644 --- a/include/openssl/core_names.h +++ b/include/openssl/core_names.h @@ -261,7 +261,7 @@ extern "C" { #define OSSL_PKEY_PARAM_MASKGENFUNC "mgf" #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_ENCODED_PUBLIC_KEY "encoded-pub-key" #define OSSL_PKEY_PARAM_GROUP_NAME "group" #define OSSL_PKEY_PARAM_DIST_ID "distid" #define OSSL_PKEY_PARAM_PUB_KEY "pub" diff --git a/include/openssl/evp.h b/include/openssl/evp.h index 326289a1dd..834e00b84d 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -1280,9 +1280,24 @@ int EVP_PKEY_get_default_digest_name(EVP_PKEY *pkey, char *mdname, size_t mdname_sz); int EVP_PKEY_supports_digest_nid(EVP_PKEY *pkey, int nid); -int EVP_PKEY_set1_tls_encodedpoint(EVP_PKEY *pkey, - const unsigned char *pt, size_t ptlen); -size_t EVP_PKEY_get1_tls_encodedpoint(EVP_PKEY *pkey, unsigned char **ppt); +/* + * For backwards compatibility. Use EVP_PKEY_set1_encoded_public_key in + * preference + */ +#define EVP_PKEY_set1_tls_encodedpoint(pkey, pt, ptlen) \ + EVP_PKEY_set1_encoded_public_key((pkey), (pt), (ptlen)) + +int EVP_PKEY_set1_encoded_public_key(EVP_PKEY *pkey, + const unsigned char *pub, size_t publen); + +/* + * For backwards compatibility. Use EVP_PKEY_get1_encoded_public_key in + * preference + */ +#define EVP_PKEY_get1_tls_encodedpoint(pkey, ppt) \ + EVP_PKEY_get1_encoded_public_key((pkey), (ppt)) + +size_t EVP_PKEY_get1_encoded_public_key(EVP_PKEY *pkey, unsigned char **ppub); int EVP_CIPHER_type(const EVP_CIPHER *ctx); |