]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - crypto/heimdal/doc/doxyout/hx509/man/man3/hx509_verify.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / crypto / heimdal / doc / doxyout / hx509 / man / man3 / hx509_verify.3
1 .TH "hx509 verification functions" 3 "11 Jan 2012" "Version 1.5.2" "Heimdalx509library" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 hx509 verification functions \- 
6 .SS "Functions"
7
8 .in +1c
9 .ti -1c
10 .RI "void \fBhx509_context_set_missing_revoke\fP (hx509_context context, int flag)"
11 .br
12 .ti -1c
13 .RI "int \fBhx509_verify_init_ctx\fP (hx509_context context, hx509_verify_ctx *ctx)"
14 .br
15 .ti -1c
16 .RI "void \fBhx509_verify_destroy_ctx\fP (hx509_verify_ctx ctx)"
17 .br
18 .ti -1c
19 .RI "void \fBhx509_verify_attach_anchors\fP (hx509_verify_ctx ctx, hx509_certs set)"
20 .br
21 .ti -1c
22 .RI "void \fBhx509_verify_attach_revoke\fP (hx509_verify_ctx ctx, hx509_revoke_ctx revoke_ctx)"
23 .br
24 .ti -1c
25 .RI "void \fBhx509_verify_set_time\fP (hx509_verify_ctx ctx, time_t t)"
26 .br
27 .ti -1c
28 .RI "void \fBhx509_verify_set_max_depth\fP (hx509_verify_ctx ctx, unsigned int max_depth)"
29 .br
30 .ti -1c
31 .RI "void \fBhx509_verify_set_proxy_certificate\fP (hx509_verify_ctx ctx, int boolean)"
32 .br
33 .ti -1c
34 .RI "void \fBhx509_verify_set_strict_rfc3280_verification\fP (hx509_verify_ctx ctx, int boolean)"
35 .br
36 .ti -1c
37 .RI "int \fBhx509_verify_path\fP (hx509_context context, hx509_verify_ctx ctx, hx509_cert cert, hx509_certs pool)"
38 .br
39 .ti -1c
40 .RI "int \fBhx509_ocsp_verify\fP (hx509_context context, time_t now, hx509_cert cert, int flags, const void *data, size_t length, time_t *expiration)"
41 .br
42 .ti -1c
43 .RI "int \fBhx509_crl_alloc\fP (hx509_context context, hx509_crl *crl)"
44 .br
45 .ti -1c
46 .RI "int \fBhx509_crl_add_revoked_certs\fP (hx509_context context, hx509_crl crl, hx509_certs certs)"
47 .br
48 .ti -1c
49 .RI "int \fBhx509_crl_lifetime\fP (hx509_context context, hx509_crl crl, int delta)"
50 .br
51 .ti -1c
52 .RI "void \fBhx509_crl_free\fP (hx509_context context, hx509_crl *crl)"
53 .br
54 .ti -1c
55 .RI "int \fBhx509_crl_sign\fP (hx509_context context, hx509_cert signer, hx509_crl crl, heim_octet_string *os)"
56 .br
57 .in -1c
58 .SH "Detailed Description"
59 .PP 
60
61 .SH "Function Documentation"
62 .PP 
63 .SS "void hx509_context_set_missing_revoke (hx509_context context, int flag)"
64 .PP
65 Selects if the \fBhx509_revoke_verify()\fP function is going to require the existans of a revokation method (OCSP, CRL) or not. Note that \fBhx509_verify_path()\fP, \fBhx509_cms_verify_signed()\fP, and other function call \fBhx509_revoke_verify()\fP.
66 .PP
67 \fBParameters:\fP
68 .RS 4
69 \fIcontext\fP hx509 context to change the flag for. 
70 .br
71 \fIflag\fP zero, revokation method required, non zero missing revokation method ok 
72 .RE
73 .PP
74
75 .SS "int hx509_crl_add_revoked_certs (hx509_context context, hx509_crl crl, hx509_certs certs)"
76 .PP
77 Add revoked certificate to an CRL context.
78 .PP
79 \fBParameters:\fP
80 .RS 4
81 \fIcontext\fP a hx509 context. 
82 .br
83 \fIcrl\fP the CRL to add the revoked certificate to. 
84 .br
85 \fIcerts\fP keyset of certificate to revoke.
86 .RE
87 .PP
88 \fBReturns:\fP
89 .RS 4
90 An hx509 error code, see \fBhx509_get_error_string()\fP. 
91 .RE
92 .PP
93
94 .SS "int hx509_crl_alloc (hx509_context context, hx509_crl * crl)"
95 .PP
96 Create a CRL context. Use \fBhx509_crl_free()\fP to free the CRL context.
97 .PP
98 \fBParameters:\fP
99 .RS 4
100 \fIcontext\fP a hx509 context. 
101 .br
102 \fIcrl\fP return pointer to a newly allocated CRL context.
103 .RE
104 .PP
105 \fBReturns:\fP
106 .RS 4
107 An hx509 error code, see \fBhx509_get_error_string()\fP. 
108 .RE
109 .PP
110
111 .SS "void hx509_crl_free (hx509_context context, hx509_crl * crl)"
112 .PP
113 Free a CRL context.
114 .PP
115 \fBParameters:\fP
116 .RS 4
117 \fIcontext\fP a hx509 context. 
118 .br
119 \fIcrl\fP a CRL context to free. 
120 .RE
121 .PP
122
123 .SS "int hx509_crl_lifetime (hx509_context context, hx509_crl crl, int delta)"
124 .PP
125 Set the lifetime of a CRL context.
126 .PP
127 \fBParameters:\fP
128 .RS 4
129 \fIcontext\fP a hx509 context. 
130 .br
131 \fIcrl\fP a CRL context 
132 .br
133 \fIdelta\fP delta time the certificate is valid, library adds the current time to this.
134 .RE
135 .PP
136 \fBReturns:\fP
137 .RS 4
138 An hx509 error code, see \fBhx509_get_error_string()\fP. 
139 .RE
140 .PP
141
142 .SS "int hx509_crl_sign (hx509_context context, hx509_cert signer, hx509_crl crl, heim_octet_string * os)"
143 .PP
144 Sign a CRL and return an encode certificate.
145 .PP
146 \fBParameters:\fP
147 .RS 4
148 \fIcontext\fP a hx509 context. 
149 .br
150 \fIsigner\fP certificate to sign the CRL with 
151 .br
152 \fIcrl\fP the CRL to sign 
153 .br
154 \fIos\fP return the signed and encoded CRL, free with free_heim_octet_string()
155 .RE
156 .PP
157 \fBReturns:\fP
158 .RS 4
159 An hx509 error code, see \fBhx509_get_error_string()\fP. 
160 .RE
161 .PP
162
163 .SS "int hx509_ocsp_verify (hx509_context context, time_t now, hx509_cert cert, int flags, const void * data, size_t length, time_t * expiration)"
164 .PP
165 Verify that the certificate is part of the OCSP reply and it's not expired. Doesn't verify signature the OCSP reply or it's done by a authorized sender, that is assumed to be already done.
166 .PP
167 \fBParameters:\fP
168 .RS 4
169 \fIcontext\fP a hx509 context 
170 .br
171 \fInow\fP the time right now, if 0, use the current time. 
172 .br
173 \fIcert\fP the certificate to verify 
174 .br
175 \fIflags\fP flags control the behavior 
176 .br
177 \fIdata\fP pointer to the encode ocsp reply 
178 .br
179 \fIlength\fP the length of the encode ocsp reply 
180 .br
181 \fIexpiration\fP return the time the OCSP will expire and need to be rechecked.
182 .RE
183 .PP
184 \fBReturns:\fP
185 .RS 4
186 An hx509 error code, see \fBhx509_get_error_string()\fP. 
187 .RE
188 .PP
189
190 .SS "void hx509_verify_attach_anchors (hx509_verify_ctx ctx, hx509_certs set)"
191 .PP
192 Set the trust anchors in the verification context, makes an reference to the keyset, so the consumer can free the keyset independent of the destruction of the verification context (ctx). If there already is a keyset attached, it's released.
193 .PP
194 \fBParameters:\fP
195 .RS 4
196 \fIctx\fP a verification context 
197 .br
198 \fIset\fP a keyset containing the trust anchors. 
199 .RE
200 .PP
201
202 .SS "void hx509_verify_attach_revoke (hx509_verify_ctx ctx, hx509_revoke_ctx revoke_ctx)"
203 .PP
204 Attach an revocation context to the verfication context, , makes an reference to the revoke context, so the consumer can free the revoke context independent of the destruction of the verification context. If there is no revoke context, the verification process is NOT going to check any verification status.
205 .PP
206 \fBParameters:\fP
207 .RS 4
208 \fIctx\fP a verification context. 
209 .br
210 \fIrevoke_ctx\fP a revoke context. 
211 .RE
212 .PP
213
214 .SS "void hx509_verify_destroy_ctx (hx509_verify_ctx ctx)"
215 .PP
216 Free an hx509 verification context.
217 .PP
218 \fBParameters:\fP
219 .RS 4
220 \fIctx\fP the context to be freed. 
221 .RE
222 .PP
223
224 .SS "int hx509_verify_init_ctx (hx509_context context, hx509_verify_ctx * ctx)"
225 .PP
226 Allocate an verification context that is used fo control the verification process.
227 .PP
228 \fBParameters:\fP
229 .RS 4
230 \fIcontext\fP A hx509 context. 
231 .br
232 \fIctx\fP returns a pointer to a hx509_verify_ctx object.
233 .RE
234 .PP
235 \fBReturns:\fP
236 .RS 4
237 An hx509 error code, see \fBhx509_get_error_string()\fP. 
238 .RE
239 .PP
240
241 .SS "int hx509_verify_path (hx509_context context, hx509_verify_ctx ctx, hx509_cert cert, hx509_certs pool)"
242 .PP
243 Build and verify the path for the certificate to the trust anchor specified in the verify context. The path is constructed from the certificate, the pool and the trust anchors.
244 .PP
245 \fBParameters:\fP
246 .RS 4
247 \fIcontext\fP A hx509 context. 
248 .br
249 \fIctx\fP A hx509 verification context. 
250 .br
251 \fIcert\fP the certificate to build the path from. 
252 .br
253 \fIpool\fP A keyset of certificates to build the chain from.
254 .RE
255 .PP
256 \fBReturns:\fP
257 .RS 4
258 An hx509 error code, see \fBhx509_get_error_string()\fP. 
259 .RE
260 .PP
261
262 .SS "void hx509_verify_set_max_depth (hx509_verify_ctx ctx, unsigned int max_depth)"
263 .PP
264 Set the maximum depth of the certificate chain that the path builder is going to try.
265 .PP
266 \fBParameters:\fP
267 .RS 4
268 \fIctx\fP a verification context 
269 .br
270 \fImax_depth\fP maxium depth of the certificate chain, include trust anchor. 
271 .RE
272 .PP
273
274 .SS "void hx509_verify_set_proxy_certificate (hx509_verify_ctx ctx, int boolean)"
275 .PP
276 Allow or deny the use of proxy certificates
277 .PP
278 \fBParameters:\fP
279 .RS 4
280 \fIctx\fP a verification context 
281 .br
282 \fIboolean\fP if non zero, allow proxy certificates. 
283 .RE
284 .PP
285
286 .SS "void hx509_verify_set_strict_rfc3280_verification (hx509_verify_ctx ctx, int boolean)"
287 .PP
288 Select strict RFC3280 verification of certificiates. This means checking key usage on CA certificates, this will make version 1 certificiates unuseable.
289 .PP
290 \fBParameters:\fP
291 .RS 4
292 \fIctx\fP a verification context 
293 .br
294 \fIboolean\fP if non zero, use strict verification. 
295 .RE
296 .PP
297
298 .SS "void hx509_verify_set_time (hx509_verify_ctx ctx, time_t t)"
299 .PP
300 Set the clock time the the verification process is going to use. Used to check certificate in the past and future time. If not set the current time will be used.
301 .PP
302 \fBParameters:\fP
303 .RS 4
304 \fIctx\fP a verification context. 
305 .br
306 \fIt\fP the time the verifiation is using. 
307 .RE
308 .PP
309