---
name: "libressl-X509V3_parse_list"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-X509V3_parse_list"
---

# libressl-X509V3\_parse\_list(3)

create and destroy CONF\_VALUE objects

## NAME

**X509V3\_parse\_list**, **X509V3\_conf\_free** – create and destroy CONF\_VALUE objects

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

**#include \<openssl/x509v3.h\>**

*STACK\_OF(CONF\_VALUE)* *\**\

**X509V3\_parse\_list**(*const char \*string*);

*void*\

**X509V3\_conf\_free**(*CONF\_VALUE \*conf*);

## DESCRIPTION

**X509V3\_parse\_list**() parses the *string* and allocates an array of *CONF\_VALUE* objects according to the following rules.

1. The string is split into fields at comma (‘,’) characters.

2. 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 and NULL is used as the associated value.

3. For each name and each value, leading and trailing whitespace as defined by [isspace(3)](/isspace/3.md) is ignored.

4. 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.

**X509V3\_conf\_free**() releases all memory used by *conf*. If *conf* is NULL, no action occurs.

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.

## 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.

## SEE ALSO

[isspace(3)](/isspace/3.md), 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.
