GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
X509AT_ADD1_ATTR(3) FreeBSD 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_attr
change an array of X.501 Attribute objects

#include <openssl/x509.h>

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

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

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

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

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

X509at_add1_attr() 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.

X509at_add1_attr_by_OBJ(), X509at_add1_attr_by_NID(), and X509at_add1_attr_by_txt() 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().

X509at_delete_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 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.