Sponsor:

Your company here, and a link to your site. Click to find out more.

X509_REQ_get_extensions.3ossl - Man Page

handle X.509 extension attributes of a CSR

Synopsis

 #include <openssl/x509.h>

 STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(X509_REQ *req);
 int X509_REQ_add_extensions(X509_REQ *req, const STACK_OF(X509_EXTENSION) *exts);
 int X509_REQ_add_extensions_nid(X509_REQ *req,
                                 const STACK_OF(X509_EXTENSION) *exts, int nid);

Description

X509_REQ_get_extensions() returns the first list of X.509 extensions found in the attributes of req. The returned list is empty if there are no such extensions in req. The caller is responsible for freeing the list obtained.

X509_REQ_add_extensions() adds to req a list of X.509 extensions exts, which must not be NULL, using the default NID_ext_req. This function must not be called more than once on the same req.

X509_REQ_add_extensions_nid() is like X509_REQ_add_extensions() except that nid is used to identify the extensions attribute. This function must not be called more than once with the same req and nid.

Return Values

X509_REQ_get_extensions() returns a pointer to STACK_OF(X509_EXTENSION) or NULL on error.

X509_REQ_add_extensions() and X509_REQ_add_extensions_nid() return 1 on success, 0 on error.

Referenced By

The man pages X509_REQ_add_extensions.3ossl(3) and X509_REQ_add_extensions_nid.3ossl(3) are aliases of X509_REQ_get_extensions.3ossl(3).

2024-04-04 3.2.1 OpenSSL