From: tb Date: Fri, 26 Jul 2024 13:23:52 +0000 (+0000) Subject: Inline a few trivial X509at_* calls in cms X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6018a687e2203fd643f036de9340d79bc41a2671;p=openbsd Inline a few trivial X509at_* calls in cms ok jsing --- diff --git a/lib/libcrypto/cms/cms_att.c b/lib/libcrypto/cms/cms_att.c index 62362ad3f98..390ad6e74b0 100644 --- a/lib/libcrypto/cms/cms_att.c +++ b/lib/libcrypto/cms/cms_att.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cms_att.c,v 1.11 2023/07/08 08:26:26 beck Exp $ */ +/* $OpenBSD: cms_att.c,v 1.12 2024/07/26 13:23:52 tb Exp $ */ /* * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. @@ -64,7 +64,7 @@ int CMS_signed_get_attr_count(const CMS_SignerInfo *si) { - return X509at_get_attr_count(si->signedAttrs); + return sk_X509_ATTRIBUTE_num(si->signedAttrs); } LCRYPTO_ALIAS(CMS_signed_get_attr_count); @@ -86,14 +86,14 @@ LCRYPTO_ALIAS(CMS_signed_get_attr_by_OBJ); X509_ATTRIBUTE * CMS_signed_get_attr(const CMS_SignerInfo *si, int loc) { - return X509at_get_attr(si->signedAttrs, loc); + return sk_X509_ATTRIBUTE_value(si->signedAttrs, loc); } LCRYPTO_ALIAS(CMS_signed_get_attr); X509_ATTRIBUTE * CMS_signed_delete_attr(CMS_SignerInfo *si, int loc) { - return X509at_delete_attr(si->signedAttrs, loc); + return sk_X509_ATTRIBUTE_delete(si->signedAttrs, loc); } LCRYPTO_ALIAS(CMS_signed_delete_attr); @@ -147,7 +147,7 @@ LCRYPTO_ALIAS(CMS_signed_get0_data_by_OBJ); int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si) { - return X509at_get_attr_count(si->unsignedAttrs); + return sk_X509_ATTRIBUTE_num(si->unsignedAttrs); } LCRYPTO_ALIAS(CMS_unsigned_get_attr_count); @@ -169,14 +169,14 @@ LCRYPTO_ALIAS(CMS_unsigned_get_attr_by_OBJ); X509_ATTRIBUTE * CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc) { - return X509at_get_attr(si->unsignedAttrs, loc); + return sk_X509_ATTRIBUTE_value(si->unsignedAttrs, loc); } LCRYPTO_ALIAS(CMS_unsigned_get_attr); X509_ATTRIBUTE * CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc) { - return X509at_delete_attr(si->unsignedAttrs, loc); + return sk_X509_ATTRIBUTE_delete(si->unsignedAttrs, loc); } LCRYPTO_ALIAS(CMS_unsigned_delete_attr);