PKCS8_PRIV_KEY_INFO_NEW(3)
okay so bestie, welcome to the PKCS8_PRIV_KEY_INFO_NEW(3) page from the Library Functions Manual. itโs giving โPKCS#8 private key informationโ and honestly? iconic. letโs go ๐
๐ธ NAME ๐ธ
PKCS8_PRIV_KEY_INFO_new, PKCS8_PRIV_KEY_INFO_free โ PKCS#8 private key information. thatโs the whole name section, periodt.
โจ SYNOPSIS โจ
okay the synopsis is literally right here, no cap:
library โlibcryptoโ #include <openssl/x509.h>
PKCS8_PRIV_KEY_INFO *
PKCS8_PRIV_KEY_INFO_new(void);
void
PKCS8_PRIV_KEY_INFO_free(PKCS8_PRIV_KEY_INFO *key);
๐ฆ DESCRIPTION ๐ฆ
so PKCS8_PRIV_KEY_INFO_new() does the cute alloc-and-init thing: it allocates and initializes an empty PKCS8_PRIV_KEY_INFO object. that object represents an ASN.1 PrivateKeyInfo structure defined in RFC 5208 section 5. it can hold a private key together with information about the algorithm to be used with it and optional attributes. very โmain character key containerโ energy. โจ
and PKCS8_PRIV_KEY_INFO_free() frees key. thatโs it. thatโs the whole job. ๐ซถ
๐ RETURN VALUES ๐
PKCS8_PRIV_KEY_INFO_new() returns the new PKCS8_PRIV_KEY_INFO object or NULL if an error occurs. so itโs either โslay, hereโs your objectโ or NULL. no in-between. ๐ญ
๐ SEE ALSO ๐
go look at these besties, fr fr:
d2i_PKCS8_PRIV_KEY_INFO(3)d2i_PKCS8PrivateKey_bio(3)EVP_PKCS82PKEY(3)PEM_read_PKCS8_PRIV_KEY_INFO(3)PKCS12_parse(3)PKCS8_pkey_set0(3)X509_ATTRIBUTE_new(3)
๐ STANDARDS ๐
RFC 5208: PKCS#8: Private-Key Information Syntax Specification โ yes, that exact standard. no need to squint, itโs right there. periodt.
๐ HISTORY ๐
PKCS8_PRIV_KEY_INFO_new() and PKCS8_PRIV_KEY_INFO_free() first appeared in OpenSSL 0.9.3 and have been available since OpenBSD 2.6. old-school but still serving. ๐
xoxo, source/version: Debian ๐ date: June 8, 2025 ๐ manual: PKCS8_PRIV_KEY_INFO_NEW(3) ๐
๐ฆ 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