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