D2I_BASIC_CONSTRAINTS(3)
π
D2I_BASIC_CONSTRAINTS(3) β Library Functions Manual π
okay bestie, welcome to the D2I_BASIC_CONSTRAINTS(3) page from the Library Functions Manual. This one is all about decoding and encoding X.509 key usage purposes, and it is lowkey giving certificate-extension main character energy. πβ¨
π¦ NAME π¦
d2i_BASIC_CONSTRAINTS, i2d_BASIC_CONSTRAINTS, d2i_EXTENDED_KEY_USAGE, i2d_EXTENDED_KEY_USAGE β decode and encode X.509 key usage purposes. π
πΈ SYNOPSIS πΈ
library βlibcryptoβ #include <openssl/x509v3.h>
BASIC_CONSTRAINTS *
d2i_BASIC_CONSTRAINTS(BASIC_CONSTRAINTS **val_out,
const unsigned char **der_in, long length);
int
i2d_BASIC_CONSTRAINTS(BASIC_CONSTRAINTS *val_in,
unsigned char **der_out);
EXTENDED_KEY_USAGE *
d2i_EXTENDED_KEY_USAGE(EXTENDED_KEY_USAGE **val_out,
const unsigned char **der_in, long length);
int
i2d_EXTENDED_KEY_USAGE(EXTENDED_KEY_USAGE *val_in,
unsigned char **der_out);
β¨ DESCRIPTION β¨
These functions decode and encode data structures describing the intended purposes that the key contained in an X.509 certificate is to be used for. For details about the semantics, examples, caveats, and bugs, see ASN1_item_d2i(3). π«Ά
d2i_BASIC_CONSTRAINTS() and i2d_BASIC_CONSTRAINTS() decode and encode an ASN.1 BasicConstraints structure defined in RFC 5280 section 4.2.1.9. π₯
d2i_EXTENDED_KEY_USAGE() and i2d_EXTENDED_KEY_USAGE() decode and encode an ASN.1 ExtKeyUsageSyntax structure defined in RFC 5280 section 4.2.1.12. π
π RETURN VALUES π
d2i_BASIC_CONSTRAINTS() and d2i_EXTENDED_KEY_USAGE() return a BASIC_CONSTRAINTS or EXTENDED_KEY_USAGE object, respectively, or NULL if an error occurs. π
i2d_BASIC_CONSTRAINTS() and i2d_EXTENDED_KEY_USAGE() return the number of bytes successfully encoded or a negative value if an error occurs. π
π SEE ALSO π
π STANDARDS π
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile. β
π§ HISTORY π§
d2i_BASIC_CONSTRAINTS() and i2d_BASIC_CONSTRAINTS() first appeared in OpenSSL 0.9.2b and have been available since OpenBSD 2.6. π
d2i_EXTENDED_KEY_USAGE() and i2d_EXTENDED_KEY_USAGE() first appeared in OpenSSL 0.9.7 and have been available since OpenBSD 3.2. π¦
source/version check, bestie: Debian, June 8, 2025, D2I_BASIC_CONSTRAINTS(3) β bye, go decode slay! π«Άπ
π¦ 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