Unleashed v1.4
[unleashed.git] / lib / libcrypto / man / X509_CRL_new.3
blob47b3d54940dd550fcdbdcdabe518aa6644b9d6db
1 .\"     $OpenBSD: X509_CRL_new.3,v 1.7 2018/03/27 17:35:50 schwarze Exp $
2 .\"
3 .\" Copyright (c) 2016, 2018 Ingo Schwarze <schwarze@openbsd.org>
4 .\"
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
8 .\"
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 .\"
17 .Dd $Mdocdate: March 27 2018 $
18 .Dt X509_CRL_NEW 3
19 .Os
20 .Sh NAME
21 .Nm X509_CRL_new ,
22 .Nm X509_CRL_dup ,
23 .Nm X509_CRL_up_ref ,
24 .Nm X509_CRL_free ,
25 .Nm X509_CRL_INFO_new ,
26 .Nm X509_CRL_INFO_free
27 .Nd X.509 certificate revocation lists
28 .Sh SYNOPSIS
29 .In openssl/x509.h
30 .Ft X509_CRL *
31 .Fn X509_CRL_new void
32 .Ft X509_CRL *
33 .Fn X509_CRL_dup "X509_CRL *crl"
34 .Ft int
35 .Fn X509_CRL_up_ref "X509_CRL *crl"
36 .Ft void
37 .Fn X509_CRL_free "X509_CRL *crl"
38 .Ft X509_CRL_INFO *
39 .Fn X509_CRL_INFO_new void
40 .Ft void
41 .Fn X509_CRL_INFO_free "X509_CRL_INFO *crl_info"
42 .Sh DESCRIPTION
43 .Fn X509_CRL_new
44 allocates and initializes an empty
45 .Vt X509_CRL
46 object, representing an ASN.1
47 .Vt CertificateList
48 structure defined in RFC 5280 section 5.1.
49 It can hold a pointer to an
50 .Vt X509_CRL_INFO
51 object discussed below together with a cryptographic signature
52 and information about the signature algorithm used.
53 The reference count is set to 1.
54 .Pp
55 .Fn X509_CRL_dup
56 creates a deep copy of
57 .Fa crl .
58 .Pp
59 .Fn X509_CRL_up_ref
60 increments the reference count of
61 .Fa crl
62 by 1.
63 .Pp
64 .Fn X509_CRL_free
65 decrements the reference count of
66 .Fa crl
67 by 1.
68 If the reference count reaches 0, it frees
69 .Fa crl .
70 .Pp
71 .Fn X509_CRL_INFO_new
72 allocates and initializes an empty
73 .Vt X509_CRL_INFO
74 object, representing an ASN.1
75 .Vt TBSCertList
76 structure defined in RFC 5280 section 5.1.
77 It is used inside the
78 .Vt X509_CRL
79 object and can hold a list of revoked certificates, an issuer name,
80 the time the list was issued, the time when the next update of the
81 list is due, and optional extensions.
82 .Fn X509_CRL_INFO_free
83 frees
84 .Fa crl_info .
85 .Sh RETURN VALUES
86 .Fn X509_CRL_new ,
87 .Fn X509_CRL_dup ,
88 and
89 .Fn X509_CRL_INFO_new
90 return the new
91 .Vt X509_CRL
93 .Vt X509_CRL_INFO
94 object, respectively, or
95 .Dv NULL
96 if an error occurs.
97 .Pp
98 .Fn X509_CRL_up_ref
99 returns 1 on success or 0 on error.
100 .Sh SEE ALSO
101 .Xr ACCESS_DESCRIPTION_new 3 ,
102 .Xr AUTHORITY_KEYID_new 3 ,
103 .Xr d2i_X509_CRL 3 ,
104 .Xr DIST_POINT_new 3 ,
105 .Xr PEM_read_X509_CRL 3 ,
106 .Xr X509_CRL_get0_by_serial 3 ,
107 .Xr X509_CRL_get_ext 3 ,
108 .Xr X509_CRL_get_ext_d2i 3 ,
109 .Xr X509_CRL_get_issuer 3 ,
110 .Xr X509_CRL_get_version 3 ,
111 .Xr X509_CRL_sign 3 ,
112 .Xr X509_EXTENSION_new 3 ,
113 .Xr X509_load_crl_file 3 ,
114 .Xr X509_new 3 ,
115 .Xr X509_REVOKED_new 3 ,
116 .Xr X509_STORE_CTX_set0_crls 3
117 .Sh STANDARDS
118 RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
119 Certificate Revocation List (CRL) Profile, section 5: CRL and CRL
120 Extensions Profile
121 .Sh HISTORY
122 .Fn X509_CRL_new ,
123 .Fn X509_CRL_free ,
124 .Fn X509_CRL_INFO_new ,
126 .Fn X509_CRL_INFO_free
127 first appeared in SSLeay 0.4.4.
128 .Fn X509_CRL_dup
129 first appeared in SSLeay 0.5.1.
130 These functions have been available since
131 .Ox 2.4 .
133 .Fn X509_CRL_up_ref
134 first appeared in OpenSSL 1.1.0 and has been available since
135 .Ox 6.3 .