D2I_PKEY_USAGE_PERIOD(3)
β¨ D2I_PKEY_USAGE_PERIOD(3) β¨
okay so bestie, this is a page from the Library Functions Manual and it's all about the d2i_PKEY_USAGE_PERIOD and i2d_PKEY_USAGE_PERIOD girlies β the decode/encode duo for X.509 key usage period extensions π
πΈ NAME πΈ
d2i_PKEY_USAGE_PERIOD, i2d_PKEY_USAGE_PERIOD β decode and encode X.509 key usage period extensions π
π¦ SYNOPSIS π¦
like, first you gotta bring in the library β it's libcrypto:
#include <openssl/x509v3.h>
then the decoding icon herself:
PKEY_USAGE_PERIOD *
d2i_PKEY_USAGE_PERIOD(PKEY_USAGE_PERIOD **val_out,
const unsigned char **der_in, long length);
and her encoding bestie:
int
i2d_PKEY_USAGE_PERIOD(PKEY_USAGE_PERIOD *val_in,
unsigned char **der_out);
π DESCRIPTION π
so d2i_PKEY_USAGE_PERIOD() and i2d_PKEY_USAGE_PERIOD() decode and encode an ASN.1 PrivateKeyUsagePeriod structure β and this structure is literally defined in RFC 3280 section 4.2.1.4, no cap π
ngl, if you want the details about the semantics, examples, caveats, and bugs, the page is like "go read ASN1_item_d2i(3)" β that's where all the lore lives β¨
π₯ RETURN VALUES π₯
d2i_PKEY_USAGE_PERIOD()β returns aPKEY_USAGE_PERIODobject, orNULLif an error occurs πi2d_PKEY_USAGE_PERIOD()β returns the number of bytes successfully encoded, or a negative value if an error occurs π
π SEE ALSO π
go give them a read, iykyk π«Ά
π STANDARDS π
- RFC 3280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile, section 4.2.1.4: Private Key Usage Period
- RFC 3280 was obsoleted by RFC 5280; see
PKEY_USAGE_PERIOD_new(3)for details π
β HISTORY β
d2i_PKEY_USAGE_PERIOD() and i2d_PKEY_USAGE_PERIOD() first appeared in OpenSSL 0.9.2b and have been available since OpenBSD 2.6 β vintage icons fr fr π§
okay that's the whole page bestie, you ate that π this cutie was served up by Debian on June 8, 2025 β go forth and decode responsibly, mwah πβ¨
π¦ 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