1PEM_READ_CMS(3ossl)                 OpenSSL                PEM_READ_CMS(3ossl)
2
3
4

NAME

6       DECLARE_PEM_rw, PEM_read_CMS, PEM_read_bio_CMS, PEM_write_CMS,
7       PEM_write_bio_CMS, PEM_write_DHxparams, PEM_write_bio_DHxparams,
8       PEM_read_ECPKParameters, PEM_read_bio_ECPKParameters,
9       PEM_write_ECPKParameters, PEM_write_bio_ECPKParameters,
10       PEM_read_ECPrivateKey, PEM_write_ECPrivateKey,
11       PEM_write_bio_ECPrivateKey, PEM_read_EC_PUBKEY, PEM_read_bio_EC_PUBKEY,
12       PEM_write_EC_PUBKEY, PEM_write_bio_EC_PUBKEY,
13       PEM_read_NETSCAPE_CERT_SEQUENCE, PEM_read_bio_NETSCAPE_CERT_SEQUENCE,
14       PEM_write_NETSCAPE_CERT_SEQUENCE, PEM_write_bio_NETSCAPE_CERT_SEQUENCE,
15       PEM_read_PKCS8, PEM_read_bio_PKCS8, PEM_write_PKCS8,
16       PEM_write_bio_PKCS8, PEM_write_PKCS8_PRIV_KEY_INFO,
17       PEM_read_bio_PKCS8_PRIV_KEY_INFO, PEM_read_PKCS8_PRIV_KEY_INFO,
18       PEM_write_bio_PKCS8_PRIV_KEY_INFO, PEM_read_SSL_SESSION,
19       PEM_read_bio_SSL_SESSION, PEM_write_SSL_SESSION,
20       PEM_write_bio_SSL_SESSION, PEM_read_X509_PUBKEY,
21       PEM_read_bio_X509_PUBKEY, PEM_write_X509_PUBKEY,
22       PEM_write_bio_X509_PUBKEY - PEM object encoding routines
23

SYNOPSIS

25        #include <openssl/pem.h>
26
27        DECLARE_PEM_rw(name, TYPE)
28
29        TYPE *PEM_read_TYPE(FILE *fp, TYPE **a, pem_password_cb *cb, void *u);
30        TYPE *PEM_read_bio_TYPE(BIO *bp, TYPE **a, pem_password_cb *cb, void *u);
31        int PEM_write_TYPE(FILE *fp, const TYPE *a);
32        int PEM_write_bio_TYPE(BIO *bp, const TYPE *a);
33
34       The following functions have been deprecated since OpenSSL 3.0, and can
35       be hidden entirely by defining OPENSSL_API_COMPAT with a suitable
36       version value, see openssl_user_macros(7):
37
38        #include <openssl/pem.h>
39
40        int PEM_write_DHxparams(FILE *out, const DH *dh);
41        int PEM_write_bio_DHxparams(BIO *out, const DH *dh);
42        EC_GROUP *PEM_read_ECPKParameters(FILE *fp, EC_GROUP **x, pem_password_cb *cb, void *u);
43        EC_GROUP *PEM_read_bio_ECPKParameters(BIO *bp, EC_GROUP **x, pem_password_cb *cb, void *u);
44        int PEM_write_ECPKParameters(FILE *out, const EC_GROUP *x);
45        int PEM_write_bio_ECPKParameters(BIO *out, const EC_GROUP *x),
46
47        EC_KEY *PEM_read_EC_PUBKEY(FILE *fp, EC_KEY **x, pem_password_cb *cb, void *u);
48        EC_KEY *PEM_read_bio_EC_PUBKEY(BIO *bp, EC_KEY **x, pem_password_cb *cb, void *u);
49        int PEM_write_EC_PUBKEY(FILE *out, const EC_KEY *x);
50        int PEM_write_bio_EC_PUBKEY(BIO *out, const EC_KEY *x);
51
52        EC_KEY *PEM_read_ECPrivateKey(FILE *out, EC_KEY **x, pem_password_cb *cb, void *u);
53        EC_KEY *PEM_read_bio_ECPrivateKey(BIO *out, EC_KEY **x, pem_password_cb *cb, void *u);
54        int PEM_write_ECPrivateKey(FILE *out, const EC_KEY *x, const EVP_CIPHER *enc,
55                                   const unsigned char *kstr, int klen,
56                                   pem_password_cb *cb, void *u);
57        int PEM_write_bio_ECPrivateKey(BIO *out, const EC_KEY *x, const EVP_CIPHER *enc,
58                                       const unsigned char *kstr, int klen,
59                                       pem_password_cb *cb, void *u);
60

DESCRIPTION

62       All of the functions described on this page are deprecated.
63       Applications should use OSSL_ENCODER_to_bio() and
64       OSSL_DECODER_from_bio() instead.
65
66       In the description below, TYPE is used as a placeholder for any of the
67       OpenSSL datatypes, such as X509.  The macro DECLARE_PEM_rw expands to
68       the set of declarations shown in the next four lines of the synopsis.
69
70       These routines convert between local instances of ASN1 datatypes and
71       the PEM encoding.  For more information on the templates, see
72       ASN1_ITEM(3).  For more information on the lower-level routines used by
73       the functions here, see PEM_read(3).
74
75       PEM_read_TYPE() reads a PEM-encoded object of TYPE from the file fp and
76       returns it.  The cb and u parameters are as described in
77       pem_password_cb(3).
78
79       PEM_read_bio_TYPE() is similar to PEM_read_TYPE() but reads from the
80       BIO bp.
81
82       PEM_write_TYPE() writes the PEM encoding of the object a to the file
83       fp.
84
85       PEM_write_bio_TYPE() similarly writes to the BIO bp.
86

NOTES

88       These functions make no assumption regarding the pass phrase received
89       from the password callback.  It will simply be treated as a byte
90       sequence.
91

RETURN VALUES

93       PEM_read_TYPE() and PEM_read_bio_TYPE() return a pointer to an
94       allocated object, which should be released by calling TYPE_free(), or
95       NULL on error.
96
97       PEM_write_TYPE() and PEM_write_bio_TYPE() return the number of bytes
98       written or zero on error.
99

SEE ALSO

101       PEM_read(3), passphrase-encoding(7)
102

HISTORY

104       The functions PEM_write_DHxparams(), PEM_write_bio_DHxparams(),
105       PEM_read_ECPKParameters(), PEM_read_bio_ECPKParameters(),
106       PEM_write_ECPKParameters(), PEM_write_bio_ECPKParameters(),
107       PEM_read_EC_PUBKEY(), PEM_read_bio_EC_PUBKEY(), PEM_write_EC_PUBKEY(),
108       PEM_write_bio_EC_PUBKEY(), PEM_read_ECPrivateKey(),
109       PEM_read_bio_ECPrivateKey(), PEM_write_ECPrivateKey() and
110       PEM_write_bio_ECPrivateKey() were deprecated in OpenSSL 3.0.
111
113       Copyright 1998-2021 The OpenSSL Project Authors. All Rights Reserved.
114
115       Licensed under the Apache License 2.0 (the "License").  You may not use
116       this file except in compliance with the License.  You can obtain a copy
117       in the file LICENSE in the source distribution or at
118       <https://www.openssl.org/source/license.html>.
119
120
121
1223.0.5                             2022-11-01               PEM_READ_CMS(3ossl)
Impressum