EXTENDED_KEY_USAGE_NEW(3)

πŸ“¦ version 4.4.0, in alpine 3.24, arch rolling

πŸ’– NAME πŸ’–

EXTENDED_KEY_USAGE_new, EXTENDED_KEY_USAGE_free β€” X.509 key usage restrictions.

okay so this is the EXTENDED_KEY_USAGE_NEW(3) page from the Library Functions Manual, bestie, and we're about to make key usage restrictions make sense. no cap. πŸ’…

✨ SYNOPSIS ✨

library β€œlibcrypto” #include <openssl/x509v3.h>

EXTENDED_KEY_USAGE
EXTENDED_KEY_USAGE_new(void);

void
EXTENDED_KEY_USAGE_free(EXTENDED_KEY_USAGE *eku);

πŸ¦‹ DESCRIPTION πŸ¦‹

So picture this: X509 end entity certificates can indicate that the key contained in them is only intended to be used for the specified purposes by using the key usage extension, the extended key usage extension, or both of them. And if both extensions are present? Then only uses compatible with both extensions are intended. periodt. ✨

EXTENDED_KEY_USAGE_new() allocates and initializes an empty EXTENDED_KEY_USAGE object. That object is a STACK_OF(ASN1_OBJECT), and it represents an ASN.1 ExtKeyUsageSyntax structure defined in RFC 5280 section 4.2.1.12. It can hold key purpose identifiers. iconic behavior, honestly. πŸŽ€

EXTENDED_KEY_USAGE_free() frees eku. simple as that. 🫢

The key usage extension uses the ASN.1 BIT STRING data type and doesn't require any dedicated object. noted, bestie. πŸ’œ

🌸 RETURN VALUES 🌸

EXTENDED_KEY_USAGE_new() returns the new EXTENDED_KEY_USAGE object or NULL if an error occurs. that's the whole vibe check. πŸ’€

πŸŽ€ SEE ALSO πŸŽ€

🌈 STANDARDS 🌈

RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile:

  • section 4.2.1.3: Key Usage
  • section 4.2.1.12: Extended Key Usage

πŸ‘‘ HISTORY πŸ‘‘

EXTENDED_KEY_USAGE_new() and EXTENDED_KEY_USAGE_free() first appeared in OpenSSL 0.9.7 and have been available since OpenBSD 3.2. slay, old but still iconic. πŸ”₯


xoxo, this cutie is from Debian, dated June 8, 2025, and it's literally EXTENDED_KEY_USAGE_NEW(3) β€” mwah πŸ’‹πŸŒΈ

πŸ“¦ where this page comes from