POLICYINFO_NEW(3)
β¨ NAME β¨
okay so bestie, welcome to POLICYINFO_NEW(3) from the Library Functions Manual β the X.509 certificate policies page, but make it cute. π Here's the whole squad, and yes they all ate: 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 β all about X.509 certificate policies. π
β¨ SYNOPSIS β¨
bestie, here's the include-and-library vibe check:
library βlibcryptoβ #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. (the cert is setting boundaries, and honestly good for it π )
POLICYINFO_new()β allocates and initializes an emptyPOLICYINFOobject, representing an ASN.1PolicyInformationstructure defined in RFC 5280 section 4.2.1.4. It can hold a policy identifier and optional advisory qualifiers.POLICYINFO_free()freespi.CERTIFICATEPOLICIES_new()β allocates and initializes an emptyCERTIFICATEPOLICIESobject, which is aSTACK_OF(POLICYINFO)and represents an ASN.1CertificatePoliciesstructure defined in RFC 5280 section 4.2.1.4. It can be used byX509objects, both by CA certificates and end entity certificates.CERTIFICATEPOLICIES_free()freespis.POLICYQUALINFO_new()β allocates and initializes an emptyPOLICYQUALINFOobject, representing an ASN.1PolicyQualifierInfostructure defined in RFC 5280 section 4.2.1.4. It can be used inPOLICYINFOand it can hold either a uniform resource identifier of a certification practice statement published by the CA, or a pointer to aUSERNOTICEobject, or arbitrary other information.POLICYQUALINFO_free()freespqi.USERNOTICE_new()β allocates and initializes an emptyUSERNOTICEobject, representing an ASN.1UserNoticestructure defined in RFC 5280 section 4.2.1.4. It can be used inPOLICYQUALINFOand it can hold either anASN1_STRINGintended for display to the user or a pointer to aNOTICEREFobject.NOTICEREF_free()freesusernotice. (yes, the page saysNOTICEREF_free()right here β I'm not making the rules, I'm just delivering the lore π)NOTICEREF_new()β allocates and initializes an emptyNOTICEREFobject, representing an ASN.1NoticeReferencestructure defined in RFC 5280 section 4.2.1.4. It can be used inUSERNOTICEand can hold an organization name and a stack of notice numbers.NOTICEREF_free()freesnoticeref.POLICY_MAPPING_new()β allocates and initializes an emptyPOLICY_MAPPINGobject, representing an ASN.1PolicyMappingsstructure defined in RFC 5280 section 4.2.1.5. It can be used inX509CA 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()freespm.POLICY_CONSTRAINTS_new()β allocates and initializes an emptyPOLICY_CONSTRAINTSobject, representing an ASN.1PolicyConstraintsstructure defined in RFC 5280 section 4.2.1.11. It can be used inX509CA certificates to restrict policy mapping and/or to require explicit certificate policies in subsequent intermediate certificates in the certification path.POLICY_CONSTRAINTS_free()freespc.
π¦ RETURN VALUES π¦
The constructor functions return a new object of the respective type or NULL if an error occurs. no cap, that's the whole return tea. π«Ά
π₯ 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. ngl, that's the bug note, and it's kinda iconic. π
xoxo, source/version Debian π β June 8, 2025 β and that's the POLICYINFO_NEW(3) tea. π«Άπ
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2016 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