OpenBSD manual page server

Manual Page Search Parameters

X509AT_ADD1_ATTR(3) Library Functions Manual X509AT_ADD1_ATTR(3)

X509at_add1_attr, X509at_add1_attr_by_OBJ, X509at_add1_attr_by_NID, X509at_add1_attr_by_txt, X509at_delete_attrchange an array of X.501 Attribute objects

#include <openssl/x509.h>

X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **pattrs, X509_ATTRIBUTE *attr);

X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **pattrs, const ASN1_OBJECT *obj, int type, const unsigned char *data, int len);

X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **pattrs, int nid, int type, const unsigned char *data, int len);

X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **pattrs, const char *name, int type, const unsigned char *data, int len);

X509at_delete_attr(STACK_OF(X509_ATTRIBUTE) *attrs, int index);

() appends a deep copy of attr to the end of **pattrs. If *pattrs is NULL, a new array is allocated, and in case of success, a pointer to it is assigned to *pattrs.

(), (), and () create a new X.501 Attribute object using X509_ATTRIBUTE_create_by_OBJ(3), X509_ATTRIBUTE_create_by_NID(3), or X509_ATTRIBUTE_create_by_txt(3), respectively, and append it to **pattrs using X509at_add1_attr().

() deletes the element with the zero-based index from the array *attrs.

X509at_add1_attr(), X509at_add1_attr_by_OBJ(), X509at_add1_attr_by_NID(), and X509at_add1_attr_by_txt() return a pointer to the modified or new array or NULL if the pattrs argument is NULL or if creating or copying the X.501 Attribute object or memory allocation fails.

X509at_delete_attr() returns the deleted element or NULL if attrs is NULL or if the requested index is negative or greater than or equal to the number of objects in *attrs.

EVP_PKEY_add1_attr(3), OBJ_nid2obj(3), PKCS8_pkey_add1_attr_by_NID(3), STACK_OF(3), X509_ATTRIBUTE_create_by_OBJ(3), X509_ATTRIBUTE_new(3), X509_REQ_add1_attr(3), X509at_get_attr(3)

These functions first appeared in OpenSSL 0.9.5 and have been available since OpenBSD 2.7.

October 26, 2021 OpenBSD-7.1