]>
Commit | Line | Data |
---|---|---|
12ce9ea2 RS |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
91da5e77 | 5 | DECLARE_PEM_rw, |
12ce9ea2 RS |
6 | PEM_read_CMS, |
7 | PEM_read_bio_CMS, | |
8 | PEM_write_CMS, | |
9 | PEM_write_bio_CMS, | |
10 | PEM_write_DHxparams, | |
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, | |
19 | PEM_read_EC_PUBKEY, | |
20 | PEM_read_bio_EC_PUBKEY, | |
21 | PEM_write_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, | |
27 | PEM_read_PKCS8, | |
28 | PEM_read_bio_PKCS8, | |
29 | PEM_write_PKCS8, | |
30 | PEM_write_bio_PKCS8, | |
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, | |
35 | PEM_read_SSL_SESSION, | |
36 | PEM_read_bio_SSL_SESSION, | |
37 | PEM_write_SSL_SESSION, | |
38 | PEM_write_bio_SSL_SESSION | |
39 | - PEM object encoding routines | |
40 | ||
12ce9ea2 RS |
41 | =head1 SYNOPSIS |
42 | ||
b97fdb57 RL |
43 | =for comment generic |
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 | ||
56 | In the description below, I<TYPE> is used | |
57 | as a placeholder for any of the OpenSSL datatypes, such as I<X509>. | |
91da5e77 RS |
58 | The macro B<DECLARE_PEM_rw> expands to the set of declarations shown in |
59 | the next four lines of the synopsis. | |
12ce9ea2 RS |
60 | |
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)>. | |
65 | ||
66 | PEM_read_TYPE() reads a PEM-encoded object of I<TYPE> from the file B<fp> | |
67 | and returns it. The B<cb> and B<u> parameters are as described in | |
68 | L<pem_password_cb(3)>. | |
69 | ||
70 | PEM_read_bio_TYPE() is similar to PEM_read_TYPE() but reads from the BIO B<bp>. | |
71 | ||
72 | PEM_write_TYPE() writes the PEM encoding of the object B<a> to the file B<fp>. | |
73 | ||
74 | PEM_write_bio_TYPE() similarly writes to the BIO B<bp>. | |
75 | ||
76 | =head1 RETURN VALUES | |
77 | ||
78 | PEM_read_TYPE() and PEM_read_bio_TYPE() return a pointer to an allocated | |
79 | object, which should be released by calling TYPE_free(), or NULL on error. | |
80 | ||
81 | PEM_write_TYPE() and PEM_write_bio_TYPE() return the number of bytes written | |
82 | or zero on error. | |
83 | ||
84 | =head1 SEE ALSO | |
85 | ||
86 | L<PEM_read(3)> | |
87 | ||
88 | =head1 COPYRIGHT | |
89 | ||
90 | Copyright 1998-2016 The OpenSSL Project Authors. All Rights Reserved. | |
91 | ||
92 | Licensed under the OpenSSL license (the "License"). You may not use | |
93 | this file except in compliance with the License. You can obtain a copy | |
94 | in the file LICENSE in the source distribution or at | |
95 | L<https://www.openssl.org/source/license.html>. | |
96 | ||
97 | =cut |