X509V3_PARSE_LIST(3)
πΈ X509V3_PARSE_LIST(3) πΈ
okay so this is the X509V3_PARSE_LIST(3) page from the Library Functions Manual, and itβs all about making and destroying CONF_VALUE objects. bestie, itβs literally two functions and theyβre both giving very specific energy. no cap β¨
β¨ NAME β¨
X509V3_parse_list, X509V3_conf_free β create and destroy CONF_VALUE objects
π SYNOPSIS π
#include <openssl/x509v3.h>
STACK_OF(CONF_VALUE) *
X509V3_parse_list(const char *string);
void
X509V3_conf_free(CONF_VALUE *conf);
π DESCRIPTION π
Okay so X509V3_parse_list() parses the string and allocates an array of CONF_VALUE objects according to these rules, periodt:
- The string is split into fields at comma (
,) characters. - If a field contains a colon (
:) character, the part before the colon is regarded as a name and the part after the first colon as the associated value. Otherwise, the whole field is regarded as the name andNULLis used as the associated value. - For each name and each value, leading and trailing whitespace as defined by
isspace(3)is ignored. - Parsing ends when a
NUL, carriage return, or newline character is encountered.
A new, empty STACK_OF(CONF_VALUE) is allocated and for each parsed name, one CONF_VALUE structure containing the optional value is pushed onto it. slay π«Ά
X509V3_conf_free() releases all memory used by conf. If conf is NULL, no action occurs. lowkey iconic.
The typical way to release the memory returned from X509V3_parse_list() is by calling sk_CONF_VALUE_pop_free() on it, passing a pointer to the function X509V3_conf_free() as the second argument. iykyk π
π RETURN VALUES π
X509V3_parse_list() returns the new STACK_OF(CONF_VALUE) object or NULL if an error occurs, in particular if there isnβt any name, if the name before a colon or after a comma is empty, if the value after a colon is empty, or if memory allocation fails. the vibes are not immaculate when that happens π
π¦ SEE ALSO π¦
isspace(3), sk_pop_free(3), STACK_OF(3), v2i_ASN1_BIT_STRING(3)
π HISTORY π
X509V3_parse_list() and X509V3_conf_free() first appeared in OpenSSL 0.9.2 and have been available since OpenBSD 2.6. history said what it said π
and the footer tea is: Debian, December 24, 2024 π thatβs the source/version and date, bestie, weβre done here β¨
π¦ where this page comes from
- opensuse-leap 16.0: libressl-devel-doc 4.1.0-bp160.1.1 Β· OpenSSL
- Copyright (c) 2024 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