]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/PEM_read_CMS.pod
POD: stop abusing comment
[thirdparty/openssl.git] / doc / man3 / PEM_read_CMS.pod
CommitLineData
12ce9ea2
RS
1=pod
2
3=head1 NAME
4
91da5e77 5DECLARE_PEM_rw,
12ce9ea2
RS
6PEM_read_CMS,
7PEM_read_bio_CMS,
8PEM_write_CMS,
9PEM_write_bio_CMS,
10PEM_write_DHxparams,
11PEM_write_bio_DHxparams,
12PEM_read_ECPKParameters,
13PEM_read_bio_ECPKParameters,
14PEM_write_ECPKParameters,
15PEM_write_bio_ECPKParameters,
16PEM_read_ECPrivateKey,
17PEM_write_ECPrivateKey,
18PEM_write_bio_ECPrivateKey,
19PEM_read_EC_PUBKEY,
20PEM_read_bio_EC_PUBKEY,
21PEM_write_EC_PUBKEY,
22PEM_write_bio_EC_PUBKEY,
23PEM_read_NETSCAPE_CERT_SEQUENCE,
24PEM_read_bio_NETSCAPE_CERT_SEQUENCE,
25PEM_write_NETSCAPE_CERT_SEQUENCE,
26PEM_write_bio_NETSCAPE_CERT_SEQUENCE,
27PEM_read_PKCS8,
28PEM_read_bio_PKCS8,
29PEM_write_PKCS8,
30PEM_write_bio_PKCS8,
31PEM_write_PKCS8_PRIV_KEY_INFO,
32PEM_read_bio_PKCS8_PRIV_KEY_INFO,
33PEM_read_PKCS8_PRIV_KEY_INFO,
34PEM_write_bio_PKCS8_PRIV_KEY_INFO,
35PEM_read_SSL_SESSION,
36PEM_read_bio_SSL_SESSION,
37PEM_write_SSL_SESSION,
38PEM_write_bio_SSL_SESSION
39- PEM object encoding routines
40
12ce9ea2
RS
41=head1 SYNOPSIS
42
bb82531f 43=for openssl generic
b97fdb57 44
12ce9ea2
RS
45 #include <openssl/pem.h>
46
91da5e77 47 DECLARE_PEM_rw(name, TYPE)
12ce9ea2
RS
48
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);
53
54=head1 DESCRIPTION
55
bbecf04e
RL
56In the description below, B<I<TYPE>> is used
57as a placeholder for any of the OpenSSL datatypes, such as B<X509>.
91da5e77
RS
58The macro B<DECLARE_PEM_rw> expands to the set of declarations shown in
59the next four lines of the synopsis.
12ce9ea2
RS
60
61These routines convert between local instances of ASN1 datatypes and
62the PEM encoding. For more information on the templates, see
63L<ASN1_ITEM(3)>. For more information on the lower-level routines used
64by the functions here, see L<PEM_read(3)>.
65
bbecf04e
RL
66B<PEM_read_I<TYPE>>() reads a PEM-encoded object of B<I<TYPE>> from the file
67I<fp> and returns it. The I<cb> and I<u> parameters are as described in
12ce9ea2
RS
68L<pem_password_cb(3)>.
69
bbecf04e
RL
70B<PEM_read_bio_I<TYPE>>() is similar to B<PEM_read_I<TYPE>>() but reads from
71the BIO I<bp>.
12ce9ea2 72
bbecf04e
RL
73B<PEM_write_I<TYPE>>() writes the PEM encoding of the object I<a> to the file
74I<fp>.
12ce9ea2 75
bbecf04e 76B<PEM_write_bio_I<TYPE>>() similarly writes to the BIO I<bp>.
12ce9ea2 77
84814344
RL
78=head1 NOTES
79
80These functions make no assumption regarding the pass phrase received from the
81password callback.
82It will simply be treated as a byte sequence.
83
12ce9ea2
RS
84=head1 RETURN VALUES
85
bbecf04e
RL
86B<PEM_read_I<TYPE>>() and B<PEM_read_bio_I<TYPE>>() return a pointer to an
87allocated object, which should be released by calling B<I<TYPE>_free>(), or
88NULL on error.
12ce9ea2 89
bbecf04e
RL
90B<PEM_write_I<TYPE>>() and B<PEM_write_bio_I<TYPE>>() return the number of bytes
91written or zero on error.
12ce9ea2
RS
92
93=head1 SEE ALSO
94
84814344
RL
95L<PEM_read(3)>,
96L<passphrase-encoding(7)>
12ce9ea2
RS
97
98=head1 COPYRIGHT
99
83cf7abf 100Copyright 1998-2018 The OpenSSL Project Authors. All Rights Reserved.
12ce9ea2 101
4746f25a 102Licensed under the Apache License 2.0 (the "License"). You may not use
12ce9ea2
RS
103this file except in compliance with the License. You can obtain a copy
104in the file LICENSE in the source distribution or at
105L<https://www.openssl.org/source/license.html>.
106
107=cut