Debian Codegraph @

upstream/debian-unstable/man3/PEM_X509_INFO_read_bio_ex.3ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "PEM_X509_INFO_READ_BIO_EX 3SSL"
58 .TH PEM_X509_INFO_READ_BIO_EX 3SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 PEM_X509_INFO_read_ex, PEM_X509_INFO_read, PEM_X509_INFO_read_bio_ex, PEM_X509_INFO_read_bio
65 \&\- read PEM\-encoded data structures into one or more X509_INFO objects
66 .SH SYNOPSIS
67 .IX Header "SYNOPSIS"
68 .Vb 1
69 \& #include <openssl/pem.h>
70 \&
71 \& STACK_OF(X509_INFO) *PEM_X509_INFO_read_ex(FILE *fp, STACK_OF(X509_INFO) *sk,
72 \& pem_password_cb *cb, void *u,
73 \& OSSL_LIB_CTX *libctx,
74 \& const char *propq);
75 \& STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk,
76 \& pem_password_cb *cb, void *u);
77 \& STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio_ex(BIO *bio,
78 \& STACK_OF(X509_INFO) *sk,
79 \& pem_password_cb *cb, void *u,
80 \& OSSL_LIB_CTX *libctx,
81 \& const char *propq);
82 \& STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk,
83 \& pem_password_cb *cb, void *u);
84 .Ve
85 .SH DESCRIPTION
86 .IX Header "DESCRIPTION"
87 \&\fBPEM_X509_INFO_read_ex()\fR loads the \fBX509_INFO\fR objects from a file \fIfp\fR.
88 .PP
89 \&\fBPEM_X509_INFO_read()\fR is similar to \fBPEM_X509_INFO_read_ex()\fR
90 but uses the default (NULL) library context \fIlibctx\fR
91 and empty property query \fIpropq\fR.
92 .PP
93 \&\fBPEM_X509_INFO_read_bio_ex()\fR loads the \fBX509_INFO\fR objects using a bio \fIbp\fR.
94 .PP
95 \&\fBPEM_X509_INFO_read_bio()\fR is similar to \fBPEM_X509_INFO_read_bio_ex()\fR
96 but uses the default (NULL) library context \fIlibctx\fR
97 and empty property query \fIpropq\fR.
98 .PP
99 Each of the loaded \fBX509_INFO\fR objects can contain a CRL, a certificate,
100 and/or a private key.
101 The elements are read sequentially, and as far as they are of different type than
102 the elements read before, they are combined into the same \fBX509_INFO\fR object.
103 The idea behind this is that if, for instance, a certificate is followed by
104 a private key, the private key is supposed to correspond to the certificate.
105 .PP
106 If the input stack \fIsk\fR is NULL a new stack is allocated,
107 else the given stack is extended.
108 .PP
109 The optional \fIcb\fR and \fIu\fR parameters can be used for providing a pass phrase
110 needed for decrypting encrypted PEM structures (normally only private keys).
111 See \fBPEM_read_bio_PrivateKey\fR\|(3) and \fBpassphrase\-encoding\fR\|(7) for details.
112 .PP
113 The library context \fIlibctx\fR and property query \fIpropq\fR are used for fetching
114 algorithms from providers.
115 .SH "RETURN VALUES"
116 .IX Header "RETURN VALUES"
117 \&\fBPEM_X509_INFO_read_ex()\fR, \fBPEM_X509_INFO_read()\fR,
118 \&\fBPEM_X509_INFO_read_bio_ex()\fR and \fBPEM_X509_INFO_read_bio()\fR return
119 a stack of \fBX509_INFO\fR objects or NULL on failure.
120 .SH "SEE ALSO"
121 .IX Header "SEE ALSO"
122 \&\fBPEM_read_bio_ex\fR\|(3),
123 \&\fBPEM_read_bio_PrivateKey\fR\|(3),
124 \&\fBpassphrase\-encoding\fR\|(7)
125 .SH HISTORY
126 .IX Header "HISTORY"
127 The functions \fBPEM_X509_INFO_read_ex()\fR and
128 \&\fBPEM_X509_INFO_read_bio_ex()\fR were added in OpenSSL 3.0.
129 .SH COPYRIGHT
130 .IX Header "COPYRIGHT"
131 Copyright 2020\-2022 The OpenSSL Project Authors. All Rights Reserved.
132 .PP
133 Licensed under the Apache License 2.0 (the "License"). You may not use
134 this file except in compliance with the License. You can obtain a copy
135 in the file LICENSE in the source distribution or at
136 <https://www.openssl.org/source/license.html>.