summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2022-05-24 20:00:15 +0000
committertb <>2022-05-24 20:00:15 +0000
commitec1bdf8bd3305af29424a61ce4b3f36852f88a35 (patch)
treefdecdce8a9a72a2dd0999b4aa52eca812e51d045 /src
parentb3e8f6098fa098706771fedc141c43820fd740b5 (diff)
downloadopenbsd-ec1bdf8bd3305af29424a61ce4b3f36852f88a35.tar.gz
openbsd-ec1bdf8bd3305af29424a61ce4b3f36852f88a35.tar.bz2
openbsd-ec1bdf8bd3305af29424a61ce4b3f36852f88a35.zip
Straightforward conversion of ecdh_cms_encrypt() to
asn1_abs_set_unused_bits() ok jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/ec/ec_ameth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/ec_ameth.c b/src/lib/libcrypto/ec/ec_ameth.c
index 86f509b736..59957afd3d 100644
--- a/src/lib/libcrypto/ec/ec_ameth.c
+++ b/src/lib/libcrypto/ec/ec_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_ameth.c,v 1.31 2022/01/10 12:10:26 tb Exp $ */ 1/* $OpenBSD: ec_ameth.c,v 1.32 2022/05/24 20:00:15 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -888,8 +888,8 @@ ecdh_cms_encrypt(CMS_RecipientInfo *ri)
888 if (penclen <= 0) 888 if (penclen <= 0)
889 goto err; 889 goto err;
890 ASN1_STRING_set0(pubkey, penc, penclen); 890 ASN1_STRING_set0(pubkey, penc, penclen);
891 pubkey->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07); 891 if (!asn1_abs_set_unused_bits(pubkey, 0))
892 pubkey->flags |= ASN1_STRING_FLAG_BITS_LEFT; 892 goto err;
893 penc = NULL; 893 penc = NULL;
894 894
895 X509_ALGOR_set0(talg, OBJ_nid2obj(NID_X9_62_id_ecPublicKey), 895 X509_ALGOR_set0(talg, OBJ_nid2obj(NID_X9_62_id_ecPublicKey),