5 EVP_PKEY2PKCS8, EVP_PKCS82PKEY_ex, EVP_PKCS82PKEY
6 - Convert a private key to/from PKCS8
10 #include <openssl/x509.h>
12 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(const EVP_PKEY *pkey);
13 EVP_PKEY *EVP_PKCS82PKEY(const PKCS8_PRIV_KEY_INFO *p8);
14 EVP_PKEY *EVP_PKCS82PKEY_ex(const PKCS8_PRIV_KEY_INFO *p8, OSSL_LIB_CTX *libctx,
19 EVP_PKEY2PKCS8() converts a private key I<pkey> into a returned PKCS8 object.
21 EVP_PKCS82PKEY_ex() converts a PKCS8 object I<p8> into a returned private key.
22 It uses I<libctx> and I<propq> when fetching algorithms.
24 EVP_PKCS82PKEY() is similiar to EVP_PKCS82PKEY_ex() but uses default values of
25 NULL for the I<libctx> and I<propq>.
29 EVP_PKEY2PKCS8() returns a PKCS8 object on success.
30 EVP_PKCS82PKEY() and EVP_PKCS82PKEY_ex() return a private key on success.
32 All functions return NULL if the operation fails.
36 L<PKCS8_pkey_add1_attr(3)>,
40 Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
42 Licensed under the Apache License 2.0 (the "License"). You may not use
43 this file except in compliance with the License. You can obtain a copy
44 in the file LICENSE in the source distribution or at
45 L<https://www.openssl.org/source/license.html>.