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
commita4b85d840951739dd62fc246ac18df2975d614c0 (patch)
treefdecdce8a9a72a2dd0999b4aa52eca812e51d045 /src
parent0480fe6a94e3afde7e2d8ac3ee22ef700a08d7cf (diff)
downloadopenbsd-a4b85d840951739dd62fc246ac18df2975d614c0.tar.gz
openbsd-a4b85d840951739dd62fc246ac18df2975d614c0.tar.bz2
openbsd-a4b85d840951739dd62fc246ac18df2975d614c0.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),