PKEY_USAGE_PERIOD_NEW(3)
π PKEY_USAGE_PERIOD_NEW(3) π
okay so bestie, welcome to the libcrypto manual page for the private key usage period extension β¨ this one's short and sweet, no cap.
πΈ NAME πΈ
PKEY_USAGE_PERIOD_new, PKEY_USAGE_PERIOD_free β the X.509 certificate private key usage period extension, bestie π
π¦ SYNOPSIS π¦
library "libcrypto"
#include <openssl/x509v3.h>
PKEY_USAGE_PERIOD *
PKEY_USAGE_PERIOD_new(void);
void
PKEY_USAGE_PERIOD_free(PKEY_USAGE_PERIOD *period);
π DESCRIPTION π
So PKEY_USAGE_PERIOD_new() allocates and initializes an empty PKEY_USAGE_PERIOD object β and like, what even is that? It's representing an ASN.1 PrivateKeyUsagePeriod structure, which is defined in RFC 3280 section 4.2.1.4. iconic behavior fr fr π
You could use it in X509 certificates to specify a validity period for the private key that differed from the validity period of the certificate. literally the whole point π«
Then PKEY_USAGE_PERIOD_free() frees period. clean up after yourself bestie, that's the vibe π
π«Ά RETURN VALUES π«Ά
PKEY_USAGE_PERIOD_new() returns the new PKEY_USAGE_PERIOD object, or NULL if an error occurs. she's either giving or she's giving nothing π
heads up: if you get NULL, something went wrong β don't go dereferencing it, please, I'm begging π
π SEE ALSO π
d2i_PKEY_USAGE_PERIOD(3)EXTENDED_KEY_USAGE_new(3)X509_CINF_new(3)X509_EXTENSION_new(3)X509_new(3)
go read those too, 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 β¨
and okay, plot twist π β RFC 3280 was obsoleted by RFC 5280, which says:
"Section 4.2.1.4 in RFC 3280, which specified the PrivateKeyUsagePeriod certificate extension but deprecated its use, was removed. Use of this ISO standard extension is neither deprecated nor recommended for use in the Internet PKI."
so likeβ¦ the extension got removed from the newer spec π and the newer spec says using it is neither deprecated nor recommended. that's the whole tea, bestie π
π§ HISTORY π§
PKEY_USAGE_PERIOD_new() and PKEY_USAGE_PERIOD_free() first appeared in OpenSSL 0.9.2b and have been available since OpenBSD 2.6. vintage queens π
that's a wrap babes π this page is from Debian, dated June 8, 2025, and it's PKEY_USAGE_PERIOD_NEW(3) β slay, go forth and manage your periods π©·β¨
π¦ 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