xref: /freebsd/crypto/heimdal/doc/doxyout/hx509/html/group__hx509__verify.html (revision 9f44a47fd07924afc035991af15d84e6585dea4f)
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3<title>Heimdalx509library: hx509 verification functions</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5<link href="tabs.css" rel="stylesheet" type="text/css">
6</head><body>
7<p>
8<a href="http://www.h5l.org/"><img src="http://www.h5l.org/keyhole-heimdal.png" alt="keyhole logo"/></a>
9</p>
10<!-- end of header marker -->
11<!-- Generated by Doxygen 1.5.6 -->
12<div class="navigation" id="top">
13  <div class="tabs">
14    <ul>
15      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
16      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
17      <li><a href="modules.html"><span>Modules</span></a></li>
18    </ul>
19  </div>
20</div>
21<div class="contents">
22<h1>hx509 verification functions</h1><table border="0" cellpadding="0" cellspacing="0">
23<tr><td></td></tr>
24<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
25<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__verify.html#gcf53ef0c8202b75d946b47266e4777da">hx509_context_set_missing_revoke</a> (hx509_context context, int flag)</td></tr>
26
27<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__verify.html#g53a78d7c374e238354600b754f8ef4c7">hx509_verify_init_ctx</a> (hx509_context context, hx509_verify_ctx *ctx)</td></tr>
28
29<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__verify.html#ga90ca3387075fbdf3ae014beda0b4108">hx509_verify_destroy_ctx</a> (hx509_verify_ctx ctx)</td></tr>
30
31<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__verify.html#gacc284cfe15ebfd4372aa0725d24e8a0">hx509_verify_attach_anchors</a> (hx509_verify_ctx ctx, hx509_certs set)</td></tr>
32
33<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__verify.html#gaf1e783c744e3ce3918d7c00f101f1fc">hx509_verify_attach_revoke</a> (hx509_verify_ctx ctx, hx509_revoke_ctx revoke_ctx)</td></tr>
34
35<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__verify.html#g1490c2944163f25cf02377bae5d0ab37">hx509_verify_set_time</a> (hx509_verify_ctx ctx, time_t t)</td></tr>
36
37<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__verify.html#g11a6fe7afbd5cee1af2dedeffcaad33c">hx509_verify_set_max_depth</a> (hx509_verify_ctx ctx, unsigned int max_depth)</td></tr>
38
39<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__verify.html#g50cae1e3d318471ff444770cfec4b0a8">hx509_verify_set_proxy_certificate</a> (hx509_verify_ctx ctx, int boolean)</td></tr>
40
41<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__verify.html#g7c301cedab40be9a495dea2778202140">hx509_verify_set_strict_rfc3280_verification</a> (hx509_verify_ctx ctx, int boolean)</td></tr>
42
43<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__verify.html#g1e84c0d08972e2dd87ba89f105183914">hx509_verify_path</a> (hx509_context context, hx509_verify_ctx ctx, hx509_cert cert, hx509_certs pool)</td></tr>
44
45<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__verify.html#ge7e5973c6c9a66d599c44d9473ade82a">hx509_ocsp_verify</a> (hx509_context context, time_t now, hx509_cert cert, int flags, const void *data, size_t length, time_t *expiration)</td></tr>
46
47<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__verify.html#g8b46fa446893a189808deabc2bc630d1">hx509_crl_alloc</a> (hx509_context context, hx509_crl *crl)</td></tr>
48
49<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__verify.html#g51a77209dd8f88e8ca52ad618dc62fe6">hx509_crl_add_revoked_certs</a> (hx509_context context, hx509_crl crl, hx509_certs certs)</td></tr>
50
51<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__verify.html#gaff0e82873a480d002cc7f1b69f430e8">hx509_crl_lifetime</a> (hx509_context context, hx509_crl crl, int delta)</td></tr>
52
53<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__verify.html#gb59b054be16d4607aed4001ee071ecb6">hx509_crl_free</a> (hx509_context context, hx509_crl *crl)</td></tr>
54
55<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__verify.html#g7361cfd5f3b413ea4715977fae210760">hx509_crl_sign</a> (hx509_context context, hx509_cert signer, hx509_crl crl, heim_octet_string *os)</td></tr>
56
57</table>
58<hr><a name="_details"></a><h2>Detailed Description</h2>
59<hr><h2>Function Documentation</h2>
60<a class="anchor" name="gcf53ef0c8202b75d946b47266e4777da"></a><!-- doxytag: member="cert.c::hx509_context_set_missing_revoke" ref="gcf53ef0c8202b75d946b47266e4777da" args="(hx509_context context, int flag)" -->
61<div class="memitem">
62<div class="memproto">
63      <table class="memname">
64        <tr>
65          <td class="memname">void hx509_context_set_missing_revoke           </td>
66          <td>(</td>
67          <td class="paramtype">hx509_context&nbsp;</td>
68          <td class="paramname"> <em>context</em>, </td>
69        </tr>
70        <tr>
71          <td class="paramkey"></td>
72          <td></td>
73          <td class="paramtype">int&nbsp;</td>
74          <td class="paramname"> <em>flag</em></td><td>&nbsp;</td>
75        </tr>
76        <tr>
77          <td></td>
78          <td>)</td>
79          <td></td><td></td><td></td>
80        </tr>
81      </table>
82</div>
83<div class="memdoc">
84
85<p>
86Selects if the <a class="el" href="group__hx509__revoke.html#g3faf6194dc7429f8850e02b3ae2bbeeb">hx509_revoke_verify()</a> function is going to require the existans of a revokation method (OCSP, CRL) or not. Note that <a class="el" href="group__hx509__verify.html#g1e84c0d08972e2dd87ba89f105183914">hx509_verify_path()</a>, <a class="el" href="group__hx509__cms.html#gedaf18507474021a8d092ca6ac90a1ad">hx509_cms_verify_signed()</a>, and other function call <a class="el" href="group__hx509__revoke.html#g3faf6194dc7429f8850e02b3ae2bbeeb">hx509_revoke_verify()</a>.<p>
87<dl compact><dt><b>Parameters:</b></dt><dd>
88  <table border="0" cellspacing="2" cellpadding="0">
89    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>hx509 context to change the flag for. </td></tr>
90    <tr><td valign="top"></td><td valign="top"><em>flag</em>&nbsp;</td><td>zero, revokation method required, non zero missing revokation method ok </td></tr>
91  </table>
92</dl>
93
94</div>
95</div><p>
96<a class="anchor" name="g51a77209dd8f88e8ca52ad618dc62fe6"></a><!-- doxytag: member="revoke.c::hx509_crl_add_revoked_certs" ref="g51a77209dd8f88e8ca52ad618dc62fe6" args="(hx509_context context, hx509_crl crl, hx509_certs certs)" -->
97<div class="memitem">
98<div class="memproto">
99      <table class="memname">
100        <tr>
101          <td class="memname">int hx509_crl_add_revoked_certs           </td>
102          <td>(</td>
103          <td class="paramtype">hx509_context&nbsp;</td>
104          <td class="paramname"> <em>context</em>, </td>
105        </tr>
106        <tr>
107          <td class="paramkey"></td>
108          <td></td>
109          <td class="paramtype">hx509_crl&nbsp;</td>
110          <td class="paramname"> <em>crl</em>, </td>
111        </tr>
112        <tr>
113          <td class="paramkey"></td>
114          <td></td>
115          <td class="paramtype">hx509_certs&nbsp;</td>
116          <td class="paramname"> <em>certs</em></td><td>&nbsp;</td>
117        </tr>
118        <tr>
119          <td></td>
120          <td>)</td>
121          <td></td><td></td><td></td>
122        </tr>
123      </table>
124</div>
125<div class="memdoc">
126
127<p>
128Add revoked certificate to an CRL context.<p>
129<dl compact><dt><b>Parameters:</b></dt><dd>
130  <table border="0" cellspacing="2" cellpadding="0">
131    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>a hx509 context. </td></tr>
132    <tr><td valign="top"></td><td valign="top"><em>crl</em>&nbsp;</td><td>the CRL to add the revoked certificate to. </td></tr>
133    <tr><td valign="top"></td><td valign="top"><em>certs</em>&nbsp;</td><td>keyset of certificate to revoke.</td></tr>
134  </table>
135</dl>
136<dl class="return" compact><dt><b>Returns:</b></dt><dd>An hx509 error code, see <a class="el" href="group__hx509__error.html#g15791abff76719acb531223fdcbcac87">hx509_get_error_string()</a>. </dd></dl>
137
138</div>
139</div><p>
140<a class="anchor" name="g8b46fa446893a189808deabc2bc630d1"></a><!-- doxytag: member="revoke.c::hx509_crl_alloc" ref="g8b46fa446893a189808deabc2bc630d1" args="(hx509_context context, hx509_crl *crl)" -->
141<div class="memitem">
142<div class="memproto">
143      <table class="memname">
144        <tr>
145          <td class="memname">int hx509_crl_alloc           </td>
146          <td>(</td>
147          <td class="paramtype">hx509_context&nbsp;</td>
148          <td class="paramname"> <em>context</em>, </td>
149        </tr>
150        <tr>
151          <td class="paramkey"></td>
152          <td></td>
153          <td class="paramtype">hx509_crl *&nbsp;</td>
154          <td class="paramname"> <em>crl</em></td><td>&nbsp;</td>
155        </tr>
156        <tr>
157          <td></td>
158          <td>)</td>
159          <td></td><td></td><td></td>
160        </tr>
161      </table>
162</div>
163<div class="memdoc">
164
165<p>
166Create a CRL context. Use <a class="el" href="group__hx509__verify.html#gb59b054be16d4607aed4001ee071ecb6">hx509_crl_free()</a> to free the CRL context.<p>
167<dl compact><dt><b>Parameters:</b></dt><dd>
168  <table border="0" cellspacing="2" cellpadding="0">
169    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>a hx509 context. </td></tr>
170    <tr><td valign="top"></td><td valign="top"><em>crl</em>&nbsp;</td><td>return pointer to a newly allocated CRL context.</td></tr>
171  </table>
172</dl>
173<dl class="return" compact><dt><b>Returns:</b></dt><dd>An hx509 error code, see <a class="el" href="group__hx509__error.html#g15791abff76719acb531223fdcbcac87">hx509_get_error_string()</a>. </dd></dl>
174
175</div>
176</div><p>
177<a class="anchor" name="gb59b054be16d4607aed4001ee071ecb6"></a><!-- doxytag: member="revoke.c::hx509_crl_free" ref="gb59b054be16d4607aed4001ee071ecb6" args="(hx509_context context, hx509_crl *crl)" -->
178<div class="memitem">
179<div class="memproto">
180      <table class="memname">
181        <tr>
182          <td class="memname">void hx509_crl_free           </td>
183          <td>(</td>
184          <td class="paramtype">hx509_context&nbsp;</td>
185          <td class="paramname"> <em>context</em>, </td>
186        </tr>
187        <tr>
188          <td class="paramkey"></td>
189          <td></td>
190          <td class="paramtype">hx509_crl *&nbsp;</td>
191          <td class="paramname"> <em>crl</em></td><td>&nbsp;</td>
192        </tr>
193        <tr>
194          <td></td>
195          <td>)</td>
196          <td></td><td></td><td></td>
197        </tr>
198      </table>
199</div>
200<div class="memdoc">
201
202<p>
203Free a CRL context.<p>
204<dl compact><dt><b>Parameters:</b></dt><dd>
205  <table border="0" cellspacing="2" cellpadding="0">
206    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>a hx509 context. </td></tr>
207    <tr><td valign="top"></td><td valign="top"><em>crl</em>&nbsp;</td><td>a CRL context to free. </td></tr>
208  </table>
209</dl>
210
211</div>
212</div><p>
213<a class="anchor" name="gaff0e82873a480d002cc7f1b69f430e8"></a><!-- doxytag: member="revoke.c::hx509_crl_lifetime" ref="gaff0e82873a480d002cc7f1b69f430e8" args="(hx509_context context, hx509_crl crl, int delta)" -->
214<div class="memitem">
215<div class="memproto">
216      <table class="memname">
217        <tr>
218          <td class="memname">int hx509_crl_lifetime           </td>
219          <td>(</td>
220          <td class="paramtype">hx509_context&nbsp;</td>
221          <td class="paramname"> <em>context</em>, </td>
222        </tr>
223        <tr>
224          <td class="paramkey"></td>
225          <td></td>
226          <td class="paramtype">hx509_crl&nbsp;</td>
227          <td class="paramname"> <em>crl</em>, </td>
228        </tr>
229        <tr>
230          <td class="paramkey"></td>
231          <td></td>
232          <td class="paramtype">int&nbsp;</td>
233          <td class="paramname"> <em>delta</em></td><td>&nbsp;</td>
234        </tr>
235        <tr>
236          <td></td>
237          <td>)</td>
238          <td></td><td></td><td></td>
239        </tr>
240      </table>
241</div>
242<div class="memdoc">
243
244<p>
245Set the lifetime of a CRL context.<p>
246<dl compact><dt><b>Parameters:</b></dt><dd>
247  <table border="0" cellspacing="2" cellpadding="0">
248    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>a hx509 context. </td></tr>
249    <tr><td valign="top"></td><td valign="top"><em>crl</em>&nbsp;</td><td>a CRL context </td></tr>
250    <tr><td valign="top"></td><td valign="top"><em>delta</em>&nbsp;</td><td>delta time the certificate is valid, library adds the current time to this.</td></tr>
251  </table>
252</dl>
253<dl class="return" compact><dt><b>Returns:</b></dt><dd>An hx509 error code, see <a class="el" href="group__hx509__error.html#g15791abff76719acb531223fdcbcac87">hx509_get_error_string()</a>. </dd></dl>
254
255</div>
256</div><p>
257<a class="anchor" name="g7361cfd5f3b413ea4715977fae210760"></a><!-- doxytag: member="revoke.c::hx509_crl_sign" ref="g7361cfd5f3b413ea4715977fae210760" args="(hx509_context context, hx509_cert signer, hx509_crl crl, heim_octet_string *os)" -->
258<div class="memitem">
259<div class="memproto">
260      <table class="memname">
261        <tr>
262          <td class="memname">int hx509_crl_sign           </td>
263          <td>(</td>
264          <td class="paramtype">hx509_context&nbsp;</td>
265          <td class="paramname"> <em>context</em>, </td>
266        </tr>
267        <tr>
268          <td class="paramkey"></td>
269          <td></td>
270          <td class="paramtype">hx509_cert&nbsp;</td>
271          <td class="paramname"> <em>signer</em>, </td>
272        </tr>
273        <tr>
274          <td class="paramkey"></td>
275          <td></td>
276          <td class="paramtype">hx509_crl&nbsp;</td>
277          <td class="paramname"> <em>crl</em>, </td>
278        </tr>
279        <tr>
280          <td class="paramkey"></td>
281          <td></td>
282          <td class="paramtype">heim_octet_string *&nbsp;</td>
283          <td class="paramname"> <em>os</em></td><td>&nbsp;</td>
284        </tr>
285        <tr>
286          <td></td>
287          <td>)</td>
288          <td></td><td></td><td></td>
289        </tr>
290      </table>
291</div>
292<div class="memdoc">
293
294<p>
295Sign a CRL and return an encode certificate.<p>
296<dl compact><dt><b>Parameters:</b></dt><dd>
297  <table border="0" cellspacing="2" cellpadding="0">
298    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>a hx509 context. </td></tr>
299    <tr><td valign="top"></td><td valign="top"><em>signer</em>&nbsp;</td><td>certificate to sign the CRL with </td></tr>
300    <tr><td valign="top"></td><td valign="top"><em>crl</em>&nbsp;</td><td>the CRL to sign </td></tr>
301    <tr><td valign="top"></td><td valign="top"><em>os</em>&nbsp;</td><td>return the signed and encoded CRL, free with free_heim_octet_string()</td></tr>
302  </table>
303</dl>
304<dl class="return" compact><dt><b>Returns:</b></dt><dd>An hx509 error code, see <a class="el" href="group__hx509__error.html#g15791abff76719acb531223fdcbcac87">hx509_get_error_string()</a>. </dd></dl>
305
306</div>
307</div><p>
308<a class="anchor" name="ge7e5973c6c9a66d599c44d9473ade82a"></a><!-- doxytag: member="revoke.c::hx509_ocsp_verify" ref="ge7e5973c6c9a66d599c44d9473ade82a" args="(hx509_context context, time_t now, hx509_cert cert, int flags, const void *data, size_t length, time_t *expiration)" -->
309<div class="memitem">
310<div class="memproto">
311      <table class="memname">
312        <tr>
313          <td class="memname">int hx509_ocsp_verify           </td>
314          <td>(</td>
315          <td class="paramtype">hx509_context&nbsp;</td>
316          <td class="paramname"> <em>context</em>, </td>
317        </tr>
318        <tr>
319          <td class="paramkey"></td>
320          <td></td>
321          <td class="paramtype">time_t&nbsp;</td>
322          <td class="paramname"> <em>now</em>, </td>
323        </tr>
324        <tr>
325          <td class="paramkey"></td>
326          <td></td>
327          <td class="paramtype">hx509_cert&nbsp;</td>
328          <td class="paramname"> <em>cert</em>, </td>
329        </tr>
330        <tr>
331          <td class="paramkey"></td>
332          <td></td>
333          <td class="paramtype">int&nbsp;</td>
334          <td class="paramname"> <em>flags</em>, </td>
335        </tr>
336        <tr>
337          <td class="paramkey"></td>
338          <td></td>
339          <td class="paramtype">const void *&nbsp;</td>
340          <td class="paramname"> <em>data</em>, </td>
341        </tr>
342        <tr>
343          <td class="paramkey"></td>
344          <td></td>
345          <td class="paramtype">size_t&nbsp;</td>
346          <td class="paramname"> <em>length</em>, </td>
347        </tr>
348        <tr>
349          <td class="paramkey"></td>
350          <td></td>
351          <td class="paramtype">time_t *&nbsp;</td>
352          <td class="paramname"> <em>expiration</em></td><td>&nbsp;</td>
353        </tr>
354        <tr>
355          <td></td>
356          <td>)</td>
357          <td></td><td></td><td></td>
358        </tr>
359      </table>
360</div>
361<div class="memdoc">
362
363<p>
364Verify 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.<p>
365<dl compact><dt><b>Parameters:</b></dt><dd>
366  <table border="0" cellspacing="2" cellpadding="0">
367    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>a hx509 context </td></tr>
368    <tr><td valign="top"></td><td valign="top"><em>now</em>&nbsp;</td><td>the time right now, if 0, use the current time. </td></tr>
369    <tr><td valign="top"></td><td valign="top"><em>cert</em>&nbsp;</td><td>the certificate to verify </td></tr>
370    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>flags control the behavior </td></tr>
371    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>pointer to the encode ocsp reply </td></tr>
372    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>the length of the encode ocsp reply </td></tr>
373    <tr><td valign="top"></td><td valign="top"><em>expiration</em>&nbsp;</td><td>return the time the OCSP will expire and need to be rechecked.</td></tr>
374  </table>
375</dl>
376<dl class="return" compact><dt><b>Returns:</b></dt><dd>An hx509 error code, see <a class="el" href="group__hx509__error.html#g15791abff76719acb531223fdcbcac87">hx509_get_error_string()</a>. </dd></dl>
377
378</div>
379</div><p>
380<a class="anchor" name="gacc284cfe15ebfd4372aa0725d24e8a0"></a><!-- doxytag: member="cert.c::hx509_verify_attach_anchors" ref="gacc284cfe15ebfd4372aa0725d24e8a0" args="(hx509_verify_ctx ctx, hx509_certs set)" -->
381<div class="memitem">
382<div class="memproto">
383      <table class="memname">
384        <tr>
385          <td class="memname">void hx509_verify_attach_anchors           </td>
386          <td>(</td>
387          <td class="paramtype">hx509_verify_ctx&nbsp;</td>
388          <td class="paramname"> <em>ctx</em>, </td>
389        </tr>
390        <tr>
391          <td class="paramkey"></td>
392          <td></td>
393          <td class="paramtype">hx509_certs&nbsp;</td>
394          <td class="paramname"> <em>set</em></td><td>&nbsp;</td>
395        </tr>
396        <tr>
397          <td></td>
398          <td>)</td>
399          <td></td><td></td><td></td>
400        </tr>
401      </table>
402</div>
403<div class="memdoc">
404
405<p>
406Set 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.<p>
407<dl compact><dt><b>Parameters:</b></dt><dd>
408  <table border="0" cellspacing="2" cellpadding="0">
409    <tr><td valign="top"></td><td valign="top"><em>ctx</em>&nbsp;</td><td>a verification context </td></tr>
410    <tr><td valign="top"></td><td valign="top"><em>set</em>&nbsp;</td><td>a keyset containing the trust anchors. </td></tr>
411  </table>
412</dl>
413
414</div>
415</div><p>
416<a class="anchor" name="gaf1e783c744e3ce3918d7c00f101f1fc"></a><!-- doxytag: member="cert.c::hx509_verify_attach_revoke" ref="gaf1e783c744e3ce3918d7c00f101f1fc" args="(hx509_verify_ctx ctx, hx509_revoke_ctx revoke_ctx)" -->
417<div class="memitem">
418<div class="memproto">
419      <table class="memname">
420        <tr>
421          <td class="memname">void hx509_verify_attach_revoke           </td>
422          <td>(</td>
423          <td class="paramtype">hx509_verify_ctx&nbsp;</td>
424          <td class="paramname"> <em>ctx</em>, </td>
425        </tr>
426        <tr>
427          <td class="paramkey"></td>
428          <td></td>
429          <td class="paramtype">hx509_revoke_ctx&nbsp;</td>
430          <td class="paramname"> <em>revoke_ctx</em></td><td>&nbsp;</td>
431        </tr>
432        <tr>
433          <td></td>
434          <td>)</td>
435          <td></td><td></td><td></td>
436        </tr>
437      </table>
438</div>
439<div class="memdoc">
440
441<p>
442Attach 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.<p>
443<dl compact><dt><b>Parameters:</b></dt><dd>
444  <table border="0" cellspacing="2" cellpadding="0">
445    <tr><td valign="top"></td><td valign="top"><em>ctx</em>&nbsp;</td><td>a verification context. </td></tr>
446    <tr><td valign="top"></td><td valign="top"><em>revoke_ctx</em>&nbsp;</td><td>a revoke context. </td></tr>
447  </table>
448</dl>
449
450</div>
451</div><p>
452<a class="anchor" name="ga90ca3387075fbdf3ae014beda0b4108"></a><!-- doxytag: member="cert.c::hx509_verify_destroy_ctx" ref="ga90ca3387075fbdf3ae014beda0b4108" args="(hx509_verify_ctx ctx)" -->
453<div class="memitem">
454<div class="memproto">
455      <table class="memname">
456        <tr>
457          <td class="memname">void hx509_verify_destroy_ctx           </td>
458          <td>(</td>
459          <td class="paramtype">hx509_verify_ctx&nbsp;</td>
460          <td class="paramname"> <em>ctx</em>          </td>
461          <td>&nbsp;)&nbsp;</td>
462          <td></td>
463        </tr>
464      </table>
465</div>
466<div class="memdoc">
467
468<p>
469Free an hx509 verification context.<p>
470<dl compact><dt><b>Parameters:</b></dt><dd>
471  <table border="0" cellspacing="2" cellpadding="0">
472    <tr><td valign="top"></td><td valign="top"><em>ctx</em>&nbsp;</td><td>the context to be freed. </td></tr>
473  </table>
474</dl>
475
476</div>
477</div><p>
478<a class="anchor" name="g53a78d7c374e238354600b754f8ef4c7"></a><!-- doxytag: member="cert.c::hx509_verify_init_ctx" ref="g53a78d7c374e238354600b754f8ef4c7" args="(hx509_context context, hx509_verify_ctx *ctx)" -->
479<div class="memitem">
480<div class="memproto">
481      <table class="memname">
482        <tr>
483          <td class="memname">int hx509_verify_init_ctx           </td>
484          <td>(</td>
485          <td class="paramtype">hx509_context&nbsp;</td>
486          <td class="paramname"> <em>context</em>, </td>
487        </tr>
488        <tr>
489          <td class="paramkey"></td>
490          <td></td>
491          <td class="paramtype">hx509_verify_ctx *&nbsp;</td>
492          <td class="paramname"> <em>ctx</em></td><td>&nbsp;</td>
493        </tr>
494        <tr>
495          <td></td>
496          <td>)</td>
497          <td></td><td></td><td></td>
498        </tr>
499      </table>
500</div>
501<div class="memdoc">
502
503<p>
504Allocate an verification context that is used fo control the verification process.<p>
505<dl compact><dt><b>Parameters:</b></dt><dd>
506  <table border="0" cellspacing="2" cellpadding="0">
507    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A hx509 context. </td></tr>
508    <tr><td valign="top"></td><td valign="top"><em>ctx</em>&nbsp;</td><td>returns a pointer to a hx509_verify_ctx object.</td></tr>
509  </table>
510</dl>
511<dl class="return" compact><dt><b>Returns:</b></dt><dd>An hx509 error code, see <a class="el" href="group__hx509__error.html#g15791abff76719acb531223fdcbcac87">hx509_get_error_string()</a>. </dd></dl>
512
513</div>
514</div><p>
515<a class="anchor" name="g1e84c0d08972e2dd87ba89f105183914"></a><!-- doxytag: member="cert.c::hx509_verify_path" ref="g1e84c0d08972e2dd87ba89f105183914" args="(hx509_context context, hx509_verify_ctx ctx, hx509_cert cert, hx509_certs pool)" -->
516<div class="memitem">
517<div class="memproto">
518      <table class="memname">
519        <tr>
520          <td class="memname">int hx509_verify_path           </td>
521          <td>(</td>
522          <td class="paramtype">hx509_context&nbsp;</td>
523          <td class="paramname"> <em>context</em>, </td>
524        </tr>
525        <tr>
526          <td class="paramkey"></td>
527          <td></td>
528          <td class="paramtype">hx509_verify_ctx&nbsp;</td>
529          <td class="paramname"> <em>ctx</em>, </td>
530        </tr>
531        <tr>
532          <td class="paramkey"></td>
533          <td></td>
534          <td class="paramtype">hx509_cert&nbsp;</td>
535          <td class="paramname"> <em>cert</em>, </td>
536        </tr>
537        <tr>
538          <td class="paramkey"></td>
539          <td></td>
540          <td class="paramtype">hx509_certs&nbsp;</td>
541          <td class="paramname"> <em>pool</em></td><td>&nbsp;</td>
542        </tr>
543        <tr>
544          <td></td>
545          <td>)</td>
546          <td></td><td></td><td></td>
547        </tr>
548      </table>
549</div>
550<div class="memdoc">
551
552<p>
553Build 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.<p>
554<dl compact><dt><b>Parameters:</b></dt><dd>
555  <table border="0" cellspacing="2" cellpadding="0">
556    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A hx509 context. </td></tr>
557    <tr><td valign="top"></td><td valign="top"><em>ctx</em>&nbsp;</td><td>A hx509 verification context. </td></tr>
558    <tr><td valign="top"></td><td valign="top"><em>cert</em>&nbsp;</td><td>the certificate to build the path from. </td></tr>
559    <tr><td valign="top"></td><td valign="top"><em>pool</em>&nbsp;</td><td>A keyset of certificates to build the chain from.</td></tr>
560  </table>
561</dl>
562<dl class="return" compact><dt><b>Returns:</b></dt><dd>An hx509 error code, see <a class="el" href="group__hx509__error.html#g15791abff76719acb531223fdcbcac87">hx509_get_error_string()</a>. </dd></dl>
563
564</div>
565</div><p>
566<a class="anchor" name="g11a6fe7afbd5cee1af2dedeffcaad33c"></a><!-- doxytag: member="cert.c::hx509_verify_set_max_depth" ref="g11a6fe7afbd5cee1af2dedeffcaad33c" args="(hx509_verify_ctx ctx, unsigned int max_depth)" -->
567<div class="memitem">
568<div class="memproto">
569      <table class="memname">
570        <tr>
571          <td class="memname">void hx509_verify_set_max_depth           </td>
572          <td>(</td>
573          <td class="paramtype">hx509_verify_ctx&nbsp;</td>
574          <td class="paramname"> <em>ctx</em>, </td>
575        </tr>
576        <tr>
577          <td class="paramkey"></td>
578          <td></td>
579          <td class="paramtype">unsigned int&nbsp;</td>
580          <td class="paramname"> <em>max_depth</em></td><td>&nbsp;</td>
581        </tr>
582        <tr>
583          <td></td>
584          <td>)</td>
585          <td></td><td></td><td></td>
586        </tr>
587      </table>
588</div>
589<div class="memdoc">
590
591<p>
592Set the maximum depth of the certificate chain that the path builder is going to try.<p>
593<dl compact><dt><b>Parameters:</b></dt><dd>
594  <table border="0" cellspacing="2" cellpadding="0">
595    <tr><td valign="top"></td><td valign="top"><em>ctx</em>&nbsp;</td><td>a verification context </td></tr>
596    <tr><td valign="top"></td><td valign="top"><em>max_depth</em>&nbsp;</td><td>maxium depth of the certificate chain, include trust anchor. </td></tr>
597  </table>
598</dl>
599
600</div>
601</div><p>
602<a class="anchor" name="g50cae1e3d318471ff444770cfec4b0a8"></a><!-- doxytag: member="cert.c::hx509_verify_set_proxy_certificate" ref="g50cae1e3d318471ff444770cfec4b0a8" args="(hx509_verify_ctx ctx, int boolean)" -->
603<div class="memitem">
604<div class="memproto">
605      <table class="memname">
606        <tr>
607          <td class="memname">void hx509_verify_set_proxy_certificate           </td>
608          <td>(</td>
609          <td class="paramtype">hx509_verify_ctx&nbsp;</td>
610          <td class="paramname"> <em>ctx</em>, </td>
611        </tr>
612        <tr>
613          <td class="paramkey"></td>
614          <td></td>
615          <td class="paramtype">int&nbsp;</td>
616          <td class="paramname"> <em>boolean</em></td><td>&nbsp;</td>
617        </tr>
618        <tr>
619          <td></td>
620          <td>)</td>
621          <td></td><td></td><td></td>
622        </tr>
623      </table>
624</div>
625<div class="memdoc">
626
627<p>
628Allow or deny the use of proxy certificates<p>
629<dl compact><dt><b>Parameters:</b></dt><dd>
630  <table border="0" cellspacing="2" cellpadding="0">
631    <tr><td valign="top"></td><td valign="top"><em>ctx</em>&nbsp;</td><td>a verification context </td></tr>
632    <tr><td valign="top"></td><td valign="top"><em>boolean</em>&nbsp;</td><td>if non zero, allow proxy certificates. </td></tr>
633  </table>
634</dl>
635
636</div>
637</div><p>
638<a class="anchor" name="g7c301cedab40be9a495dea2778202140"></a><!-- doxytag: member="cert.c::hx509_verify_set_strict_rfc3280_verification" ref="g7c301cedab40be9a495dea2778202140" args="(hx509_verify_ctx ctx, int boolean)" -->
639<div class="memitem">
640<div class="memproto">
641      <table class="memname">
642        <tr>
643          <td class="memname">void hx509_verify_set_strict_rfc3280_verification           </td>
644          <td>(</td>
645          <td class="paramtype">hx509_verify_ctx&nbsp;</td>
646          <td class="paramname"> <em>ctx</em>, </td>
647        </tr>
648        <tr>
649          <td class="paramkey"></td>
650          <td></td>
651          <td class="paramtype">int&nbsp;</td>
652          <td class="paramname"> <em>boolean</em></td><td>&nbsp;</td>
653        </tr>
654        <tr>
655          <td></td>
656          <td>)</td>
657          <td></td><td></td><td></td>
658        </tr>
659      </table>
660</div>
661<div class="memdoc">
662
663<p>
664Select strict RFC3280 verification of certificiates. This means checking key usage on CA certificates, this will make version 1 certificiates unuseable.<p>
665<dl compact><dt><b>Parameters:</b></dt><dd>
666  <table border="0" cellspacing="2" cellpadding="0">
667    <tr><td valign="top"></td><td valign="top"><em>ctx</em>&nbsp;</td><td>a verification context </td></tr>
668    <tr><td valign="top"></td><td valign="top"><em>boolean</em>&nbsp;</td><td>if non zero, use strict verification. </td></tr>
669  </table>
670</dl>
671
672</div>
673</div><p>
674<a class="anchor" name="g1490c2944163f25cf02377bae5d0ab37"></a><!-- doxytag: member="cert.c::hx509_verify_set_time" ref="g1490c2944163f25cf02377bae5d0ab37" args="(hx509_verify_ctx ctx, time_t t)" -->
675<div class="memitem">
676<div class="memproto">
677      <table class="memname">
678        <tr>
679          <td class="memname">void hx509_verify_set_time           </td>
680          <td>(</td>
681          <td class="paramtype">hx509_verify_ctx&nbsp;</td>
682          <td class="paramname"> <em>ctx</em>, </td>
683        </tr>
684        <tr>
685          <td class="paramkey"></td>
686          <td></td>
687          <td class="paramtype">time_t&nbsp;</td>
688          <td class="paramname"> <em>t</em></td><td>&nbsp;</td>
689        </tr>
690        <tr>
691          <td></td>
692          <td>)</td>
693          <td></td><td></td><td></td>
694        </tr>
695      </table>
696</div>
697<div class="memdoc">
698
699<p>
700Set 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.<p>
701<dl compact><dt><b>Parameters:</b></dt><dd>
702  <table border="0" cellspacing="2" cellpadding="0">
703    <tr><td valign="top"></td><td valign="top"><em>ctx</em>&nbsp;</td><td>a verification context. </td></tr>
704    <tr><td valign="top"></td><td valign="top"><em>t</em>&nbsp;</td><td>the time the verifiation is using. </td></tr>
705  </table>
706</dl>
707
708</div>
709</div><p>
710</div>
711<hr size="1"><address style="text-align: right;"><small>
712Generated on Wed Jan 11 14:07:40 2012 for Heimdalx509library by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address>
713</body>
714</html>
715