summaryrefslogtreecommitdiffstats
path: root/crypto/cms
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-10-09 14:19:42 +0100
committerMatt Caswell <matt@openssl.org>2020-10-20 16:39:41 +0100
commit5ac8fb584a0ba8e4223e98b87a5416d67340360e (patch)
treed127cc3bc9bb60a2c0a0da2dab13b9ed779eb4dd /crypto/cms
parent6a13c9c9842f54ed8d98c6f37cc4ae6c1cde8b7a (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 'crypto/cms')
-rw-r--r--crypto/cms/cms_dh.c6
-rw-r--r--crypto/cms/cms_ec.c6
2 files changed, 3 insertions, 9 deletions
diff --git a/crypto/cms/cms_dh.c b/crypto/cms/cms_dh.c
index 0d9eac50b3..2c64f50259 100644
--- a/crypto/cms/cms_dh.c
+++ b/crypto/cms/cms_dh.c
@@ -46,11 +46,7 @@ static int dh_cms_set_peerkey(EVP_PKEY_CTX *pctx,
pkpeer = EVP_PKEY_new();
if (pkpeer == NULL
|| !EVP_PKEY_copy_parameters(pkpeer, pk)
- /*
- * TODO(3.0): This is badly named!! Can we make this more
- * generic and not TLS specific?
- */
- || !EVP_PKEY_set1_tls_encodedpoint(pkpeer, p, plen))
+ || !EVP_PKEY_set1_encoded_public_key(pkpeer, p, plen))
goto err;
if (EVP_PKEY_derive_set_peer(pctx, pkpeer) > 0)
diff --git a/crypto/cms/cms_ec.c b/crypto/cms/cms_ec.c
index 79d603adcb..9a602bb81d 100644
--- a/crypto/cms/cms_ec.c
+++ b/crypto/cms/cms_ec.c
@@ -112,8 +112,7 @@ static int ecdh_cms_set_peerkey(EVP_PKEY_CTX *pctx,
if (p == NULL || plen == 0)
goto err;
- /* TODO(3.0): Terrible name. We need a non-tls specific name */
- if (!EVP_PKEY_set1_tls_encodedpoint(pkpeer, p, plen))
+ if (!EVP_PKEY_set1_encoded_public_key(pkpeer, p, plen))
goto err;
if (EVP_PKEY_derive_set_peer(pctx, pkpeer) > 0)
@@ -279,8 +278,7 @@ static int ecdh_cms_encrypt(CMS_RecipientInfo *ri)
if (aoid == OBJ_nid2obj(NID_undef)) {
/* Set the key */
- /* TODO(3.0): Terrible name. Needs a non TLS specific name */
- penclen = EVP_PKEY_get1_tls_encodedpoint(pkey, &penc);
+ penclen = EVP_PKEY_get1_encoded_public_key(pkey, &penc);
ASN1_STRING_set0(pubkey, penc, penclen);
pubkey->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07);
pubkey->flags |= ASN1_STRING_FLAG_BITS_LEFT;