---
name: "libressl-X509_INFO_new"
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-X509_INFO_new"
---

# libressl-X509\_INFO\_new(3)

X.509 certificate wrapper object

## NAME

**X509\_INFO\_new**, **X509\_INFO\_free** – X.509 certificate wrapper object

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

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

*X509\_INFO* *\**\

**X509\_INFO\_new**(*void*);

*void*\

**X509\_INFO\_free**(*X509\_INFO \*info*);

## DESCRIPTION

*X509\_INFO* is a reference-counted wrapper object storing a pointer to an X.509 certificate together with pointers to the associated private key and to an associated certificate revocation list. It is for example used internally by X509\_load\_cert\_crl\_file(3).

**X509\_INFO\_new**() allocates and initializes an empty *X509\_INFO* object and sets its reference count to 1.

**X509\_INFO\_free**() decrements the reference count of *info* by 1. If the reference count reaches 0, it frees all referenced objects as well as the storage needed for *info* itself. If *info* is a NULL pointer, no action occurs.

## RETURN VALUES

**X509\_INFO\_new**() returns the newly allocated *X509\_INFO* object or NULL if an error occurs.

## SEE ALSO

PEM\_X509\_INFO\_read\_bio(3), X509\_CRL\_new(3), X509\_new(3)

## HISTORY

**X509\_INFO\_new**() and **X509\_INFO\_free**() first appeared in SSLeay 0.5.1 and have been available since OpenBSD 2.4.
