Sortix cross-nightly manual
This manual documents Sortix cross-nightly. You can instead view this document in the latest official manual.
NAME
CMS_signed_add1_attr, CMS_signed_add1_attr_by_NID, CMS_signed_add1_attr_by_OBJ, CMS_signed_add1_attr_by_txt, CMS_signed_delete_attr, CMS_signed_get0_data_by_OBJ, CMS_signed_get_attr, CMS_signed_get_attr_by_NID, CMS_signed_get_attr_by_OBJ, CMS_signed_get_attr_count, CMS_unsigned_add1_attr, CMS_unsigned_add1_attr_by_NID, CMS_unsigned_add1_attr_by_OBJ, CMS_unsigned_add1_attr_by_txt, CMS_unsigned_delete_attr, CMS_unsigned_get0_data_by_OBJ, CMS_unsigned_get_attr, CMS_unsigned_get_attr_by_NID, CMS_unsigned_get_attr_by_OBJ, CMS_unsigned_get_attr_count — change signed and unsigned attributes of a CMS SignerInfo objectSYNOPSIS
#include <openssl/cms.h>CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si, int nid, int type, const void *bytes, int len);
CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *obj, int type, const void *bytes, int len);
CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si, const char *attrname, int type, const void *bytes, int len);
CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);
CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *oid, int lastpos, int type);
CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);
CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid, int lastpos);
CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj, int lastpos);
CMS_signed_get_attr_count(const CMS_SignerInfo *si);
CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si, int nid, int type, const void *bytes, int len);
CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *obj, int type, const void *bytes, int len);
CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si, const char *attrname, int type, const void *bytes, int len);
CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);
CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid, int lastpos, int type);
CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);
CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid, int lastpos);
CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj, int lastpos);
CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);
DESCRIPTION
A CMS_SignerInfo object has two optional sets of X.501 attributes: a set of signed attributes in the signedAttrs array and a set of unsigned attributes in the unsignedAttrs array. The functions in this manual are wrappers of the X509at_*() functions. All arguments except si are passed to X509at_*(). The CMS_signed_*() and CMS_unsigned_*() functions are similar, except CMS_signed_*() calls X509at_*() with the CMS_SignerInfo object's set of signed attributes and CMS_unsigned_*() calls X509at_*() with the CMS_SignerInfo object's set of unsigned attributes. For brevity only the CMS_signed_*() functions are described below.RETURN VALUES
CMS_signed_add1_attr(), CMS_signed_add1_attr_by_NID(), CMS_signed_add1_attr_by_OBJ(), CMS_signed_add1_attr_by_txt(), CMS_unsigned_add1_attr(), CMS_unsigned_add1_attr_by_NID(), CMS_unsigned_add1_attr_by_OBJ(), and CMS_unsigned_add1_attr_by_txt() return 1 for success or 0 if an error occurs.SEE ALSO
CMS_add1_signer(3), CMS_ContentInfo_new(3), CMS_get0_SignerInfos(3), OBJ_nid2obj(3), X509_ATTRIBUTE_create_by_OBJ(3), X509_ATTRIBUTE_new(3), X509at_add1_attr(3)STANDARDS
RFC 5652: Cryptographic Message Syntax (CMS)- section 5.3: SignerInfo Type
- section 11: Useful Attributes