logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

X509_REQ_get_extensions, X509_REQ_add_extensions, X509_REQ_add_extensions_nid - handle X.509 extension

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_nid() adds to req a list of X.509 extensions exts, using nid to identify the
       extensions attribute.  req is unchanged if exts is NULL or an empty list.  This function may be called
       more than once on the same req and nid.  In such case any previous extensions are augmented, where an
       extension to be added that has the same OID as a pre-existing one replaces this earlier one.

       X509_REQ_add_extensions() is like X509_REQ_add_extensions_nid() except that the default NID_ext_req is
       used.

Name

       X509_REQ_get_extensions, X509_REQ_add_extensions, X509_REQ_add_extensions_nid - handle X.509 extension
       attributes of a CSR

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.

Synopsis

        #include <openssl/x509.h>

        STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(const 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);

See Also