X509_REQ_ADD_EXTENSIONS(3)
okay so this page is X509_REQ_ADD_EXTENSIONS(3), from the Library Functions Manual, and itβs all about extensions in certification requests. bestie, itβs giving ASN.1 but make it cute. π
π NAME π
X509_REQ_add_extensions,X509_REQ_add_extensions_nid,X509_REQ_get_extensions,X509_REQ_extension_nidβ extensions in certification requests
β¨ SYNOPSIS β¨
#include <openssl/x509.h>
int
X509_REQ_add_extensions(X509_REQ *req,
STACK_OF(X509_EXTENSION) *extensions);
int
X509_REQ_add_extensions_nid(X509_REQ *req,
STACK_OF(X509_EXTENSION) *extensions, int nid);
STACK_OF(X509_EXTENSION) *
X509_REQ_get_extensions(X509_REQ *req);
int
X509_REQ_extension_nid(int nid);
π DESCRIPTION π
okay so hereβs the vibe check on each little function, bestie:
X509_REQ_add_extensions()β it takes that array of extensions and encodes it withi2d_X509_EXTENSIONS(3). then it adds a new X.501 Attribute object toreq, of the typeNID_ext_req, using the equivalent ofX509_ATTRIBUTE_create_by_NID(3)with a type ofV_ASN1_SEQUENCE. iconic behavior, no cap. π₯X509_REQ_add_extensions_nid()β literally identical, except thenidyou pass in is used as the X.501 Attribute type instead ofNID_ext_req. same energy, different label. πX509_REQ_get_extensions()β it retrieves the first value of the first X.501 Attribute of appropriate type. by default, the attribute typesNID_ext_reqandNID_ms_ext_reqare considered appropriate. iykyk. π¦X509_REQ_extension_nid()β checks whetherX509_REQ_get_extensions()regards thenidargument as a type appropriate for storing extensions. itβs the vibe-checker for nids. π
π«Ά RETURN VALUES π«Ά
X509_REQ_add_extensions()andX509_REQ_add_extensions_nid()β return1for success or0for failure. slay or donβt slay, those are the options. β¨X509_REQ_get_extensions()β returns a newly allocated array of ASN.1 Extension objects orNULLifreqisNULL, does not containCertificationRequestInfo, contains no attribute of an appropriate type, or if decoding or memory allocation fails. πX509_REQ_extension_nid()β returns1ifnidis considered appropriate or0otherwise. simple as that, bestie. π
π₯ SEE ALSO π₯
π¦ HISTORY π¦
These functions first appeared in OpenSSL 0.9.5 and have been available since OpenBSD 2.7. vintage but still main character energy. π
Source/version: Debian Β· date: August 18, 2024 Β· manual: X509_REQ_ADD_EXTENSIONS(3) β byeeeee π
π¦ where this page comes from
- opensuse-leap 16.0: libressl-devel-doc 4.1.0-bp160.1.1 Β· OpenSSL
- Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms