how-to-build: be explicit about env file
[unleashed.git] / lib / libcrypto / man / X509_REVOKED_new.3
blobf06075fcc22ea5dd5e82ab018bed1b1a70570ed3
1 .\"     $OpenBSD: X509_REVOKED_new.3,v 1.2 2016/12/25 22:15:10 schwarze Exp $
2 .\"     OpenSSL X509_CRL_get0_by_serial.pod 99d63d46 Oct 26 13:56:48 2016 -0400
3 .\"
4 .\" This file is a derived work.
5 .\" The changes are covered by the following Copyright and license:
6 .\"
7 .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
8 .\"
9 .\" Permission to use, copy, modify, and distribute this software for any
10 .\" purpose with or without fee is hereby granted, provided that the above
11 .\" copyright notice and this permission notice appear in all copies.
12 .\"
13 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 .\"
21 .\" The original file was written by Dr. Stephen Henson <steve@openssl.org>.
22 .\" Copyright (c) 2015 The OpenSSL Project.  All rights reserved.
23 .\"
24 .\" Redistribution and use in source and binary forms, with or without
25 .\" modification, are permitted provided that the following conditions
26 .\" are met:
27 .\"
28 .\" 1. Redistributions of source code must retain the above copyright
29 .\"    notice, this list of conditions and the following disclaimer.
30 .\"
31 .\" 2. Redistributions in binary form must reproduce the above copyright
32 .\"    notice, this list of conditions and the following disclaimer in
33 .\"    the documentation and/or other materials provided with the
34 .\"    distribution.
35 .\"
36 .\" 3. All advertising materials mentioning features or use of this
37 .\"    software must display the following acknowledgment:
38 .\"    "This product includes software developed by the OpenSSL Project
39 .\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
40 .\"
41 .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
42 .\"    endorse or promote products derived from this software without
43 .\"    prior written permission. For written permission, please contact
44 .\"    openssl-core@openssl.org.
45 .\"
46 .\" 5. Products derived from this software may not be called "OpenSSL"
47 .\"    nor may "OpenSSL" appear in their names without prior written
48 .\"    permission of the OpenSSL Project.
49 .\"
50 .\" 6. Redistributions of any form whatsoever must retain the following
51 .\"    acknowledgment:
52 .\"    "This product includes software developed by the OpenSSL Project
53 .\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
54 .\"
55 .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
56 .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
57 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
58 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
59 .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
60 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
61 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
62 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
63 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
64 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
65 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
66 .\" OF THE POSSIBILITY OF SUCH DAMAGE.
67 .\"
68 .Dd $Mdocdate: December 25 2016 $
69 .Dt X509_REVOKED_NEW 3
70 .Os
71 .Sh NAME
72 .Nm X509_REVOKED_new ,
73 .Nm X509_REVOKED_free ,
74 .Nm X509_REVOKED_set_serialNumber ,
75 .Nm X509_REVOKED_set_revocationDate
76 .Nd create and change an X.509 CRL revoked entry
77 .Sh SYNOPSIS
78 .In openssl/x509.h
79 .Ft X509_REVOKED *
80 .Fn X509_REVOKED_new void
81 .Ft void
82 .Fn X509_REVOKED_free "X509_REVOKED *r"
83 .Ft int
84 .Fo X509_REVOKED_set_serialNumber
85 .Fa "X509_REVOKED *r"
86 .Fa "ASN1_INTEGER *serial"
87 .Fc
88 .Ft int
89 .Fo X509_REVOKED_set_revocationDate
90 .Fa "X509_REVOKED *r"
91 .Fa "ASN1_TIME *tm"
92 .Fc
93 .Sh DESCRIPTION
94 .Fn X509_REVOKED_new
95 allocates and initializes an empty
96 .Vt X509_REVOKED
97 object, representing one of the elements of
98 the revokedCertificates field of the ASN.1
99 .Vt TBSCertList
100 structure defined in RFC 5280 section 5.1.
101 It is used by
102 .Vt X509_CRL
103 objects and can hold information about one revoked certificate
104 including issuer names, serial number, revocation date, and revocation
105 reason.
107 .Fn X509_REVOKED_free
108 frees
109 .Fa r .
111 .Fn X509_REVOKED_set_serialNumber
112 sets the serial number of
113 .Fa r
115 .Fa serial .
116 The supplied
117 .Fa serial
118 pointer is not used internally so it should be freed up after use.
120 .Fn X509_REVOKED_set_revocationDate
121 sets the revocation date of
122 .Fa r
124 .Fa tm .
125 The supplied
126 .Fa tm
127 pointer is not used internally so it should be freed up after use.
128 .Sh RETURN VALUES
129 .Fn X509_REVOKED_new
130 returns the new
131 .Vt X509_REVOKED
132 object or
133 .Dv NULL
134 if an error occurs.
136 .Fn X509_REVOKED_set_serialNumber
138 .Fn X509_REVOKED_set_revocationDate
139 return 1 for success or 0 for failure.
140 .Sh SEE ALSO
141 .Xr d2i_X509_CRL 3 ,
142 .Xr ERR_get_error 3 ,
143 .Xr PEM_read_X509_CRL 3 ,
144 .Xr X509_CRL_get0_by_serial 3
145 .Sh STANDARDS
146 RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
147 Certificate Revocation List (CRL) Profile, section 5.1: CRL Fields