X509_PKEY_NEW(3)
πΈ NAME πΈ
X509_PKEY_new, X509_PKEY_free β X.509 private key wrapper object. This is the X509_PKEY_NEW(3) page from the Library Functions Manual, and it's all about the wrapper object for X.509 private keys, bestie π
.
β¨ SYNOPSIS β¨
okay so the includes and signatures are literally:
#include <openssl/x509.h>
X509_PKEY *
X509_PKEY_new(void);
void
X509_PKEY_free(X509_PKEY *wrapper);
π DESCRIPTION π
So X509_PKEY is a reference-counted wrapper object that can store:
- a pointer to an encrypted and ASN.1-encoded private key
- a pointer to an
EVP_PKEYobject representing the same key in decrypted form - a pointer to an
X509_ALGORobject identifying the algorithm used by the key
No cap, the object may contain only the encrypted key or only the decrypted key or both.
X509_PKEY is used as a sub-object of the X509_INFO object created by PEM_X509_INFO_read_bio(3) if the PEM file contains any RSA, DSA, or EC PRIVATE KEY object. iykyk π
X509_PKEY_new() allocates and initializes an empty X509_PKEY object and sets its reference count to 1. Slay.
X509_PKEY_free() decrements the reference count of the wrapper object by 1. If the reference count reaches 0, it frees all internal objects allocated by the wrapper as well as the storage needed for the wrapper object itself. If wrapper is a NULL pointer, no action occurs. periodt π
π¦ RETURN VALUES π¦
X509_PKEY_new() returns a pointer to the new X509_PKEY object or NULL if memory allocation fails. That's the whole return-value vibe π«Ά
π SEE ALSO π
β HISTORY β
X509_PKEY_new() and X509_PKEY_free() first appeared in SSLeay 0.6.0 and have been available since OpenBSD 2.4. iconic behavior honestly π
okay that's the whole page! this one's from Debian, dated October 19, 2021, and it's X509_PKEY_NEW(3) β byeee bestie ππ«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: libressl-devel-doc 4.1.0-bp160.1.1 Β· OpenSSL
- Copyright (c) 2021 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