1PEM_READ_CMS(3)                     OpenSSL                    PEM_READ_CMS(3)
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 object encoding routines
21

SYNOPSIS

23        #include <openssl/pem.h>
24
25        DECLARE_PEM_rw(name, TYPE)
26
27        TYPE *PEM_read_TYPE(FILE *fp, TYPE **a, pem_password_cb *cb, void *u);
28        TYPE *PEM_read_bio_TYPE(BIO *bp, TYPE **a, pem_password_cb *cb, void *u);
29        int PEM_write_TYPE(FILE *fp, const TYPE *a);
30        int PEM_write_bio_TYPE(BIO *bp, const TYPE *a);
31

DESCRIPTION

33       In the description below, TYPE is used as a placeholder for any of the
34       OpenSSL datatypes, such as X509.  The macro DECLARE_PEM_rw expands to
35       the set of declarations shown in the next four lines of the synopsis.
36
37       These routines convert between local instances of ASN1 datatypes and
38       the PEM encoding.  For more information on the templates, see
39       ASN1_ITEM(3).  For more information on the lower-level routines used by
40       the functions here, see PEM_read(3).
41
42       PEM_read_TYPE() reads a PEM-encoded object of TYPE from the file fp and
43       returns it.  The cb and u parameters are as described in
44       pem_password_cb(3).
45
46       PEM_read_bio_TYPE() is similar to PEM_read_TYPE() but reads from the
47       BIO bp.
48
49       PEM_write_TYPE() writes the PEM encoding of the object a to the file
50       fp.
51
52       PEM_write_bio_TYPE() similarly writes to the BIO bp.
53

NOTES

55       These functions make no assumption regarding the pass phrase received
56       from the password callback.  It will simply be treated as a byte
57       sequence.
58

RETURN VALUES

60       PEM_read_TYPE() and PEM_read_bio_TYPE() return a pointer to an
61       allocated object, which should be released by calling TYPE_free(), or
62       NULL on error.
63
64       PEM_write_TYPE() and PEM_write_bio_TYPE() return the number of bytes
65       written or zero on error.
66

SEE ALSO

68       PEM_read(3), passphrase-encoding(7)
69
71       Copyright 1998-2018 The OpenSSL Project Authors. All Rights Reserved.
72
73       Licensed under the OpenSSL license (the "License").  You may not use
74       this file except in compliance with the License.  You can obtain a copy
75       in the file LICENSE in the source distribution or at
76       <https://www.openssl.org/source/license.html>.
77
78
79
801.1.1c                            2019-05-28                   PEM_READ_CMS(3)
Impressum