1d2i_PKCS8PrivateKey(3)              OpenSSL             d2i_PKCS8PrivateKey(3)
2
3
4

NAME

6       d2i_PKCS8PrivateKey_bio, d2i_PKCS8PrivateKey_fp,
7       i2d_PKCS8PrivateKey_bio, i2d_PKCS8PrivateKey_fp,
8       i2d_PKCS8PrivateKey_nid_bio, i2d_PKCS8PrivateKey_nid_fp - PKCS#8 format
9       private key functions
10

SYNOPSIS

12        #include <openssl/evp.h>
13
14        EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u);
15        EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u);
16
17        int i2d_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
18                                         char *kstr, int klen,
19                                         pem_password_cb *cb, void *u);
20
21        int i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
22                                         char *kstr, int klen,
23                                         pem_password_cb *cb, void *u);
24
25        int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid,
26                                         char *kstr, int klen,
27                                         pem_password_cb *cb, void *u);
28
29        int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid,
30                                         char *kstr, int klen,
31                                         pem_password_cb *cb, void *u);
32

DESCRIPTION

34       The PKCS#8 functions encode and decode private keys in PKCS#8 format
35       using both PKCS#5 v1.5 and PKCS#5 v2.0 password based encryption
36       algorithms.
37
38       Other than the use of DER as opposed to PEM these functions are
39       identical to the corresponding PEM function as described in the pem(3)
40       manual page.
41

NOTES

43       Before using these functions OpenSSL_add_all_algorithms(3) should be
44       called to initialize the internal algorithm lookup tables otherwise
45       errors about unknown algorithms will occur if an attempt is made to
46       decrypt a private key.
47
48       These functions are currently the only way to store encrypted private
49       keys using DER format.
50
51       Currently all the functions use BIOs or FILE pointers, there are no
52       functions which work directly on memory: this can be readily worked
53       around by converting the buffers to memory BIOs, see BIO_s_mem(3) for
54       details.
55

SEE ALSO

57       pem(3)
58
59
60
611.0.2k                            2017-01-26            d2i_PKCS8PrivateKey(3)
Impressum