Debian Codegraph @

upstream/debian-unstable/man3/X509_CRL_get0_by_serial.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 "X509_CRL_GET0_BY_SERIAL 3SSL"
58 .TH X509_CRL_GET0_BY_SERIAL 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 X509_CRL_get0_by_serial, X509_CRL_get0_by_cert, X509_CRL_get_REVOKED,
65 X509_REVOKED_get0_serialNumber, X509_REVOKED_get0_revocationDate,
66 X509_REVOKED_set_serialNumber, X509_REVOKED_set_revocationDate,
67 X509_CRL_add0_revoked, X509_CRL_sort \- CRL revoked entry utility
68 functions
69 .SH SYNOPSIS
70 .IX Header "SYNOPSIS"
71 .Vb 1
72 \& #include <openssl/x509.h>
73 \&
74 \& int X509_CRL_get0_by_serial(X509_CRL *crl,
75 \& X509_REVOKED **ret, const ASN1_INTEGER *serial);
76 \& int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
77 \&
78 \& STACK_OF(X509_REVOKED) *X509_CRL_get_REVOKED(X509_CRL *crl);
79 \&
80 \& const ASN1_INTEGER *X509_REVOKED_get0_serialNumber(const X509_REVOKED *r);
81 \& const ASN1_TIME *X509_REVOKED_get0_revocationDate(const X509_REVOKED *r);
82 \&
83 \& int X509_REVOKED_set_serialNumber(X509_REVOKED *r, ASN1_INTEGER *serial);
84 \& int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
85 \&
86 \& int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
87 \&
88 \& int X509_CRL_sort(X509_CRL *crl);
89 .Ve
90 .SH DESCRIPTION
91 .IX Header "DESCRIPTION"
92 \&\fBX509_CRL_get0_by_serial()\fR attempts to find a revoked entry in \fIcrl\fR for
93 serial number \fIserial\fR. If it is successful, it sets \fI*ret\fR to the internal
94 pointer of the matching entry. As a result, \fI*ret\fR \fBMUST NOT\fR be freed
95 after the call.
96 .PP
97 \&\fBX509_CRL_get0_by_cert()\fR is similar to \fBX509_get0_by_serial()\fR except it
98 looks for a revoked entry using the serial number of certificate \fIx\fR.
99 .PP
100 \&\fBX509_CRL_get_REVOKED()\fR returns an internal pointer to a STACK of all
101 revoked entries for \fIcrl\fR.
102 .PP
103 \&\fBX509_REVOKED_get0_serialNumber()\fR returns an internal pointer to the
104 serial number of \fIr\fR.
105 .PP
106 \&\fBX509_REVOKED_get0_revocationDate()\fR returns an internal pointer to the
107 revocation date of \fIr\fR.
108 .PP
109 \&\fBX509_REVOKED_set_serialNumber()\fR sets the serial number of \fIr\fR to \fIserial\fR.
110 The supplied \fIserial\fR pointer is not used internally so it should be
111 freed after use.
112 .PP
113 \&\fBX509_REVOKED_set_revocationDate()\fR sets the revocation date of \fIr\fR to
114 \&\fItm\fR. The supplied \fItm\fR pointer is not used internally so it should be
115 freed after use.
116 .PP
117 \&\fBX509_CRL_add0_revoked()\fR appends revoked entry \fIrev\fR to CRL \fIcrl\fR. The
118 pointer \fIrev\fR is used internally so it \fBMUST NOT\fR be freed after the call:
119 it is freed when the parent CRL is freed.
120 .PP
121 \&\fBX509_CRL_sort()\fR sorts the revoked entries of \fIcrl\fR into ascending serial
122 number order.
123 .SH NOTES
124 .IX Header "NOTES"
125 Applications can determine the number of revoked entries returned by
126 \&\fBX509_CRL_get_REVOKED()\fR using \fBsk_X509_REVOKED_num()\fR and examine each one
127 in turn using \fBsk_X509_REVOKED_value()\fR.
128 .SH "RETURN VALUES"
129 .IX Header "RETURN VALUES"
130 \&\fBX509_CRL_get0_by_serial()\fR and \fBX509_CRL_get0_by_cert()\fR return 0 for failure,
131 1 on success except if the revoked entry has the reason \f(CW\*(C`removeFromCRL\*(C'\fR (8),
132 in which case 2 is returned.
133 .PP
134 \&\fBX509_CRL_get_REVOKED()\fR returns a STACK of revoked entries.
135 .PP
136 \&\fBX509_REVOKED_get0_serialNumber()\fR returns an \fBASN1_INTEGER\fR structure.
137 .PP
138 \&\fBX509_REVOKED_get0_revocationDate()\fR returns an \fBASN1_TIME\fR structure.
139 .PP
140 \&\fBX509_REVOKED_set_serialNumber()\fR, \fBX509_REVOKED_set_revocationDate()\fR,
141 \&\fBX509_CRL_add0_revoked()\fR and \fBX509_CRL_sort()\fR return 1 for success and 0 for
142 failure.
143 .SH "SEE ALSO"
144 .IX Header "SEE ALSO"
145 \&\fBd2i_X509\fR\|(3),
146 \&\fBERR_get_error\fR\|(3),
147 \&\fBX509_get0_signature\fR\|(3),
148 \&\fBX509_get_ext_d2i\fR\|(3),
149 \&\fBX509_get_extension_flags\fR\|(3),
150 \&\fBX509_get_pubkey\fR\|(3),
151 \&\fBX509_get_subject_name\fR\|(3),
152 \&\fBX509_get_version\fR\|(3),
153 \&\fBX509_NAME_add_entry_by_txt\fR\|(3),
154 \&\fBX509_NAME_ENTRY_get_object\fR\|(3),
155 \&\fBX509_NAME_get_index_by_NID\fR\|(3),
156 \&\fBX509_NAME_print_ex\fR\|(3),
157 \&\fBX509_new\fR\|(3),
158 \&\fBX509_sign\fR\|(3),
159 \&\fBX509V3_get_d2i\fR\|(3),
160 \&\fBX509_verify_cert\fR\|(3)
161 .SH COPYRIGHT
162 .IX Header "COPYRIGHT"
163 Copyright 2015\-2020 The OpenSSL Project Authors. All Rights Reserved.
164 .PP
165 Licensed under the Apache License 2.0 (the "License"). You may not use
166 this file except in compliance with the License. You can obtain a copy
167 in the file LICENSE in the source distribution or at
168 <https://www.openssl.org/source/license.html>.