OpenBSD manual page server

Manual Page Search Parameters

EVP_PKCS82PKEY(3) Library Functions Manual EVP_PKCS82PKEY(3)

EVP_PKCS82PKEY, EVP_PKEY2PKCS8convert between EVP_PKEY and PKCS#8 PrivateKeyInfo

#include <openssl/x509.h>

EVP_PKEY *
EVP_PKCS82PKEY(const PKCS8_PRIV_KEY_INFO *keyinfo);

PKCS8_PRIV_KEY_INFO *
EVP_PKEY2PKCS8(EVP_PKEY *pkey);

() extracts the private key from a PKCS#8 PrivateKeyInfo structure.

() creates a PKCS#8 PrivateKeyInfo structure representing the private key contained in pkey.

Supported algorithms include DH, DSA, EC, and RSA.

These functions return a newly allocated object or NULL if the algorithm indicated in keyinfo or pkey is unsupported or if memory allocation, decoding, or encoding fails.

EVP_PKEY_base_id(3), EVP_PKEY_new(3), PKCS8_pkey_set0(3), PKCS8_PRIV_KEY_INFO_new(3), X509_ALGOR_get0(3)

These functions first appeared in OpenSSL 0.9.3 and have been available since OpenBSD 2.6.

March 5, 2024 OpenBSD-current