1 .\" $OpenBSD: X509_REVOKED_new.3,v 1.9 2018/03/27 17:35:50 schwarze Exp $
3 .\" OpenSSL man3/X509_CRL_get0_by_serial cdd6c8c5 Mar 20 12:29:37 2017 +0100
5 .\" This file is a derived work.
6 .\" The changes are covered by the following Copyright and license:
8 .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
10 .\" Permission to use, copy, modify, and distribute this software for any
11 .\" purpose with or without fee is hereby granted, provided that the above
12 .\" copyright notice and this permission notice appear in all copies.
14 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 .\" The original file was written by Dr. Stephen Henson <steve@openssl.org>.
23 .\" Copyright (c) 2015 The OpenSSL Project. All rights reserved.
25 .\" Redistribution and use in source and binary forms, with or without
26 .\" modification, are permitted provided that the following conditions
29 .\" 1. Redistributions of source code must retain the above copyright
30 .\" notice, this list of conditions and the following disclaimer.
32 .\" 2. Redistributions in binary form must reproduce the above copyright
33 .\" notice, this list of conditions and the following disclaimer in
34 .\" the documentation and/or other materials provided with the
37 .\" 3. All advertising materials mentioning features or use of this
38 .\" software must display the following acknowledgment:
39 .\" "This product includes software developed by the OpenSSL Project
40 .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
42 .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
43 .\" endorse or promote products derived from this software without
44 .\" prior written permission. For written permission, please contact
45 .\" openssl-core@openssl.org.
47 .\" 5. Products derived from this software may not be called "OpenSSL"
48 .\" nor may "OpenSSL" appear in their names without prior written
49 .\" permission of the OpenSSL Project.
51 .\" 6. Redistributions of any form whatsoever must retain the following
53 .\" "This product includes software developed by the OpenSSL Project
54 .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)"
56 .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
57 .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
58 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
59 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
60 .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
61 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
62 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
63 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
64 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
65 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
66 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
67 .\" OF THE POSSIBILITY OF SUCH DAMAGE.
69 .Dd $Mdocdate: March 27 2018 $
70 .Dt X509_REVOKED_NEW 3
73 .Nm X509_REVOKED_new ,
74 .Nm X509_REVOKED_dup ,
75 .Nm X509_REVOKED_free ,
76 .Nm X509_REVOKED_get0_serialNumber ,
77 .Nm X509_REVOKED_get0_revocationDate ,
78 .Nm X509_REVOKED_set_serialNumber ,
79 .Nm X509_REVOKED_set_revocationDate
80 .Nd create, change, and inspect an X.509 CRL revoked entry
84 .Fn X509_REVOKED_new void
90 .Fn X509_REVOKED_free "X509_REVOKED *r"
91 .Ft const ASN1_INTEGER *
92 .Fo X509_REVOKED_get0_serialNumber
93 .Fa "const X509_REVOKED *r"
96 .Fo X509_REVOKED_get0_revocationDate
97 .Fa "const X509_REVOKED *r"
100 .Fo X509_REVOKED_set_serialNumber
101 .Fa "X509_REVOKED *r"
102 .Fa "ASN1_INTEGER *serial"
105 .Fo X509_REVOKED_set_revocationDate
106 .Fa "X509_REVOKED *r"
111 allocates and initializes an empty
113 object, representing one of the elements of
114 the revokedCertificates field of the ASN.1
116 structure defined in RFC 5280 section 5.1.
119 objects and can hold information about one revoked certificate
120 including issuer names, serial number, revocation date, and revocation
124 creates a deep copy of
127 .Fn X509_REVOKED_free
131 .Fn X509_REVOKED_set_serialNumber
132 sets the serial number of
138 pointer is not used internally so it should be freed up after use.
140 .Fn X509_REVOKED_set_revocationDate
141 sets the revocation date of
147 pointer is not used internally so it should be freed up after use.
158 .Fn X509_REVOKED_get0_serialNumber
159 returns an internal pointer to the serial number of
162 .Fn X509_REVOKED_get0_revocationDate
163 returns an internal pointer to the revocation date of
166 .Fn X509_REVOKED_set_serialNumber
168 .Fn X509_REVOKED_set_revocationDate
169 return 1 for success or 0 for failure.
172 .Xr ERR_get_error 3 ,
173 .Xr PEM_read_X509_CRL 3 ,
174 .Xr X509_CRL_get0_by_serial 3 ,
175 .Xr X509_EXTENSION_new 3 ,
176 .Xr X509_REVOKED_get_ext 3 ,
177 .Xr X509_REVOKED_get_ext_d2i 3
179 RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
180 Certificate Revocation List (CRL) Profile, section 5.1: CRL Fields
184 .Fn X509_REVOKED_free
185 first appeared in SSLeay 0.4.4 and have been available since
188 .Fn X509_REVOKED_set_serialNumber
190 .Fn X509_REVOKED_set_revocationDate
191 first appeared in OpenSSL 0.9.7 and have been available since
195 first appeared in OpenSSL 1.0.2.
196 .Fn X509_REVOKED_get0_serialNumber
198 .Fn X509_REVOKED_get0_revocationDate
199 first appeared in OpenSSL 1.1.0.
200 These functions have been available since