X509_REQ_add1_attr
,
X509_REQ_add1_attr_by_OBJ
,
X509_REQ_add1_attr_by_NID
,
X509_REQ_add1_attr_by_txt
,
X509_REQ_delete_attr
,
X509_REQ_get_attr
,
X509_REQ_get_attr_count
,
X509_REQ_get_attr_by_OBJ
,
X509_REQ_get_attr_by_NID
—
X.501 Attributes of PKCS#10 certification
requests
#include
<openssl/x509.h>
int
X509_REQ_add1_attr
(X509_REQ
*req, X509_ATTRIBUTE *attr);
int
X509_REQ_add1_attr_by_OBJ
(X509_REQ
*req, const ASN1_OBJECT *obj,
int type, const unsigned char
*data, int len);
int
X509_REQ_add1_attr_by_NID
(X509_REQ
*req, int nid, int type,
const unsigned char *data, int
len);
int
X509_REQ_add1_attr_by_txt
(X509_REQ
*req, const char *name, int
type, const unsigned char *data,
int len);
X509_ATTRIBUTE *
X509_REQ_delete_attr
(X509_REQ
*req, int index);
X509_ATTRIBUTE *
X509_REQ_get_attr
(const X509_REQ
*req, int index);
int
X509_REQ_get_attr_count
(const X509_REQ
*req);
int
X509_REQ_get_attr_by_OBJ
(const
X509_REQ *req, const ASN1_OBJECT *obj,
int start_after);
int
X509_REQ_get_attr_by_NID
(const
X509_REQ *req, int nid, int
start_after);
X509_REQ_add1_attr
(),
X509_REQ_add1_attr_by_OBJ
(),
X509_REQ_add1_attr_by_NID
(), and
X509_REQ_add1_attr_by_txt
() return 1 for success or
0 for failure.
X509_REQ_delete_attr
() and
X509_REQ_get_attr
() return the deleted or requested
attribute or NULL
if the requested index is negative
or greater than or equal to the current number of attributes associated with
req.
X509_REQ_get_attr_count
() returns the
current number of attributes.
X509_REQ_get_attr_by_OBJ
() and
X509_REQ_get_attr_by_NID
() return the index of the
first attribute that has an index greater than
start_after and a type matching
obj or nid, respectively, or -1
on failure. In addition, X509_REQ_get_attr_by_NID
()
returns -2 if
OBJ_nid2obj(3)
fails on the requested nid.
These functions first appeared in OpenSSL 0.9.5 and have been
available since OpenBSD 2.7.