1D2I_PKCS8PRIVATEKEY_BIO(3)          OpenSSL         D2I_PKCS8PRIVATEKEY_BIO(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
40       PEM_read_PrivateKey(3).
41

NOTES

43       These functions are currently the only way to store encrypted private
44       keys using DER format.
45
46       Currently all the functions use BIOs or FILE pointers, there are no
47       functions which work directly on memory: this can be readily worked
48       around by converting the buffers to memory BIOs, see BIO_s_mem(3) for
49       details.
50
51       These functions make no assumption regarding the pass phrase received
52       from the password callback.  It will simply be treated as a byte
53       sequence.
54

RETURN VALUES

56       d2i_PKCS8PrivateKey_bio() and d2i_PKCS8PrivateKey_fp() return a valid
57       EVP_PKEY structure or NULL if an error occurred.
58
59       i2d_PKCS8PrivateKey_bio(), i2d_PKCS8PrivateKey_fp(),
60       i2d_PKCS8PrivateKey_nid_bio() and i2d_PKCS8PrivateKey_nid_fp() return 1
61       on success or 0 on error.
62

SEE ALSO

64       PEM_read_PrivateKey(3), passphrase-encoding(7)
65
67       Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved.
68
69       Licensed under the OpenSSL license (the "License").  You may not use
70       this file except in compliance with the License.  You can obtain a copy
71       in the file LICENSE in the source distribution or at
72       <https://www.openssl.org/source/license.html>.
73
74
75
761.1.1l                            2021-09-15        D2I_PKCS8PRIVATEKEY_BIO(3)
Impressum