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

# libressl-POLICYINFO\_new(3)

X.509 certificate policies

## NAME

**POLICYINFO\_new**, **POLICYINFO\_free**, **CERTIFICATEPOLICIES\_new**, **CERTIFICATEPOLICIES\_free**, **POLICYQUALINFO\_new**, **POLICYQUALINFO\_free**, **USERNOTICE\_new**, **USERNOTICE\_free**, **NOTICEREF\_new**, **NOTICEREF\_free**, **POLICY\_MAPPING\_new**, **POLICY\_MAPPING\_free**, **POLICY\_CONSTRAINTS\_new**, **POLICY\_CONSTRAINTS\_free** – X.509 certificate policies

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

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

*POLICYINFO* *\**\

**POLICYINFO\_new**(*void*);

*void*\

**POLICYINFO\_free**(*POLICYINFO \*pi*);

*CERTIFICATEPOLICIES* *\**\

**CERTIFICATEPOLICIES\_new**(*void*);

*void*\

**CERTIFICATEPOLICIES\_free**(*CERTIFICATEPOLICIES \*pis*);

*POLICYQUALINFO* *\**\

**POLICYQUALINFO\_new**(*void*);

*void*\

**POLICYQUALINFO\_free**(*POLICYQUALINFO \*pqi*);

*USERNOTICE* *\**\

**USERNOTICE\_new**(*void*);

*void*\

**USERNOTICE\_free**(*USERNOTICE \*usernotice*);

*NOTICEREF* *\**\

**NOTICEREF\_new**(*void*);

*void*\

**NOTICEREF\_free**(*NOTICEREF \*noticeref*);

*POLICY\_MAPPING* *\**\

**POLICY\_MAPPING\_new**(*void*);

*void*\

**POLICY\_MAPPING\_free**(*POLICY\_MAPPING \*pm*);

*POLICY\_CONSTRAINTS* *\**\

**POLICY\_CONSTRAINTS\_new**(*void*);

*void*\

**POLICY\_CONSTRAINTS\_free**(*POLICY\_CONSTRAINTS \*pc*);

## DESCRIPTION

X.509 CA and end entity certificates can optionally indicate restrictions on their intended use.

**POLICYINFO\_new**() allocates and initializes an empty *POLICYINFO* object, representing an ASN.1 *PolicyInformation* structure defined in RFC 5280 section 4.2.1.4. It can hold a policy identifier and optional advisory qualifiers. **POLICYINFO\_free**() frees *pi*.

**CERTIFICATEPOLICIES\_new**() allocates and initializes an empty *CERTIFICATEPOLICIES* object, which is a *STACK\_OF(POLICYINFO)* and represents an ASN.1 *CertificatePolicies* structure defined in RFC 5280 section 4.2.1.4. It can be used by *X509* objects, both by CA certificates and end entity certificates. **CERTIFICATEPOLICIES\_free**() frees *pis*.

**POLICYQUALINFO\_new**() allocates and initializes an empty *POLICYQUALINFO* object, representing an ASN.1 *PolicyQualifierInfo* structure defined in RFC 5280 section 4.2.1.4. It can be used in *POLICYINFO* and it can hold either a uniform resource identifier of a certification practice statement published by the CA, or a pointer to a *USERNOTICE* object, or arbitrary other information. **POLICYQUALINFO\_free**() frees *pqi*.

**USERNOTICE\_new**() allocates and initializes an empty *USERNOTICE* object, representing an ASN.1 *UserNotice* structure defined in RFC 5280 section 4.2.1.4. It can be used in *POLICYQUALINFO* and it can hold either an *ASN1\_STRING* intended for display to the user or a pointer to a *NOTICEREF* object. **NOTICEREF\_free**() frees *usernotice*.

**NOTICEREF\_new**() allocates and initializes an empty *NOTICEREF* object, representing an ASN.1 *NoticeReference* structure defined in RFC 5280 section 4.2.1.4. It can be used in *USERNOTICE* and can hold an organization name and a stack of notice numbers. **NOTICEREF\_free**() frees *noticeref*.

**POLICY\_MAPPING\_new**() allocates and initializes an empty *POLICY\_MAPPING* object, representing an ASN.1 *PolicyMappings* structure defined in RFC 5280 section 4.2.1.5. It can be used in *X509* CA certificates and can hold a list of pairs of policy identifiers, declaring one of the policies in each pair as equivalent to the other. **POLICY\_MAPPING\_free**() frees *pm*.

**POLICY\_CONSTRAINTS\_new**() allocates and initializes an empty *POLICY\_CONSTRAINTS* object, representing an ASN.1 *PolicyConstraints* structure defined in RFC 5280 section 4.2.1.11. It can be used in *X509* CA certificates to restrict policy mapping and/or to require explicit certificate policies in subsequent intermediate certificates in the certification path. **POLICY\_CONSTRAINTS\_free**() frees *pc*.

## RETURN VALUES

The constructor functions return a new object of the respective type or NULL if an error occurs.

## SEE ALSO

BASIC\_CONSTRAINTS\_new(3), d2i\_POLICYINFO(3), NAME\_CONSTRAINTS\_new(3), X509\_EXTENSION\_new(3), X509\_get\_extension\_flags(3), X509\_new(3)

## STANDARDS

RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile:

- section 4.2.1.4: Certificate Policies

- section 4.2.1.5: Policy Mappings

- section 4.2.1.11: Policy Constraints

## HISTORY

**POLICYINFO\_new**(), **POLICYINFO\_free**(), **CERTIFICATEPOLICIES\_new**(), **CERTIFICATEPOLICIES\_free**(), **POLICYQUALINFO\_new**(), **POLICYQUALINFO\_free**(), **USERNOTICE\_new**(), **USERNOTICE\_free**(), **NOTICEREF\_new**(), and **NOTICEREF\_free**() first appeared in OpenSSL 0.9.3 and have been available since OpenBSD 2.6.

**POLICY\_MAPPING\_new**(), **POLICY\_MAPPING\_free**(), **POLICY\_CONSTRAINTS\_new**(), and **POLICY\_CONSTRAINTS\_free**() first appeared in OpenSSL 0.9.8 and have been available since OpenBSD 4.5.

## BUGS

This is a lot of nested data structures, but most of them are designed to have almost no effect.
