11 PEM_write_bio_DHxparams,
12 PEM_read_ECPKParameters,
13 PEM_read_bio_ECPKParameters,
14 PEM_write_ECPKParameters,
15 PEM_write_bio_ECPKParameters,
16 PEM_read_ECPrivateKey,
17 PEM_write_ECPrivateKey,
18 PEM_write_bio_ECPrivateKey,
20 PEM_read_bio_EC_PUBKEY,
22 PEM_write_bio_EC_PUBKEY,
23 PEM_read_NETSCAPE_CERT_SEQUENCE,
24 PEM_read_bio_NETSCAPE_CERT_SEQUENCE,
25 PEM_write_NETSCAPE_CERT_SEQUENCE,
26 PEM_write_bio_NETSCAPE_CERT_SEQUENCE,
31 PEM_write_PKCS8_PRIV_KEY_INFO,
32 PEM_read_bio_PKCS8_PRIV_KEY_INFO,
33 PEM_read_PKCS8_PRIV_KEY_INFO,
34 PEM_write_bio_PKCS8_PRIV_KEY_INFO,
36 PEM_read_bio_SSL_SESSION,
37 PEM_write_SSL_SESSION,
38 PEM_write_bio_SSL_SESSION
39 - PEM object encoding routines
45 #include <openssl/pem.h>
47 DECLARE_PEM_rw(name, TYPE)
49 TYPE *PEM_read_TYPE(FILE *fp, TYPE **a, pem_password_cb *cb, void *u);
50 TYPE *PEM_read_bio_TYPE(BIO *bp, TYPE **a, pem_password_cb *cb, void *u);
51 int PEM_write_TYPE(FILE *fp, const TYPE *a);
52 int PEM_write_bio_TYPE(BIO *bp, const TYPE *a);
56 In the description below, B<I<TYPE>> is used
57 as a placeholder for any of the OpenSSL datatypes, such as B<X509>.
58 The macro B<DECLARE_PEM_rw> expands to the set of declarations shown in
59 the next four lines of the synopsis.
61 These routines convert between local instances of ASN1 datatypes and
62 the PEM encoding. For more information on the templates, see
63 L<ASN1_ITEM(3)>. For more information on the lower-level routines used
64 by the functions here, see L<PEM_read(3)>.
66 B<PEM_read_I<TYPE>>() reads a PEM-encoded object of B<I<TYPE>> from the file
67 I<fp> and returns it. The I<cb> and I<u> parameters are as described in
68 L<pem_password_cb(3)>.
70 B<PEM_read_bio_I<TYPE>>() is similar to B<PEM_read_I<TYPE>>() but reads from
73 B<PEM_write_I<TYPE>>() writes the PEM encoding of the object I<a> to the file
76 B<PEM_write_bio_I<TYPE>>() similarly writes to the BIO I<bp>.
80 These functions make no assumption regarding the pass phrase received from the
82 It will simply be treated as a byte sequence.
86 B<PEM_read_I<TYPE>>() and B<PEM_read_bio_I<TYPE>>() return a pointer to an
87 allocated object, which should be released by calling B<I<TYPE>_free>(), or
90 B<PEM_write_I<TYPE>>() and B<PEM_write_bio_I<TYPE>>() return the number of bytes
91 written or zero on error.
96 L<passphrase-encoding(7)>
100 Copyright 1998-2018 The OpenSSL Project Authors. All Rights Reserved.
102 Licensed under the Apache License 2.0 (the "License"). You may not use
103 this file except in compliance with the License. You can obtain a copy
104 in the file LICENSE in the source distribution or at
105 L<https://www.openssl.org/source/license.html>.