D2I_POLICYINFO(3)
π
D2I_POLICYINFO(3) β decode & encode X.509 certificate policies π
okay bestie, welcome to the D2I_POLICYINFO(3) library-functions manual page. This is the whole vibe: X.509 certificate policies, decoded and encoded, no cap. β¨
π·οΈ NAME π·οΈ
d2i_POLICYINFO, i2d_POLICYINFO, d2i_CERTIFICATEPOLICIES, i2d_CERTIFICATEPOLICIES, d2i_POLICYQUALINFO, i2d_POLICYQUALINFO, d2i_USERNOTICE, i2d_USERNOTICE, d2i_NOTICEREF, i2d_NOTICEREF β decode and encode X.509 certificate policies π
β¨ SYNOPSIS β¨
First the library/header combo, literally:
library βlibcryptoβ #include <openssl/x509v3.h>
And here are the signatures, copied exactly because we do not play with function signatures:
POLICYINFO *
d2i_POLICYINFO(POLICYINFO **val_out, const unsigned char **der_in,
long length);
int
i2d_POLICYINFO(POLICYINFO *val_in, unsigned char **der_out);
CERTIFICATEPOLICIES *
d2i_CERTIFICATEPOLICIES(CERTIFICATEPOLICIES **val_out,
const unsigned char **der_in, long length);
int
i2d_CERTIFICATEPOLICIES(CERTIFICATEPOLICIES *val_in,
unsigned char **der_out);
POLICYQUALINFO *
d2i_POLICYQUALINFO(POLICYQUALINFO **val_out,
const unsigned char **der_in, long length);
int
i2d_POLICYQUALINFO(POLICYQUALINFO *val_in, unsigned char **der_out);
USERNOTICE *
d2i_USERNOTICE(USERNOTICE **val_out, const unsigned char **der_in,
long length);
int
i2d_USERNOTICE(USERNOTICE *val_in, unsigned char **der_out);
NOTICEREF *
d2i_NOTICEREF(NOTICEREF **val_out, const unsigned char **der_in,
long length);
int
i2d_NOTICEREF(NOTICEREF *val_in, unsigned char **der_out);
π¦ DESCRIPTION π¦
These functions decode and encode X.509 certificate policies. For details about the semantics, examples, caveats, and bugs, see ASN1_item_d2i(3). π
d2i_POLICYINFO()andi2d_POLICYINFO()decode and encode an ASN.1PolicyInformationstructure defined in RFC 5280 section 4.2.1.4. πΈd2i_CERTIFICATEPOLICIES()andi2d_CERTIFICATEPOLICIES()decode and encode an ASN.1CertificatePoliciesstructure defined in RFC 5280 section 4.2.1.4. πd2i_POLICYQUALINFO()andi2d_POLICYQUALINFO()decode and encode an ASN.1PolicyQualifierInfostructure defined in RFC 5280 section 4.2.1.4. π¦d2i_USERNOTICE()andi2d_USERNOTICE()decode and encode an ASN.1UserNoticestructure defined in RFC 5280 section 4.2.1.4. πd2i_NOTICEREF()andi2d_NOTICEREF()decode and encode an ASN.1NoticeReferencestructure defined in RFC 5280 section 4.2.1.4. β
π«Ά RETURN VALUES π«Ά
- The decode besties β
d2i_POLICYINFO(),d2i_CERTIFICATEPOLICIES(),d2i_POLICYQUALINFO(),d2i_USERNOTICE(), andd2i_NOTICEREF()β return aPOLICYINFO,CERTIFICATEPOLICIES,POLICYQUALINFO,USERNOTICE, orNOTICEREFobject, respectively, orNULLif an error occurs. π - The encode besties β
i2d_POLICYINFO(),i2d_CERTIFICATEPOLICIES(),i2d_POLICYQUALINFO(),i2d_USERNOTICE(), andi2d_NOTICEREF()β return the number of bytes successfully encoded or a negative value if an error occurs. π
π SEE ALSO π
Go peek at ASN1_item_d2i(3), POLICYINFO_new(3), and X509_EXTENSION_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 β yes, that exact one. π
π°οΈ HISTORY π°οΈ
These functions first appeared in OpenSSL 0.9.3 and have been available since OpenBSD 2.6. π§
xoxo bestie, this page is serving Debian source/version realness with a June 8, 2025 date stamp β D2I_POLICYINFO(3) out. ππ«Άπ
π¦ 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