GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
X509V3_PARSE_LIST(3) FreeBSD Library Functions Manual X509V3_PARSE_LIST(3)

X509V3_parse_list, X509V3_conf_freecreate and destroy CONF_VALUE objects

#include <openssl/x509v3.h>

STACK_OF(CONF_VALUE) *
X509V3_parse_list(const char *string);

void
X509V3_conf_free(CONF_VALUE *conf);

() 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) 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.

() releases all memory used by conf. If conf is NULL, no action occurs.

The typical way to release the memory returned from () is by calling () on it, passing a pointer to the function X509V3_conf_free() as the second argument.

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.

isspace(3), sk_pop_free(3), STACK_OF(3), v2i_ASN1_BIT_STRING(3)

X509V3_parse_list() and X509V3_conf_free() first appeared in OpenSSL 0.9.2 and have been available since OpenBSD 2.6.

December 24, 2024 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.