Debian Codegraph @

doc/reference/html/gnutls-x509.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>x509: GnuTLS API Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
7 <link rel="home" href="index.html" title="GnuTLS API Reference Manual">
8 <link rel="up" href="intro.html" title="GnuTLS API Reference Manual">
9 <link rel="prev" href="gnutls-abstract.html" title="abstract">
10 <link rel="next" href="gnutls-openpgp.html" title="openpgp">
11 <meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18 <a href="#gnutls-x509.description" class="shortcut">Description</a></span>
19 </td>
20 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
21 <td><a accesskey="u" href="intro.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22 <td><a accesskey="p" href="gnutls-abstract.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="gnutls-openpgp.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
24 </tr></table>
25 <div class="refentry">
26 <a name="gnutls-x509"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
28 <td valign="top">
29 <h2><span class="refentrytitle"><a name="gnutls-x509.top_of_page"></a>x509</span></h2>
30 <p>x509</p>
31 </td>
32 <td class="gallery_image" valign="top" align="right"></td>
33 </tr></table></div>
34 <div class="refsect1">
35 <a name="gnutls-x509.functions"></a><h2>Functions</h2>
36 <div class="informaltable"><table class="informaltable" width="100%" border="0">
37 <colgroup>
38 <col width="150px" class="functions_proto_type">
39 <col class="functions_proto_name">
40 </colgroup>
41 <tbody>
42 <tr>
43 <td class="function_type">
44 <span class="returnvalue">int</span>
45 </td>
46 <td class="function_name">
47 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-init" title="gnutls_x509_crt_init ()">gnutls_x509_crt_init</a> <span class="c_punctuation">()</span>
48 </td>
49 </tr>
50 <tr>
51 <td class="function_type">
52 <span class="returnvalue">void</span>
53 </td>
54 <td class="function_name">
55 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-deinit" title="gnutls_x509_crt_deinit ()">gnutls_x509_crt_deinit</a> <span class="c_punctuation">()</span>
56 </td>
57 </tr>
58 <tr>
59 <td class="function_type">
60 <span class="returnvalue">void</span>
61 </td>
62 <td class="function_name">
63 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-flags" title="gnutls_x509_crt_set_flags ()">gnutls_x509_crt_set_flags</a> <span class="c_punctuation">()</span>
64 </td>
65 </tr>
66 <tr>
67 <td class="function_type">
68 <span class="returnvalue">unsigned</span>
69 </td>
70 <td class="function_name">
71 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-equals" title="gnutls_x509_crt_equals ()">gnutls_x509_crt_equals</a> <span class="c_punctuation">()</span>
72 </td>
73 </tr>
74 <tr>
75 <td class="function_type">
76 <span class="returnvalue">unsigned</span>
77 </td>
78 <td class="function_name">
79 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-equals2" title="gnutls_x509_crt_equals2 ()">gnutls_x509_crt_equals2</a> <span class="c_punctuation">()</span>
80 </td>
81 </tr>
82 <tr>
83 <td class="function_type">
84 <span class="returnvalue">int</span>
85 </td>
86 <td class="function_name">
87 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-import" title="gnutls_x509_crt_import ()">gnutls_x509_crt_import</a> <span class="c_punctuation">()</span>
88 </td>
89 </tr>
90 <tr>
91 <td class="function_type">
92 <span class="returnvalue">int</span>
93 </td>
94 <td class="function_name">
95 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-list-import2" title="gnutls_x509_crt_list_import2 ()">gnutls_x509_crt_list_import2</a> <span class="c_punctuation">()</span>
96 </td>
97 </tr>
98 <tr>
99 <td class="function_type">
100 <span class="returnvalue">int</span>
101 </td>
102 <td class="function_name">
103 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-list-import" title="gnutls_x509_crt_list_import ()">gnutls_x509_crt_list_import</a> <span class="c_punctuation">()</span>
104 </td>
105 </tr>
106 <tr>
107 <td class="function_type">
108 <span class="returnvalue">int</span>
109 </td>
110 <td class="function_name">
111 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-import-url" title="gnutls_x509_crt_import_url ()">gnutls_x509_crt_import_url</a> <span class="c_punctuation">()</span>
112 </td>
113 </tr>
114 <tr>
115 <td class="function_type">
116 <span class="returnvalue">int</span>
117 </td>
118 <td class="function_name">
119 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-list-import-url" title="gnutls_x509_crt_list_import_url ()">gnutls_x509_crt_list_import_url</a> <span class="c_punctuation">()</span>
120 </td>
121 </tr>
122 <tr>
123 <td class="function_type">
124 <span class="returnvalue">int</span>
125 </td>
126 <td class="function_name">
127 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-export" title="gnutls_x509_crt_export ()">gnutls_x509_crt_export</a> <span class="c_punctuation">()</span>
128 </td>
129 </tr>
130 <tr>
131 <td class="function_type">
132 <span class="returnvalue">int</span>
133 </td>
134 <td class="function_name">
135 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-export2" title="gnutls_x509_crt_export2 ()">gnutls_x509_crt_export2</a> <span class="c_punctuation">()</span>
136 </td>
137 </tr>
138 <tr>
139 <td class="function_type">
140 <span class="returnvalue">int</span>
141 </td>
142 <td class="function_name">
143 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-private-key-usage-period" title="gnutls_x509_crt_get_private_key_usage_period ()">gnutls_x509_crt_get_private_key_usage_period</a> <span class="c_punctuation">()</span>
144 </td>
145 </tr>
146 <tr>
147 <td class="function_type">
148 <span class="returnvalue">int</span>
149 </td>
150 <td class="function_name">
151 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-issuer-dn" title="gnutls_x509_crt_get_issuer_dn ()">gnutls_x509_crt_get_issuer_dn</a> <span class="c_punctuation">()</span>
152 </td>
153 </tr>
154 <tr>
155 <td class="function_type">
156 <span class="returnvalue">int</span>
157 </td>
158 <td class="function_name">
159 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-issuer-dn2" title="gnutls_x509_crt_get_issuer_dn2 ()">gnutls_x509_crt_get_issuer_dn2</a> <span class="c_punctuation">()</span>
160 </td>
161 </tr>
162 <tr>
163 <td class="function_type">
164 <span class="returnvalue">int</span>
165 </td>
166 <td class="function_name">
167 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-issuer-dn3" title="gnutls_x509_crt_get_issuer_dn3 ()">gnutls_x509_crt_get_issuer_dn3</a> <span class="c_punctuation">()</span>
168 </td>
169 </tr>
170 <tr>
171 <td class="function_type">
172 <span class="returnvalue">int</span>
173 </td>
174 <td class="function_name">
175 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-issuer-dn-oid" title="gnutls_x509_crt_get_issuer_dn_oid ()">gnutls_x509_crt_get_issuer_dn_oid</a> <span class="c_punctuation">()</span>
176 </td>
177 </tr>
178 <tr>
179 <td class="function_type">
180 <span class="returnvalue">int</span>
181 </td>
182 <td class="function_name">
183 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-issuer-dn-by-oid" title="gnutls_x509_crt_get_issuer_dn_by_oid ()">gnutls_x509_crt_get_issuer_dn_by_oid</a> <span class="c_punctuation">()</span>
184 </td>
185 </tr>
186 <tr>
187 <td class="function_type">
188 <span class="returnvalue">int</span>
189 </td>
190 <td class="function_name">
191 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-dn" title="gnutls_x509_crt_get_dn ()">gnutls_x509_crt_get_dn</a> <span class="c_punctuation">()</span>
192 </td>
193 </tr>
194 <tr>
195 <td class="function_type">
196 <span class="returnvalue">int</span>
197 </td>
198 <td class="function_name">
199 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-dn2" title="gnutls_x509_crt_get_dn2 ()">gnutls_x509_crt_get_dn2</a> <span class="c_punctuation">()</span>
200 </td>
201 </tr>
202 <tr>
203 <td class="function_type">
204 <span class="returnvalue">int</span>
205 </td>
206 <td class="function_name">
207 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-dn3" title="gnutls_x509_crt_get_dn3 ()">gnutls_x509_crt_get_dn3</a> <span class="c_punctuation">()</span>
208 </td>
209 </tr>
210 <tr>
211 <td class="function_type">
212 <span class="returnvalue">int</span>
213 </td>
214 <td class="function_name">
215 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-dn-oid" title="gnutls_x509_crt_get_dn_oid ()">gnutls_x509_crt_get_dn_oid</a> <span class="c_punctuation">()</span>
216 </td>
217 </tr>
218 <tr>
219 <td class="function_type">
220 <span class="returnvalue">int</span>
221 </td>
222 <td class="function_name">
223 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-dn-by-oid" title="gnutls_x509_crt_get_dn_by_oid ()">gnutls_x509_crt_get_dn_by_oid</a> <span class="c_punctuation">()</span>
224 </td>
225 </tr>
226 <tr>
227 <td class="function_type">
228 <span class="returnvalue">unsigned</span>
229 </td>
230 <td class="function_name">
231 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-check-hostname" title="gnutls_x509_crt_check_hostname ()">gnutls_x509_crt_check_hostname</a> <span class="c_punctuation">()</span>
232 </td>
233 </tr>
234 <tr>
235 <td class="function_type">
236 <span class="returnvalue">unsigned</span>
237 </td>
238 <td class="function_name">
239 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-check-hostname2" title="gnutls_x509_crt_check_hostname2 ()">gnutls_x509_crt_check_hostname2</a> <span class="c_punctuation">()</span>
240 </td>
241 </tr>
242 <tr>
243 <td class="function_type">
244 <span class="returnvalue">unsigned</span>
245 </td>
246 <td class="function_name">
247 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-check-email" title="gnutls_x509_crt_check_email ()">gnutls_x509_crt_check_email</a> <span class="c_punctuation">()</span>
248 </td>
249 </tr>
250 <tr>
251 <td class="function_type">
252 <span class="returnvalue">unsigned</span>
253 </td>
254 <td class="function_name">
255 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-check-ip" title="gnutls_x509_crt_check_ip ()">gnutls_x509_crt_check_ip</a> <span class="c_punctuation">()</span>
256 </td>
257 </tr>
258 <tr>
259 <td class="function_type">
260 <span class="returnvalue">int</span>
261 </td>
262 <td class="function_name">
263 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-signature-algorithm" title="gnutls_x509_crt_get_signature_algorithm ()">gnutls_x509_crt_get_signature_algorithm</a> <span class="c_punctuation">()</span>
264 </td>
265 </tr>
266 <tr>
267 <td class="function_type">
268 <span class="returnvalue">int</span>
269 </td>
270 <td class="function_name">
271 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-signature" title="gnutls_x509_crt_get_signature ()">gnutls_x509_crt_get_signature</a> <span class="c_punctuation">()</span>
272 </td>
273 </tr>
274 <tr>
275 <td class="function_type">
276 <span class="returnvalue">int</span>
277 </td>
278 <td class="function_name">
279 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-version" title="gnutls_x509_crt_get_version ()">gnutls_x509_crt_get_version</a> <span class="c_punctuation">()</span>
280 </td>
281 </tr>
282 <tr>
283 <td class="function_type">
284 <span class="returnvalue">int</span>
285 </td>
286 <td class="function_name">
287 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-pk-oid" title="gnutls_x509_crt_get_pk_oid ()">gnutls_x509_crt_get_pk_oid</a> <span class="c_punctuation">()</span>
288 </td>
289 </tr>
290 <tr>
291 <td class="function_type">
292 <span class="returnvalue">int</span>
293 </td>
294 <td class="function_name">
295 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-signature-oid" title="gnutls_x509_crt_get_signature_oid ()">gnutls_x509_crt_get_signature_oid</a> <span class="c_punctuation">()</span>
296 </td>
297 </tr>
298 <tr>
299 <td class="function_type">
300 <span class="returnvalue">int</span>
301 </td>
302 <td class="function_name">
303 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-key-id" title="gnutls_x509_crt_get_key_id ()">gnutls_x509_crt_get_key_id</a> <span class="c_punctuation">()</span>
304 </td>
305 </tr>
306 <tr>
307 <td class="function_type">
308 <span class="returnvalue">int</span>
309 </td>
310 <td class="function_name">
311 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-private-key-usage-period" title="gnutls_x509_crt_set_private_key_usage_period ()">gnutls_x509_crt_set_private_key_usage_period</a> <span class="c_punctuation">()</span>
312 </td>
313 </tr>
314 <tr>
315 <td class="function_type">
316 <span class="returnvalue">int</span>
317 </td>
318 <td class="function_name">
319 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-authority-key-id" title="gnutls_x509_crt_set_authority_key_id ()">gnutls_x509_crt_set_authority_key_id</a> <span class="c_punctuation">()</span>
320 </td>
321 </tr>
322 <tr>
323 <td class="function_type">
324 <span class="returnvalue">int</span>
325 </td>
326 <td class="function_name">
327 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-authority-key-id" title="gnutls_x509_crt_get_authority_key_id ()">gnutls_x509_crt_get_authority_key_id</a> <span class="c_punctuation">()</span>
328 </td>
329 </tr>
330 <tr>
331 <td class="function_type">
332 <span class="returnvalue">int</span>
333 </td>
334 <td class="function_name">
335 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-authority-key-gn-serial" title="gnutls_x509_crt_get_authority_key_gn_serial ()">gnutls_x509_crt_get_authority_key_gn_serial</a> <span class="c_punctuation">()</span>
336 </td>
337 </tr>
338 <tr>
339 <td class="function_type">
340 <span class="returnvalue">int</span>
341 </td>
342 <td class="function_name">
343 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-subject-key-id" title="gnutls_x509_crt_get_subject_key_id ()">gnutls_x509_crt_get_subject_key_id</a> <span class="c_punctuation">()</span>
344 </td>
345 </tr>
346 <tr>
347 <td class="function_type">
348 <span class="returnvalue">int</span>
349 </td>
350 <td class="function_name">
351 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-subject-unique-id" title="gnutls_x509_crt_get_subject_unique_id ()">gnutls_x509_crt_get_subject_unique_id</a> <span class="c_punctuation">()</span>
352 </td>
353 </tr>
354 <tr>
355 <td class="function_type">
356 <span class="returnvalue">int</span>
357 </td>
358 <td class="function_name">
359 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-issuer-unique-id" title="gnutls_x509_crt_get_issuer_unique_id ()">gnutls_x509_crt_get_issuer_unique_id</a> <span class="c_punctuation">()</span>
360 </td>
361 </tr>
362 <tr>
363 <td class="function_type">
364 <span class="returnvalue">void</span>
365 </td>
366 <td class="function_name">
367 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-pin-function" title="gnutls_x509_crt_set_pin_function ()">gnutls_x509_crt_set_pin_function</a> <span class="c_punctuation">()</span>
368 </td>
369 </tr>
370 <tr>
371 <td class="function_type">
372 <span class="returnvalue">int</span>
373 </td>
374 <td class="function_name">
375 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-authority-info-access" title="gnutls_x509_crt_get_authority_info_access ()">gnutls_x509_crt_get_authority_info_access</a> <span class="c_punctuation">()</span>
376 </td>
377 </tr>
378 <tr>
379 <td class="function_type">
380 <span class="returnvalue">unsigned</span>
381 </td>
382 <td class="function_name">
383 <a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-check" title="gnutls_x509_name_constraints_check ()">gnutls_x509_name_constraints_check</a> <span class="c_punctuation">()</span>
384 </td>
385 </tr>
386 <tr>
387 <td class="function_type">
388 <span class="returnvalue">unsigned</span>
389 </td>
390 <td class="function_name">
391 <a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-check-crt" title="gnutls_x509_name_constraints_check_crt ()">gnutls_x509_name_constraints_check_crt</a> <span class="c_punctuation">()</span>
392 </td>
393 </tr>
394 <tr>
395 <td class="function_type">
396 <span class="returnvalue">int</span>
397 </td>
398 <td class="function_name">
399 <a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-init" title="gnutls_x509_name_constraints_init ()">gnutls_x509_name_constraints_init</a> <span class="c_punctuation">()</span>
400 </td>
401 </tr>
402 <tr>
403 <td class="function_type">
404 <span class="returnvalue">void</span>
405 </td>
406 <td class="function_name">
407 <a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-deinit" title="gnutls_x509_name_constraints_deinit ()">gnutls_x509_name_constraints_deinit</a> <span class="c_punctuation">()</span>
408 </td>
409 </tr>
410 <tr>
411 <td class="function_type">
412 <span class="returnvalue">int</span>
413 </td>
414 <td class="function_name">
415 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-name-constraints" title="gnutls_x509_crt_get_name_constraints ()">gnutls_x509_crt_get_name_constraints</a> <span class="c_punctuation">()</span>
416 </td>
417 </tr>
418 <tr>
419 <td class="function_type">
420 <span class="returnvalue">int</span>
421 </td>
422 <td class="function_name">
423 <a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-add-permitted" title="gnutls_x509_name_constraints_add_permitted ()">gnutls_x509_name_constraints_add_permitted</a> <span class="c_punctuation">()</span>
424 </td>
425 </tr>
426 <tr>
427 <td class="function_type">
428 <span class="returnvalue">int</span>
429 </td>
430 <td class="function_name">
431 <a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-add-excluded" title="gnutls_x509_name_constraints_add_excluded ()">gnutls_x509_name_constraints_add_excluded</a> <span class="c_punctuation">()</span>
432 </td>
433 </tr>
434 <tr>
435 <td class="function_type">
436 <span class="returnvalue">int</span>
437 </td>
438 <td class="function_name">
439 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-name-constraints" title="gnutls_x509_crt_set_name_constraints ()">gnutls_x509_crt_set_name_constraints</a> <span class="c_punctuation">()</span>
440 </td>
441 </tr>
442 <tr>
443 <td class="function_type">
444 <span class="returnvalue">int</span>
445 </td>
446 <td class="function_name">
447 <a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-get-permitted" title="gnutls_x509_name_constraints_get_permitted ()">gnutls_x509_name_constraints_get_permitted</a> <span class="c_punctuation">()</span>
448 </td>
449 </tr>
450 <tr>
451 <td class="function_type">
452 <span class="returnvalue">int</span>
453 </td>
454 <td class="function_name">
455 <a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-get-excluded" title="gnutls_x509_name_constraints_get_excluded ()">gnutls_x509_name_constraints_get_excluded</a> <span class="c_punctuation">()</span>
456 </td>
457 </tr>
458 <tr>
459 <td class="function_type">
460 <span class="returnvalue">int</span>
461 </td>
462 <td class="function_name">
463 <a class="link" href="gnutls-x509.html#gnutls-x509-cidr-to-rfc5280" title="gnutls_x509_cidr_to_rfc5280 ()">gnutls_x509_cidr_to_rfc5280</a> <span class="c_punctuation">()</span>
464 </td>
465 </tr>
466 <tr>
467 <td class="function_type">
468 <span class="returnvalue">int</span>
469 </td>
470 <td class="function_name">
471 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-crl-dist-points" title="gnutls_x509_crt_get_crl_dist_points ()">gnutls_x509_crt_get_crl_dist_points</a> <span class="c_punctuation">()</span>
472 </td>
473 </tr>
474 <tr>
475 <td class="function_type">
476 <span class="returnvalue">int</span>
477 </td>
478 <td class="function_name">
479 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-crl-dist-points2" title="gnutls_x509_crt_set_crl_dist_points2 ()">gnutls_x509_crt_set_crl_dist_points2</a> <span class="c_punctuation">()</span>
480 </td>
481 </tr>
482 <tr>
483 <td class="function_type">
484 <span class="returnvalue">int</span>
485 </td>
486 <td class="function_name">
487 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-crl-dist-points" title="gnutls_x509_crt_set_crl_dist_points ()">gnutls_x509_crt_set_crl_dist_points</a> <span class="c_punctuation">()</span>
488 </td>
489 </tr>
490 <tr>
491 <td class="function_type">
492 <span class="returnvalue">int</span>
493 </td>
494 <td class="function_name">
495 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-cpy-crl-dist-points" title="gnutls_x509_crt_cpy_crl_dist_points ()">gnutls_x509_crt_cpy_crl_dist_points</a> <span class="c_punctuation">()</span>
496 </td>
497 </tr>
498 <tr>
499 <td class="function_type">
500 <span class="returnvalue">int</span>
501 </td>
502 <td class="function_name">
503 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-sign" title="gnutls_x509_crl_sign ()">gnutls_x509_crl_sign</a> <span class="c_punctuation">()</span>
504 </td>
505 </tr>
506 <tr>
507 <td class="function_type">
508 <span class="returnvalue">int</span>
509 </td>
510 <td class="function_name">
511 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-sign2" title="gnutls_x509_crl_sign2 ()">gnutls_x509_crl_sign2</a> <span class="c_punctuation">()</span>
512 </td>
513 </tr>
514 <tr>
515 <td class="function_type">
516 <span class="returnvalue">time_t</span>
517 </td>
518 <td class="function_name">
519 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-activation-time" title="gnutls_x509_crt_get_activation_time ()">gnutls_x509_crt_get_activation_time</a> <span class="c_punctuation">()</span>
520 </td>
521 </tr>
522 <tr>
523 <td class="function_type">
524 <span class="returnvalue">time_t</span>
525 </td>
526 <td class="function_name">
527 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-expiration-time" title="gnutls_x509_crt_get_expiration_time ()">gnutls_x509_crt_get_expiration_time</a> <span class="c_punctuation">()</span>
528 </td>
529 </tr>
530 <tr>
531 <td class="function_type">
532 <span class="returnvalue">int</span>
533 </td>
534 <td class="function_name">
535 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-serial" title="gnutls_x509_crt_get_serial ()">gnutls_x509_crt_get_serial</a> <span class="c_punctuation">()</span>
536 </td>
537 </tr>
538 <tr>
539 <td class="function_type">
540 <span class="returnvalue">int</span>
541 </td>
542 <td class="function_name">
543 <a class="link" href="gnutls-x509.html#gnutls-x509-spki-init" title="gnutls_x509_spki_init ()">gnutls_x509_spki_init</a> <span class="c_punctuation">()</span>
544 </td>
545 </tr>
546 <tr>
547 <td class="function_type">
548 <span class="returnvalue">void</span>
549 </td>
550 <td class="function_name">
551 <a class="link" href="gnutls-x509.html#gnutls-x509-spki-deinit" title="gnutls_x509_spki_deinit ()">gnutls_x509_spki_deinit</a> <span class="c_punctuation">()</span>
552 </td>
553 </tr>
554 <tr>
555 <td class="function_type">
556 <span class="returnvalue">int</span>
557 </td>
558 <td class="function_name">
559 <a class="link" href="gnutls-x509.html#gnutls-x509-spki-get-rsa-pss-params" title="gnutls_x509_spki_get_rsa_pss_params ()">gnutls_x509_spki_get_rsa_pss_params</a> <span class="c_punctuation">()</span>
560 </td>
561 </tr>
562 <tr>
563 <td class="function_type">
564 <span class="returnvalue">void</span>
565 </td>
566 <td class="function_name">
567 <a class="link" href="gnutls-x509.html#gnutls-x509-spki-set-rsa-pss-params" title="gnutls_x509_spki_set_rsa_pss_params ()">gnutls_x509_spki_set_rsa_pss_params</a> <span class="c_punctuation">()</span>
568 </td>
569 </tr>
570 <tr>
571 <td class="function_type">
572 <span class="returnvalue">int</span>
573 </td>
574 <td class="function_name">
575 <a class="link" href="gnutls-x509.html#gnutls-x509-spki-set-rsa-oaep-params" title="gnutls_x509_spki_set_rsa_oaep_params ()">gnutls_x509_spki_set_rsa_oaep_params</a> <span class="c_punctuation">()</span>
576 </td>
577 </tr>
578 <tr>
579 <td class="function_type">
580 <span class="returnvalue">int</span>
581 </td>
582 <td class="function_name">
583 <a class="link" href="gnutls-x509.html#gnutls-x509-spki-get-rsa-oaep-params" title="gnutls_x509_spki_get_rsa_oaep_params ()">gnutls_x509_spki_get_rsa_oaep_params</a> <span class="c_punctuation">()</span>
584 </td>
585 </tr>
586 <tr>
587 <td class="function_type">
588 <span class="returnvalue">int</span>
589 </td>
590 <td class="function_name">
591 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-pk-algorithm" title="gnutls_x509_crt_get_pk_algorithm ()">gnutls_x509_crt_get_pk_algorithm</a> <span class="c_punctuation">()</span>
592 </td>
593 </tr>
594 <tr>
595 <td class="function_type">
596 <span class="returnvalue">int</span>
597 </td>
598 <td class="function_name">
599 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-spki" title="gnutls_x509_crt_set_spki ()">gnutls_x509_crt_set_spki</a> <span class="c_punctuation">()</span>
600 </td>
601 </tr>
602 <tr>
603 <td class="function_type">
604 <span class="returnvalue">int</span>
605 </td>
606 <td class="function_name">
607 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-spki" title="gnutls_x509_crt_get_spki ()">gnutls_x509_crt_get_spki</a> <span class="c_punctuation">()</span>
608 </td>
609 </tr>
610 <tr>
611 <td class="function_type">
612 <span class="returnvalue">int</span>
613 </td>
614 <td class="function_name">
615 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-pk-rsa-raw" title="gnutls_x509_crt_get_pk_rsa_raw ()">gnutls_x509_crt_get_pk_rsa_raw</a> <span class="c_punctuation">()</span>
616 </td>
617 </tr>
618 <tr>
619 <td class="function_type">
620 <span class="returnvalue">int</span>
621 </td>
622 <td class="function_name">
623 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-pk-dsa-raw" title="gnutls_x509_crt_get_pk_dsa_raw ()">gnutls_x509_crt_get_pk_dsa_raw</a> <span class="c_punctuation">()</span>
624 </td>
625 </tr>
626 <tr>
627 <td class="function_type">
628 <span class="returnvalue">int</span>
629 </td>
630 <td class="function_name">
631 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-pk-ecc-raw" title="gnutls_x509_crt_get_pk_ecc_raw ()">gnutls_x509_crt_get_pk_ecc_raw</a> <span class="c_punctuation">()</span>
632 </td>
633 </tr>
634 <tr>
635 <td class="function_type">
636 <span class="returnvalue">int</span>
637 </td>
638 <td class="function_name">
639 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-pk-gost-raw" title="gnutls_x509_crt_get_pk_gost_raw ()">gnutls_x509_crt_get_pk_gost_raw</a> <span class="c_punctuation">()</span>
640 </td>
641 </tr>
642 <tr>
643 <td class="function_type">
644 <span class="returnvalue">int</span>
645 </td>
646 <td class="function_name">
647 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-subject-alt-name" title="gnutls_x509_crt_get_subject_alt_name ()">gnutls_x509_crt_get_subject_alt_name</a> <span class="c_punctuation">()</span>
648 </td>
649 </tr>
650 <tr>
651 <td class="function_type">
652 <span class="returnvalue">int</span>
653 </td>
654 <td class="function_name">
655 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-subject-alt-name2" title="gnutls_x509_crt_get_subject_alt_name2 ()">gnutls_x509_crt_get_subject_alt_name2</a> <span class="c_punctuation">()</span>
656 </td>
657 </tr>
658 <tr>
659 <td class="function_type">
660 <span class="returnvalue">int</span>
661 </td>
662 <td class="function_name">
663 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-subject-alt-othername-oid" title="gnutls_x509_crt_get_subject_alt_othername_oid ()">gnutls_x509_crt_get_subject_alt_othername_oid</a> <span class="c_punctuation">()</span>
664 </td>
665 </tr>
666 <tr>
667 <td class="function_type">
668 <span class="returnvalue">int</span>
669 </td>
670 <td class="function_name">
671 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-issuer-alt-name" title="gnutls_x509_crt_get_issuer_alt_name ()">gnutls_x509_crt_get_issuer_alt_name</a> <span class="c_punctuation">()</span>
672 </td>
673 </tr>
674 <tr>
675 <td class="function_type">
676 <span class="returnvalue">int</span>
677 </td>
678 <td class="function_name">
679 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-issuer-alt-name2" title="gnutls_x509_crt_get_issuer_alt_name2 ()">gnutls_x509_crt_get_issuer_alt_name2</a> <span class="c_punctuation">()</span>
680 </td>
681 </tr>
682 <tr>
683 <td class="function_type">
684 <span class="returnvalue">int</span>
685 </td>
686 <td class="function_name">
687 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-issuer-alt-othername-oid" title="gnutls_x509_crt_get_issuer_alt_othername_oid ()">gnutls_x509_crt_get_issuer_alt_othername_oid</a> <span class="c_punctuation">()</span>
688 </td>
689 </tr>
690 <tr>
691 <td class="function_type">
692 <span class="returnvalue">int</span>
693 </td>
694 <td class="function_name">
695 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-ca-status" title="gnutls_x509_crt_get_ca_status ()">gnutls_x509_crt_get_ca_status</a> <span class="c_punctuation">()</span>
696 </td>
697 </tr>
698 <tr>
699 <td class="function_type">
700 <span class="returnvalue">int</span>
701 </td>
702 <td class="function_name">
703 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-basic-constraints" title="gnutls_x509_crt_get_basic_constraints ()">gnutls_x509_crt_get_basic_constraints</a> <span class="c_punctuation">()</span>
704 </td>
705 </tr>
706 <tr>
707 <td class="function_type">
708 <span class="returnvalue">int</span>
709 </td>
710 <td class="function_name">
711 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-key-usage" title="gnutls_x509_crt_get_key_usage ()">gnutls_x509_crt_get_key_usage</a> <span class="c_punctuation">()</span>
712 </td>
713 </tr>
714 <tr>
715 <td class="function_type">
716 <span class="returnvalue">int</span>
717 </td>
718 <td class="function_name">
719 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-key-usage" title="gnutls_x509_crt_set_key_usage ()">gnutls_x509_crt_set_key_usage</a> <span class="c_punctuation">()</span>
720 </td>
721 </tr>
722 <tr>
723 <td class="function_type">
724 <span class="returnvalue">int</span>
725 </td>
726 <td class="function_name">
727 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-authority-info-access" title="gnutls_x509_crt_set_authority_info_access ()">gnutls_x509_crt_set_authority_info_access</a> <span class="c_punctuation">()</span>
728 </td>
729 </tr>
730 <tr>
731 <td class="function_type">
732 <span class="returnvalue">int</span>
733 </td>
734 <td class="function_name">
735 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-inhibit-anypolicy" title="gnutls_x509_crt_get_inhibit_anypolicy ()">gnutls_x509_crt_get_inhibit_anypolicy</a> <span class="c_punctuation">()</span>
736 </td>
737 </tr>
738 <tr>
739 <td class="function_type">
740 <span class="returnvalue">int</span>
741 </td>
742 <td class="function_name">
743 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-inhibit-anypolicy" title="gnutls_x509_crt_set_inhibit_anypolicy ()">gnutls_x509_crt_set_inhibit_anypolicy</a> <span class="c_punctuation">()</span>
744 </td>
745 </tr>
746 <tr>
747 <td class="function_type">
748 <span class="returnvalue">int</span>
749 </td>
750 <td class="function_name">
751 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-proxy" title="gnutls_x509_crt_get_proxy ()">gnutls_x509_crt_get_proxy</a> <span class="c_punctuation">()</span>
752 </td>
753 </tr>
754 <tr>
755 <td class="function_type">
756 <span class="returnvalue">int</span>
757 </td>
758 <td class="function_name">
759 <a class="link" href="gnutls-x509.html#gnutls-x509-tlsfeatures-init" title="gnutls_x509_tlsfeatures_init ()">gnutls_x509_tlsfeatures_init</a> <span class="c_punctuation">()</span>
760 </td>
761 </tr>
762 <tr>
763 <td class="function_type">
764 <span class="returnvalue">void</span>
765 </td>
766 <td class="function_name">
767 <a class="link" href="gnutls-x509.html#gnutls-x509-tlsfeatures-deinit" title="gnutls_x509_tlsfeatures_deinit ()">gnutls_x509_tlsfeatures_deinit</a> <span class="c_punctuation">()</span>
768 </td>
769 </tr>
770 <tr>
771 <td class="function_type">
772 <span class="returnvalue">int</span>
773 </td>
774 <td class="function_name">
775 <a class="link" href="gnutls-x509.html#gnutls-x509-tlsfeatures-get" title="gnutls_x509_tlsfeatures_get ()">gnutls_x509_tlsfeatures_get</a> <span class="c_punctuation">()</span>
776 </td>
777 </tr>
778 <tr>
779 <td class="function_type">
780 <span class="returnvalue">int</span>
781 </td>
782 <td class="function_name">
783 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-tlsfeatures" title="gnutls_x509_crt_set_tlsfeatures ()">gnutls_x509_crt_set_tlsfeatures</a> <span class="c_punctuation">()</span>
784 </td>
785 </tr>
786 <tr>
787 <td class="function_type">
788 <span class="returnvalue">int</span>
789 </td>
790 <td class="function_name">
791 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-tlsfeatures" title="gnutls_x509_crt_get_tlsfeatures ()">gnutls_x509_crt_get_tlsfeatures</a> <span class="c_punctuation">()</span>
792 </td>
793 </tr>
794 <tr>
795 <td class="function_type">
796 <span class="returnvalue">unsigned</span>
797 </td>
798 <td class="function_name">
799 <a class="link" href="gnutls-x509.html#gnutls-x509-tlsfeatures-check-crt" title="gnutls_x509_tlsfeatures_check_crt ()">gnutls_x509_tlsfeatures_check_crt</a> <span class="c_punctuation">()</span>
800 </td>
801 </tr>
802 <tr>
803 <td class="function_type">
804 <span class="returnvalue">void</span>
805 </td>
806 <td class="function_name">
807 <a class="link" href="gnutls-x509.html#gnutls-x509-policy-release" title="gnutls_x509_policy_release ()">gnutls_x509_policy_release</a> <span class="c_punctuation">()</span>
808 </td>
809 </tr>
810 <tr>
811 <td class="function_type">
812 <span class="returnvalue">int</span>
813 </td>
814 <td class="function_name">
815 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-policy" title="gnutls_x509_crt_get_policy ()">gnutls_x509_crt_get_policy</a> <span class="c_punctuation">()</span>
816 </td>
817 </tr>
818 <tr>
819 <td class="function_type">
820 <span class="returnvalue">int</span>
821 </td>
822 <td class="function_name">
823 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-policy" title="gnutls_x509_crt_set_policy ()">gnutls_x509_crt_set_policy</a> <span class="c_punctuation">()</span>
824 </td>
825 </tr>
826 <tr>
827 <td class="function_type">
828 <span class="returnvalue">int</span>
829 </td>
830 <td class="function_name">
831 <a class="link" href="gnutls-x509.html#gnutls-x509-dn-oid-known" title="gnutls_x509_dn_oid_known ()">gnutls_x509_dn_oid_known</a> <span class="c_punctuation">()</span>
832 </td>
833 </tr>
834 <tr>
835 <td class="function_type">const <span class="returnvalue">char</span> *
836 </td>
837 <td class="function_name">
838 <a class="link" href="gnutls-x509.html#gnutls-x509-dn-oid-name" title="gnutls_x509_dn_oid_name ()">gnutls_x509_dn_oid_name</a> <span class="c_punctuation">()</span>
839 </td>
840 </tr>
841 <tr>
842 <td class="function_type">
843 <span class="returnvalue">int</span>
844 </td>
845 <td class="function_name">
846 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-extension-oid" title="gnutls_x509_crt_get_extension_oid ()">gnutls_x509_crt_get_extension_oid</a> <span class="c_punctuation">()</span>
847 </td>
848 </tr>
849 <tr>
850 <td class="function_type">
851 <span class="returnvalue">int</span>
852 </td>
853 <td class="function_name">
854 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-extension-by-oid" title="gnutls_x509_crt_get_extension_by_oid ()">gnutls_x509_crt_get_extension_by_oid</a> <span class="c_punctuation">()</span>
855 </td>
856 </tr>
857 <tr>
858 <td class="function_type">
859 <span class="returnvalue">int</span>
860 </td>
861 <td class="function_name">
862 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-signature-algorithm" title="gnutls_x509_crq_get_signature_algorithm ()">gnutls_x509_crq_get_signature_algorithm</a> <span class="c_punctuation">()</span>
863 </td>
864 </tr>
865 <tr>
866 <td class="function_type">
867 <span class="returnvalue">int</span>
868 </td>
869 <td class="function_name">
870 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-extension-by-oid2" title="gnutls_x509_crq_get_extension_by_oid2 ()">gnutls_x509_crq_get_extension_by_oid2</a> <span class="c_punctuation">()</span>
871 </td>
872 </tr>
873 <tr>
874 <td class="function_type">
875 <span class="returnvalue">int</span>
876 </td>
877 <td class="function_name">
878 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-extension-info" title="gnutls_x509_crt_get_extension_info ()">gnutls_x509_crt_get_extension_info</a> <span class="c_punctuation">()</span>
879 </td>
880 </tr>
881 <tr>
882 <td class="function_type">
883 <span class="returnvalue">int</span>
884 </td>
885 <td class="function_name">
886 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-extension-data" title="gnutls_x509_crt_get_extension_data ()">gnutls_x509_crt_get_extension_data</a> <span class="c_punctuation">()</span>
887 </td>
888 </tr>
889 <tr>
890 <td class="function_type">
891 <span class="returnvalue">int</span>
892 </td>
893 <td class="function_name">
894 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-extension-data2" title="gnutls_x509_crt_get_extension_data2 ()">gnutls_x509_crt_get_extension_data2</a> <span class="c_punctuation">()</span>
895 </td>
896 </tr>
897 <tr>
898 <td class="function_type">
899 <span class="returnvalue">int</span>
900 </td>
901 <td class="function_name">
902 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-extension-by-oid" title="gnutls_x509_crt_set_extension_by_oid ()">gnutls_x509_crt_set_extension_by_oid</a> <span class="c_punctuation">()</span>
903 </td>
904 </tr>
905 <tr>
906 <td class="function_type">
907 <span class="returnvalue">int</span>
908 </td>
909 <td class="function_name">
910 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-dn" title="gnutls_x509_crt_set_dn ()">gnutls_x509_crt_set_dn</a> <span class="c_punctuation">()</span>
911 </td>
912 </tr>
913 <tr>
914 <td class="function_type">
915 <span class="returnvalue">int</span>
916 </td>
917 <td class="function_name">
918 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-dn-by-oid" title="gnutls_x509_crt_set_dn_by_oid ()">gnutls_x509_crt_set_dn_by_oid</a> <span class="c_punctuation">()</span>
919 </td>
920 </tr>
921 <tr>
922 <td class="function_type">
923 <span class="returnvalue">int</span>
924 </td>
925 <td class="function_name">
926 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-issuer-dn-by-oid" title="gnutls_x509_crt_set_issuer_dn_by_oid ()">gnutls_x509_crt_set_issuer_dn_by_oid</a> <span class="c_punctuation">()</span>
927 </td>
928 </tr>
929 <tr>
930 <td class="function_type">
931 <span class="returnvalue">int</span>
932 </td>
933 <td class="function_name">
934 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-issuer-dn" title="gnutls_x509_crt_set_issuer_dn ()">gnutls_x509_crt_set_issuer_dn</a> <span class="c_punctuation">()</span>
935 </td>
936 </tr>
937 <tr>
938 <td class="function_type">
939 <span class="returnvalue">int</span>
940 </td>
941 <td class="function_name">
942 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-version" title="gnutls_x509_crt_set_version ()">gnutls_x509_crt_set_version</a> <span class="c_punctuation">()</span>
943 </td>
944 </tr>
945 <tr>
946 <td class="function_type">
947 <span class="returnvalue">int</span>
948 </td>
949 <td class="function_name">
950 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-key" title="gnutls_x509_crt_set_key ()">gnutls_x509_crt_set_key</a> <span class="c_punctuation">()</span>
951 </td>
952 </tr>
953 <tr>
954 <td class="function_type">
955 <span class="returnvalue">int</span>
956 </td>
957 <td class="function_name">
958 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-ca-status" title="gnutls_x509_crt_set_ca_status ()">gnutls_x509_crt_set_ca_status</a> <span class="c_punctuation">()</span>
959 </td>
960 </tr>
961 <tr>
962 <td class="function_type">
963 <span class="returnvalue">int</span>
964 </td>
965 <td class="function_name">
966 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-basic-constraints" title="gnutls_x509_crt_set_basic_constraints ()">gnutls_x509_crt_set_basic_constraints</a> <span class="c_punctuation">()</span>
967 </td>
968 </tr>
969 <tr>
970 <td class="function_type">
971 <span class="returnvalue">int</span>
972 </td>
973 <td class="function_name">
974 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-subject-unique-id" title="gnutls_x509_crt_set_subject_unique_id ()">gnutls_x509_crt_set_subject_unique_id</a> <span class="c_punctuation">()</span>
975 </td>
976 </tr>
977 <tr>
978 <td class="function_type">
979 <span class="returnvalue">int</span>
980 </td>
981 <td class="function_name">
982 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-issuer-unique-id" title="gnutls_x509_crt_set_issuer_unique_id ()">gnutls_x509_crt_set_issuer_unique_id</a> <span class="c_punctuation">()</span>
983 </td>
984 </tr>
985 <tr>
986 <td class="function_type">
987 <span class="returnvalue">int</span>
988 </td>
989 <td class="function_name">
990 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-subject-alternative-name" title="gnutls_x509_crt_set_subject_alternative_name ()">gnutls_x509_crt_set_subject_alternative_name</a> <span class="c_punctuation">()</span>
991 </td>
992 </tr>
993 <tr>
994 <td class="function_type">
995 <span class="returnvalue">int</span>
996 </td>
997 <td class="function_name">
998 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-subject-alt-name" title="gnutls_x509_crt_set_subject_alt_name ()">gnutls_x509_crt_set_subject_alt_name</a> <span class="c_punctuation">()</span>
999 </td>
1000 </tr>
1001 <tr>
1002 <td class="function_type">
1003 <span class="returnvalue">int</span>
1004 </td>
1005 <td class="function_name">
1006 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-subject-alt-othername" title="gnutls_x509_crt_set_subject_alt_othername ()">gnutls_x509_crt_set_subject_alt_othername</a> <span class="c_punctuation">()</span>
1007 </td>
1008 </tr>
1009 <tr>
1010 <td class="function_type">
1011 <span class="returnvalue">int</span>
1012 </td>
1013 <td class="function_name">
1014 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-issuer-alt-name" title="gnutls_x509_crt_set_issuer_alt_name ()">gnutls_x509_crt_set_issuer_alt_name</a> <span class="c_punctuation">()</span>
1015 </td>
1016 </tr>
1017 <tr>
1018 <td class="function_type">
1019 <span class="returnvalue">int</span>
1020 </td>
1021 <td class="function_name">
1022 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-issuer-alt-othername" title="gnutls_x509_crt_set_issuer_alt_othername ()">gnutls_x509_crt_set_issuer_alt_othername</a> <span class="c_punctuation">()</span>
1023 </td>
1024 </tr>
1025 <tr>
1026 <td class="function_type">
1027 <span class="returnvalue">int</span>
1028 </td>
1029 <td class="function_name">
1030 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-sign" title="gnutls_x509_crt_sign ()">gnutls_x509_crt_sign</a> <span class="c_punctuation">()</span>
1031 </td>
1032 </tr>
1033 <tr>
1034 <td class="function_type">
1035 <span class="returnvalue">int</span>
1036 </td>
1037 <td class="function_name">
1038 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-sign2" title="gnutls_x509_crt_sign2 ()">gnutls_x509_crt_sign2</a> <span class="c_punctuation">()</span>
1039 </td>
1040 </tr>
1041 <tr>
1042 <td class="function_type">
1043 <span class="returnvalue">int</span>
1044 </td>
1045 <td class="function_name">
1046 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-activation-time" title="gnutls_x509_crt_set_activation_time ()">gnutls_x509_crt_set_activation_time</a> <span class="c_punctuation">()</span>
1047 </td>
1048 </tr>
1049 <tr>
1050 <td class="function_type">
1051 <span class="returnvalue">int</span>
1052 </td>
1053 <td class="function_name">
1054 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-expiration-time" title="gnutls_x509_crt_set_expiration_time ()">gnutls_x509_crt_set_expiration_time</a> <span class="c_punctuation">()</span>
1055 </td>
1056 </tr>
1057 <tr>
1058 <td class="function_type">
1059 <span class="returnvalue">int</span>
1060 </td>
1061 <td class="function_name">
1062 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-serial" title="gnutls_x509_crt_set_serial ()">gnutls_x509_crt_set_serial</a> <span class="c_punctuation">()</span>
1063 </td>
1064 </tr>
1065 <tr>
1066 <td class="function_type">
1067 <span class="returnvalue">int</span>
1068 </td>
1069 <td class="function_name">
1070 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-subject-key-id" title="gnutls_x509_crt_set_subject_key_id ()">gnutls_x509_crt_set_subject_key_id</a> <span class="c_punctuation">()</span>
1071 </td>
1072 </tr>
1073 <tr>
1074 <td class="function_type">
1075 <span class="returnvalue">int</span>
1076 </td>
1077 <td class="function_name">
1078 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-proxy-dn" title="gnutls_x509_crt_set_proxy_dn ()">gnutls_x509_crt_set_proxy_dn</a> <span class="c_punctuation">()</span>
1079 </td>
1080 </tr>
1081 <tr>
1082 <td class="function_type">
1083 <span class="returnvalue">int</span>
1084 </td>
1085 <td class="function_name">
1086 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-proxy" title="gnutls_x509_crt_set_proxy ()">gnutls_x509_crt_set_proxy</a> <span class="c_punctuation">()</span>
1087 </td>
1088 </tr>
1089 <tr>
1090 <td class="function_type">
1091 <span class="returnvalue">int</span>
1092 </td>
1093 <td class="function_name">
1094 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-print" title="gnutls_x509_crt_print ()">gnutls_x509_crt_print</a> <span class="c_punctuation">()</span>
1095 </td>
1096 </tr>
1097 <tr>
1098 <td class="function_type">
1099 <span class="returnvalue">int</span>
1100 </td>
1101 <td class="function_name">
1102 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-print" title="gnutls_x509_crl_print ()">gnutls_x509_crl_print</a> <span class="c_punctuation">()</span>
1103 </td>
1104 </tr>
1105 <tr>
1106 <td class="function_type">
1107 <span class="returnvalue">int</span>
1108 </td>
1109 <td class="function_name">
1110 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-raw-issuer-dn" title="gnutls_x509_crt_get_raw_issuer_dn ()">gnutls_x509_crt_get_raw_issuer_dn</a> <span class="c_punctuation">()</span>
1111 </td>
1112 </tr>
1113 <tr>
1114 <td class="function_type">
1115 <span class="returnvalue">int</span>
1116 </td>
1117 <td class="function_name">
1118 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-raw-dn" title="gnutls_x509_crt_get_raw_dn ()">gnutls_x509_crt_get_raw_dn</a> <span class="c_punctuation">()</span>
1119 </td>
1120 </tr>
1121 <tr>
1122 <td class="function_type">
1123 <span class="returnvalue">int</span>
1124 </td>
1125 <td class="function_name">
1126 <a class="link" href="gnutls-x509.html#gnutls-x509-rdn-get" title="gnutls_x509_rdn_get ()">gnutls_x509_rdn_get</a> <span class="c_punctuation">()</span>
1127 </td>
1128 </tr>
1129 <tr>
1130 <td class="function_type">
1131 <span class="returnvalue">int</span>
1132 </td>
1133 <td class="function_name">
1134 <a class="link" href="gnutls-x509.html#gnutls-x509-rdn-get2" title="gnutls_x509_rdn_get2 ()">gnutls_x509_rdn_get2</a> <span class="c_punctuation">()</span>
1135 </td>
1136 </tr>
1137 <tr>
1138 <td class="function_type">
1139 <span class="returnvalue">int</span>
1140 </td>
1141 <td class="function_name">
1142 <a class="link" href="gnutls-x509.html#gnutls-x509-rdn-get-oid" title="gnutls_x509_rdn_get_oid ()">gnutls_x509_rdn_get_oid</a> <span class="c_punctuation">()</span>
1143 </td>
1144 </tr>
1145 <tr>
1146 <td class="function_type">
1147 <span class="returnvalue">int</span>
1148 </td>
1149 <td class="function_name">
1150 <a class="link" href="gnutls-x509.html#gnutls-x509-rdn-get-by-oid" title="gnutls_x509_rdn_get_by_oid ()">gnutls_x509_rdn_get_by_oid</a> <span class="c_punctuation">()</span>
1151 </td>
1152 </tr>
1153 <tr>
1154 <td class="function_type">
1155 <span class="returnvalue">int</span>
1156 </td>
1157 <td class="function_name">
1158 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-subject" title="gnutls_x509_crt_get_subject ()">gnutls_x509_crt_get_subject</a> <span class="c_punctuation">()</span>
1159 </td>
1160 </tr>
1161 <tr>
1162 <td class="function_type">
1163 <span class="returnvalue">int</span>
1164 </td>
1165 <td class="function_name">
1166 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-issuer" title="gnutls_x509_crt_get_issuer ()">gnutls_x509_crt_get_issuer</a> <span class="c_punctuation">()</span>
1167 </td>
1168 </tr>
1169 <tr>
1170 <td class="function_type">
1171 <span class="returnvalue">int</span>
1172 </td>
1173 <td class="function_name">
1174 <a class="link" href="gnutls-x509.html#gnutls-x509-dn-get-rdn-ava" title="gnutls_x509_dn_get_rdn_ava ()">gnutls_x509_dn_get_rdn_ava</a> <span class="c_punctuation">()</span>
1175 </td>
1176 </tr>
1177 <tr>
1178 <td class="function_type">
1179 <span class="returnvalue">int</span>
1180 </td>
1181 <td class="function_name">
1182 <a class="link" href="gnutls-x509.html#gnutls-x509-dn-get-str" title="gnutls_x509_dn_get_str ()">gnutls_x509_dn_get_str</a> <span class="c_punctuation">()</span>
1183 </td>
1184 </tr>
1185 <tr>
1186 <td class="function_type">
1187 <span class="returnvalue">int</span>
1188 </td>
1189 <td class="function_name">
1190 <a class="link" href="gnutls-x509.html#gnutls-x509-dn-get-str2" title="gnutls_x509_dn_get_str2 ()">gnutls_x509_dn_get_str2</a> <span class="c_punctuation">()</span>
1191 </td>
1192 </tr>
1193 <tr>
1194 <td class="function_type">
1195 <span class="returnvalue">int</span>
1196 </td>
1197 <td class="function_name">
1198 <a class="link" href="gnutls-x509.html#gnutls-x509-dn-set-str" title="gnutls_x509_dn_set_str ()">gnutls_x509_dn_set_str</a> <span class="c_punctuation">()</span>
1199 </td>
1200 </tr>
1201 <tr>
1202 <td class="function_type">
1203 <span class="returnvalue">int</span>
1204 </td>
1205 <td class="function_name">
1206 <a class="link" href="gnutls-x509.html#gnutls-x509-dn-init" title="gnutls_x509_dn_init ()">gnutls_x509_dn_init</a> <span class="c_punctuation">()</span>
1207 </td>
1208 </tr>
1209 <tr>
1210 <td class="function_type">
1211 <span class="returnvalue">int</span>
1212 </td>
1213 <td class="function_name">
1214 <a class="link" href="gnutls-x509.html#gnutls-x509-dn-import" title="gnutls_x509_dn_import ()">gnutls_x509_dn_import</a> <span class="c_punctuation">()</span>
1215 </td>
1216 </tr>
1217 <tr>
1218 <td class="function_type">
1219 <span class="returnvalue">int</span>
1220 </td>
1221 <td class="function_name">
1222 <a class="link" href="gnutls-x509.html#gnutls-x509-dn-export" title="gnutls_x509_dn_export ()">gnutls_x509_dn_export</a> <span class="c_punctuation">()</span>
1223 </td>
1224 </tr>
1225 <tr>
1226 <td class="function_type">
1227 <span class="returnvalue">int</span>
1228 </td>
1229 <td class="function_name">
1230 <a class="link" href="gnutls-x509.html#gnutls-x509-dn-export2" title="gnutls_x509_dn_export2 ()">gnutls_x509_dn_export2</a> <span class="c_punctuation">()</span>
1231 </td>
1232 </tr>
1233 <tr>
1234 <td class="function_type">
1235 <span class="returnvalue">void</span>
1236 </td>
1237 <td class="function_name">
1238 <a class="link" href="gnutls-x509.html#gnutls-x509-dn-deinit" title="gnutls_x509_dn_deinit ()">gnutls_x509_dn_deinit</a> <span class="c_punctuation">()</span>
1239 </td>
1240 </tr>
1241 <tr>
1242 <td class="function_type">
1243 <span class="returnvalue">int</span>
1244 </td>
1245 <td class="function_name">
1246 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-init" title="gnutls_x509_crl_init ()">gnutls_x509_crl_init</a> <span class="c_punctuation">()</span>
1247 </td>
1248 </tr>
1249 <tr>
1250 <td class="function_type">
1251 <span class="returnvalue">void</span>
1252 </td>
1253 <td class="function_name">
1254 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-deinit" title="gnutls_x509_crl_deinit ()">gnutls_x509_crl_deinit</a> <span class="c_punctuation">()</span>
1255 </td>
1256 </tr>
1257 <tr>
1258 <td class="function_type">
1259 <span class="returnvalue">int</span>
1260 </td>
1261 <td class="function_name">
1262 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-import" title="gnutls_x509_crl_import ()">gnutls_x509_crl_import</a> <span class="c_punctuation">()</span>
1263 </td>
1264 </tr>
1265 <tr>
1266 <td class="function_type">
1267 <span class="returnvalue">int</span>
1268 </td>
1269 <td class="function_name">
1270 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-export" title="gnutls_x509_crl_export ()">gnutls_x509_crl_export</a> <span class="c_punctuation">()</span>
1271 </td>
1272 </tr>
1273 <tr>
1274 <td class="function_type">
1275 <span class="returnvalue">int</span>
1276 </td>
1277 <td class="function_name">
1278 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-export2" title="gnutls_x509_crl_export2 ()">gnutls_x509_crl_export2</a> <span class="c_punctuation">()</span>
1279 </td>
1280 </tr>
1281 <tr>
1282 <td class="function_type">
1283 <span class="returnvalue">int</span>
1284 </td>
1285 <td class="function_name">
1286 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-raw-issuer-dn" title="gnutls_x509_crl_get_raw_issuer_dn ()">gnutls_x509_crl_get_raw_issuer_dn</a> <span class="c_punctuation">()</span>
1287 </td>
1288 </tr>
1289 <tr>
1290 <td class="function_type">
1291 <span class="returnvalue">int</span>
1292 </td>
1293 <td class="function_name">
1294 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-issuer-dn" title="gnutls_x509_crl_get_issuer_dn ()">gnutls_x509_crl_get_issuer_dn</a> <span class="c_punctuation">()</span>
1295 </td>
1296 </tr>
1297 <tr>
1298 <td class="function_type">
1299 <span class="returnvalue">int</span>
1300 </td>
1301 <td class="function_name">
1302 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-issuer-dn2" title="gnutls_x509_crl_get_issuer_dn2 ()">gnutls_x509_crl_get_issuer_dn2</a> <span class="c_punctuation">()</span>
1303 </td>
1304 </tr>
1305 <tr>
1306 <td class="function_type">
1307 <span class="returnvalue">int</span>
1308 </td>
1309 <td class="function_name">
1310 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-issuer-dn3" title="gnutls_x509_crl_get_issuer_dn3 ()">gnutls_x509_crl_get_issuer_dn3</a> <span class="c_punctuation">()</span>
1311 </td>
1312 </tr>
1313 <tr>
1314 <td class="function_type">
1315 <span class="returnvalue">int</span>
1316 </td>
1317 <td class="function_name">
1318 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-issuer-dn-by-oid" title="gnutls_x509_crl_get_issuer_dn_by_oid ()">gnutls_x509_crl_get_issuer_dn_by_oid</a> <span class="c_punctuation">()</span>
1319 </td>
1320 </tr>
1321 <tr>
1322 <td class="function_type">
1323 <span class="returnvalue">int</span>
1324 </td>
1325 <td class="function_name">
1326 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-dn-oid" title="gnutls_x509_crl_get_dn_oid ()">gnutls_x509_crl_get_dn_oid</a> <span class="c_punctuation">()</span>
1327 </td>
1328 </tr>
1329 <tr>
1330 <td class="function_type">
1331 <span class="returnvalue">int</span>
1332 </td>
1333 <td class="function_name">
1334 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-signature-algorithm" title="gnutls_x509_crl_get_signature_algorithm ()">gnutls_x509_crl_get_signature_algorithm</a> <span class="c_punctuation">()</span>
1335 </td>
1336 </tr>
1337 <tr>
1338 <td class="function_type">
1339 <span class="returnvalue">int</span>
1340 </td>
1341 <td class="function_name">
1342 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-signature" title="gnutls_x509_crl_get_signature ()">gnutls_x509_crl_get_signature</a> <span class="c_punctuation">()</span>
1343 </td>
1344 </tr>
1345 <tr>
1346 <td class="function_type">
1347 <span class="returnvalue">int</span>
1348 </td>
1349 <td class="function_name">
1350 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-version" title="gnutls_x509_crl_get_version ()">gnutls_x509_crl_get_version</a> <span class="c_punctuation">()</span>
1351 </td>
1352 </tr>
1353 <tr>
1354 <td class="function_type">
1355 <span class="returnvalue">int</span>
1356 </td>
1357 <td class="function_name">
1358 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-signature-oid" title="gnutls_x509_crl_get_signature_oid ()">gnutls_x509_crl_get_signature_oid</a> <span class="c_punctuation">()</span>
1359 </td>
1360 </tr>
1361 <tr>
1362 <td class="function_type">
1363 <span class="returnvalue">time_t</span>
1364 </td>
1365 <td class="function_name">
1366 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-this-update" title="gnutls_x509_crl_get_this_update ()">gnutls_x509_crl_get_this_update</a> <span class="c_punctuation">()</span>
1367 </td>
1368 </tr>
1369 <tr>
1370 <td class="function_type">
1371 <span class="returnvalue">time_t</span>
1372 </td>
1373 <td class="function_name">
1374 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-next-update" title="gnutls_x509_crl_get_next_update ()">gnutls_x509_crl_get_next_update</a> <span class="c_punctuation">()</span>
1375 </td>
1376 </tr>
1377 <tr>
1378 <td class="function_type">
1379 <span class="returnvalue">int</span>
1380 </td>
1381 <td class="function_name">
1382 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-crt-count" title="gnutls_x509_crl_get_crt_count ()">gnutls_x509_crl_get_crt_count</a> <span class="c_punctuation">()</span>
1383 </td>
1384 </tr>
1385 <tr>
1386 <td class="function_type">
1387 <span class="returnvalue">int</span>
1388 </td>
1389 <td class="function_name">
1390 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-crt-serial" title="gnutls_x509_crl_get_crt_serial ()">gnutls_x509_crl_get_crt_serial</a> <span class="c_punctuation">()</span>
1391 </td>
1392 </tr>
1393 <tr>
1394 <td class="function_type">
1395 <span class="returnvalue">int</span>
1396 </td>
1397 <td class="function_name">
1398 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-iter-crt-serial" title="gnutls_x509_crl_iter_crt_serial ()">gnutls_x509_crl_iter_crt_serial</a> <span class="c_punctuation">()</span>
1399 </td>
1400 </tr>
1401 <tr>
1402 <td class="function_type">
1403 <span class="returnvalue">void</span>
1404 </td>
1405 <td class="function_name">
1406 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-iter-deinit" title="gnutls_x509_crl_iter_deinit ()">gnutls_x509_crl_iter_deinit</a> <span class="c_punctuation">()</span>
1407 </td>
1408 </tr>
1409 <tr>
1410 <td class="function_type">
1411 <span class="returnvalue">unsigned</span>
1412 </td>
1413 <td class="function_name">
1414 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-check-issuer" title="gnutls_x509_crl_check_issuer ()">gnutls_x509_crl_check_issuer</a> <span class="c_punctuation">()</span>
1415 </td>
1416 </tr>
1417 <tr>
1418 <td class="function_type">
1419 <span class="returnvalue">int</span>
1420 </td>
1421 <td class="function_name">
1422 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-list-import2" title="gnutls_x509_crl_list_import2 ()">gnutls_x509_crl_list_import2</a> <span class="c_punctuation">()</span>
1423 </td>
1424 </tr>
1425 <tr>
1426 <td class="function_type">
1427 <span class="returnvalue">int</span>
1428 </td>
1429 <td class="function_name">
1430 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-list-import" title="gnutls_x509_crl_list_import ()">gnutls_x509_crl_list_import</a> <span class="c_punctuation">()</span>
1431 </td>
1432 </tr>
1433 <tr>
1434 <td class="function_type">
1435 <span class="returnvalue">int</span>
1436 </td>
1437 <td class="function_name">
1438 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-set-version" title="gnutls_x509_crl_set_version ()">gnutls_x509_crl_set_version</a> <span class="c_punctuation">()</span>
1439 </td>
1440 </tr>
1441 <tr>
1442 <td class="function_type">
1443 <span class="returnvalue">int</span>
1444 </td>
1445 <td class="function_name">
1446 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-set-this-update" title="gnutls_x509_crl_set_this_update ()">gnutls_x509_crl_set_this_update</a> <span class="c_punctuation">()</span>
1447 </td>
1448 </tr>
1449 <tr>
1450 <td class="function_type">
1451 <span class="returnvalue">int</span>
1452 </td>
1453 <td class="function_name">
1454 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-set-next-update" title="gnutls_x509_crl_set_next_update ()">gnutls_x509_crl_set_next_update</a> <span class="c_punctuation">()</span>
1455 </td>
1456 </tr>
1457 <tr>
1458 <td class="function_type">
1459 <span class="returnvalue">int</span>
1460 </td>
1461 <td class="function_name">
1462 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-set-crt-serial" title="gnutls_x509_crl_set_crt_serial ()">gnutls_x509_crl_set_crt_serial</a> <span class="c_punctuation">()</span>
1463 </td>
1464 </tr>
1465 <tr>
1466 <td class="function_type">
1467 <span class="returnvalue">int</span>
1468 </td>
1469 <td class="function_name">
1470 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-set-crt" title="gnutls_x509_crl_set_crt ()">gnutls_x509_crl_set_crt</a> <span class="c_punctuation">()</span>
1471 </td>
1472 </tr>
1473 <tr>
1474 <td class="function_type">
1475 <span class="returnvalue">int</span>
1476 </td>
1477 <td class="function_name">
1478 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-authority-key-id" title="gnutls_x509_crl_get_authority_key_id ()">gnutls_x509_crl_get_authority_key_id</a> <span class="c_punctuation">()</span>
1479 </td>
1480 </tr>
1481 <tr>
1482 <td class="function_type">
1483 <span class="returnvalue">int</span>
1484 </td>
1485 <td class="function_name">
1486 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-authority-key-gn-serial" title="gnutls_x509_crl_get_authority_key_gn_serial ()">gnutls_x509_crl_get_authority_key_gn_serial</a> <span class="c_punctuation">()</span>
1487 </td>
1488 </tr>
1489 <tr>
1490 <td class="function_type">
1491 <span class="returnvalue">int</span>
1492 </td>
1493 <td class="function_name">
1494 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-number" title="gnutls_x509_crl_get_number ()">gnutls_x509_crl_get_number</a> <span class="c_punctuation">()</span>
1495 </td>
1496 </tr>
1497 <tr>
1498 <td class="function_type">
1499 <span class="returnvalue">int</span>
1500 </td>
1501 <td class="function_name">
1502 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-extension-oid" title="gnutls_x509_crl_get_extension_oid ()">gnutls_x509_crl_get_extension_oid</a> <span class="c_punctuation">()</span>
1503 </td>
1504 </tr>
1505 <tr>
1506 <td class="function_type">
1507 <span class="returnvalue">int</span>
1508 </td>
1509 <td class="function_name">
1510 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-extension-info" title="gnutls_x509_crl_get_extension_info ()">gnutls_x509_crl_get_extension_info</a> <span class="c_punctuation">()</span>
1511 </td>
1512 </tr>
1513 <tr>
1514 <td class="function_type">
1515 <span class="returnvalue">int</span>
1516 </td>
1517 <td class="function_name">
1518 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-extension-data" title="gnutls_x509_crl_get_extension_data ()">gnutls_x509_crl_get_extension_data</a> <span class="c_punctuation">()</span>
1519 </td>
1520 </tr>
1521 <tr>
1522 <td class="function_type">
1523 <span class="returnvalue">int</span>
1524 </td>
1525 <td class="function_name">
1526 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-extension-data2" title="gnutls_x509_crl_get_extension_data2 ()">gnutls_x509_crl_get_extension_data2</a> <span class="c_punctuation">()</span>
1527 </td>
1528 </tr>
1529 <tr>
1530 <td class="function_type">
1531 <span class="returnvalue">int</span>
1532 </td>
1533 <td class="function_name">
1534 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-set-authority-key-id" title="gnutls_x509_crl_set_authority_key_id ()">gnutls_x509_crl_set_authority_key_id</a> <span class="c_punctuation">()</span>
1535 </td>
1536 </tr>
1537 <tr>
1538 <td class="function_type">
1539 <span class="returnvalue">int</span>
1540 </td>
1541 <td class="function_name">
1542 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-set-number" title="gnutls_x509_crl_set_number ()">gnutls_x509_crl_set_number</a> <span class="c_punctuation">()</span>
1543 </td>
1544 </tr>
1545 <tr>
1546 <td class="define_keyword">#define</td>
1547 <td class="function_name">
1548 <a class="link" href="gnutls-x509.html#GNUTLS-PROFILE-TO-VFLAGS:CAPS" title="GNUTLS_PROFILE_TO_VFLAGS()">GNUTLS_PROFILE_TO_VFLAGS</a><span class="c_punctuation">()</span>
1549 </td>
1550 </tr>
1551 <tr>
1552 <td class="define_keyword">#define</td>
1553 <td class="function_name">
1554 <a class="link" href="gnutls-x509.html#GNUTLS-VFLAGS-TO-PROFILE:CAPS" title="GNUTLS_VFLAGS_TO_PROFILE()">GNUTLS_VFLAGS_TO_PROFILE</a><span class="c_punctuation">()</span>
1555 </td>
1556 </tr>
1557 <tr>
1558 <td class="function_type">const <span class="returnvalue">char</span> *
1559 </td>
1560 <td class="function_name">
1561 <a class="link" href="gnutls-x509.html#gnutls-certificate-verification-profile-get-name" title="gnutls_certificate_verification_profile_get_name ()">gnutls_certificate_verification_profile_get_name</a> <span class="c_punctuation">()</span>
1562 </td>
1563 </tr>
1564 <tr>
1565 <td class="function_type">
1566 <span class="returnvalue">int</span>
1567 </td>
1568 <td class="function_name">
1569 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-list-verify" title="gnutls_x509_crt_list_verify ()">gnutls_x509_crt_list_verify</a> <span class="c_punctuation">()</span>
1570 </td>
1571 </tr>
1572 <tr>
1573 <td class="function_type">
1574 <span class="returnvalue">int</span>
1575 </td>
1576 <td class="function_name">
1577 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-verify" title="gnutls_x509_crt_verify ()">gnutls_x509_crt_verify</a> <span class="c_punctuation">()</span>
1578 </td>
1579 </tr>
1580 <tr>
1581 <td class="function_type">
1582 <span class="returnvalue">int</span>
1583 </td>
1584 <td class="function_name">
1585 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-verify" title="gnutls_x509_crl_verify ()">gnutls_x509_crl_verify</a> <span class="c_punctuation">()</span>
1586 </td>
1587 </tr>
1588 <tr>
1589 <td class="function_type">
1590 <span class="returnvalue">int</span>
1591 </td>
1592 <td class="function_name">
1593 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-verify-data2" title="gnutls_x509_crt_verify_data2 ()">gnutls_x509_crt_verify_data2</a> <span class="c_punctuation">()</span>
1594 </td>
1595 </tr>
1596 <tr>
1597 <td class="function_type">
1598 <span class="returnvalue">int</span>
1599 </td>
1600 <td class="function_name">
1601 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-check-revocation" title="gnutls_x509_crt_check_revocation ()">gnutls_x509_crt_check_revocation</a> <span class="c_punctuation">()</span>
1602 </td>
1603 </tr>
1604 <tr>
1605 <td class="function_type">
1606 <span class="returnvalue">int</span>
1607 </td>
1608 <td class="function_name">
1609 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-fingerprint" title="gnutls_x509_crt_get_fingerprint ()">gnutls_x509_crt_get_fingerprint</a> <span class="c_punctuation">()</span>
1610 </td>
1611 </tr>
1612 <tr>
1613 <td class="function_type">
1614 <span class="returnvalue">int</span>
1615 </td>
1616 <td class="function_name">
1617 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-key-purpose-oid" title="gnutls_x509_crt_get_key_purpose_oid ()">gnutls_x509_crt_get_key_purpose_oid</a> <span class="c_punctuation">()</span>
1618 </td>
1619 </tr>
1620 <tr>
1621 <td class="function_type">
1622 <span class="returnvalue">int</span>
1623 </td>
1624 <td class="function_name">
1625 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-key-purpose-oid" title="gnutls_x509_crt_set_key_purpose_oid ()">gnutls_x509_crt_set_key_purpose_oid</a> <span class="c_punctuation">()</span>
1626 </td>
1627 </tr>
1628 <tr>
1629 <td class="function_type">
1630 <span class="returnvalue">unsigned</span>
1631 </td>
1632 <td class="function_name">
1633 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-check-key-purpose" title="gnutls_x509_crt_check_key_purpose ()">gnutls_x509_crt_check_key_purpose</a> <span class="c_punctuation">()</span>
1634 </td>
1635 </tr>
1636 <tr>
1637 <td class="define_keyword">#define</td>
1638 <td class="function_name">
1639 <a class="link" href="gnutls-x509.html#GNUTLS-PKCS-CIPHER-MASK:CAPS" title="GNUTLS_PKCS_CIPHER_MASK()">GNUTLS_PKCS_CIPHER_MASK</a><span class="c_punctuation">()</span>
1640 </td>
1641 </tr>
1642 <tr>
1643 <td class="function_type">const <span class="returnvalue">char</span> *
1644 </td>
1645 <td class="function_name">
1646 <a class="link" href="gnutls-x509.html#gnutls-pkcs-schema-get-name" title="gnutls_pkcs_schema_get_name ()">gnutls_pkcs_schema_get_name</a> <span class="c_punctuation">()</span>
1647 </td>
1648 </tr>
1649 <tr>
1650 <td class="function_type">const <span class="returnvalue">char</span> *
1651 </td>
1652 <td class="function_name">
1653 <a class="link" href="gnutls-x509.html#gnutls-pkcs-schema-get-oid" title="gnutls_pkcs_schema_get_oid ()">gnutls_pkcs_schema_get_oid</a> <span class="c_punctuation">()</span>
1654 </td>
1655 </tr>
1656 <tr>
1657 <td class="function_type">
1658 <span class="returnvalue">int</span>
1659 </td>
1660 <td class="function_name">
1661 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-init" title="gnutls_x509_privkey_init ()">gnutls_x509_privkey_init</a> <span class="c_punctuation">()</span>
1662 </td>
1663 </tr>
1664 <tr>
1665 <td class="function_type">
1666 <span class="returnvalue">void</span>
1667 </td>
1668 <td class="function_name">
1669 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-deinit" title="gnutls_x509_privkey_deinit ()">gnutls_x509_privkey_deinit</a> <span class="c_punctuation">()</span>
1670 </td>
1671 </tr>
1672 <tr>
1673 <td class="function_type">
1674 <a class="link" href="gnutls-gnutls.html#gnutls-sec-param-t" title="enum gnutls_sec_param_t"><span class="returnvalue">gnutls_sec_param_t</span></a>
1675 </td>
1676 <td class="function_name">
1677 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-sec-param" title="gnutls_x509_privkey_sec_param ()">gnutls_x509_privkey_sec_param</a> <span class="c_punctuation">()</span>
1678 </td>
1679 </tr>
1680 <tr>
1681 <td class="function_type">
1682 <span class="returnvalue">void</span>
1683 </td>
1684 <td class="function_name">
1685 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-set-pin-function" title="gnutls_x509_privkey_set_pin_function ()">gnutls_x509_privkey_set_pin_function</a> <span class="c_punctuation">()</span>
1686 </td>
1687 </tr>
1688 <tr>
1689 <td class="function_type">
1690 <span class="returnvalue">int</span>
1691 </td>
1692 <td class="function_name">
1693 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-cpy" title="gnutls_x509_privkey_cpy ()">gnutls_x509_privkey_cpy</a> <span class="c_punctuation">()</span>
1694 </td>
1695 </tr>
1696 <tr>
1697 <td class="function_type">
1698 <span class="returnvalue">int</span>
1699 </td>
1700 <td class="function_name">
1701 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-import" title="gnutls_x509_privkey_import ()">gnutls_x509_privkey_import</a> <span class="c_punctuation">()</span>
1702 </td>
1703 </tr>
1704 <tr>
1705 <td class="function_type">
1706 <span class="returnvalue">int</span>
1707 </td>
1708 <td class="function_name">
1709 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-import-pkcs8" title="gnutls_x509_privkey_import_pkcs8 ()">gnutls_x509_privkey_import_pkcs8</a> <span class="c_punctuation">()</span>
1710 </td>
1711 </tr>
1712 <tr>
1713 <td class="function_type">
1714 <span class="returnvalue">int</span>
1715 </td>
1716 <td class="function_name">
1717 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-import-openssl" title="gnutls_x509_privkey_import_openssl ()">gnutls_x509_privkey_import_openssl</a> <span class="c_punctuation">()</span>
1718 </td>
1719 </tr>
1720 <tr>
1721 <td class="function_type">
1722 <span class="returnvalue">int</span>
1723 </td>
1724 <td class="function_name">
1725 <a class="link" href="gnutls-x509.html#gnutls-pkcs8-info" title="gnutls_pkcs8_info ()">gnutls_pkcs8_info</a> <span class="c_punctuation">()</span>
1726 </td>
1727 </tr>
1728 <tr>
1729 <td class="function_type">
1730 <span class="returnvalue">int</span>
1731 </td>
1732 <td class="function_name">
1733 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-import2" title="gnutls_x509_privkey_import2 ()">gnutls_x509_privkey_import2</a> <span class="c_punctuation">()</span>
1734 </td>
1735 </tr>
1736 <tr>
1737 <td class="function_type">
1738 <span class="returnvalue">int</span>
1739 </td>
1740 <td class="function_name">
1741 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-import-rsa-raw" title="gnutls_x509_privkey_import_rsa_raw ()">gnutls_x509_privkey_import_rsa_raw</a> <span class="c_punctuation">()</span>
1742 </td>
1743 </tr>
1744 <tr>
1745 <td class="function_type">
1746 <span class="returnvalue">int</span>
1747 </td>
1748 <td class="function_name">
1749 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-import-rsa-raw2" title="gnutls_x509_privkey_import_rsa_raw2 ()">gnutls_x509_privkey_import_rsa_raw2</a> <span class="c_punctuation">()</span>
1750 </td>
1751 </tr>
1752 <tr>
1753 <td class="function_type">
1754 <span class="returnvalue">int</span>
1755 </td>
1756 <td class="function_name">
1757 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-import-ecc-raw" title="gnutls_x509_privkey_import_ecc_raw ()">gnutls_x509_privkey_import_ecc_raw</a> <span class="c_punctuation">()</span>
1758 </td>
1759 </tr>
1760 <tr>
1761 <td class="function_type">
1762 <span class="returnvalue">int</span>
1763 </td>
1764 <td class="function_name">
1765 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-import-gost-raw" title="gnutls_x509_privkey_import_gost_raw ()">gnutls_x509_privkey_import_gost_raw</a> <span class="c_punctuation">()</span>
1766 </td>
1767 </tr>
1768 <tr>
1769 <td class="function_type">
1770 <span class="returnvalue">int</span>
1771 </td>
1772 <td class="function_name">
1773 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-fix" title="gnutls_x509_privkey_fix ()">gnutls_x509_privkey_fix</a> <span class="c_punctuation">()</span>
1774 </td>
1775 </tr>
1776 <tr>
1777 <td class="function_type">
1778 <span class="returnvalue">int</span>
1779 </td>
1780 <td class="function_name">
1781 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-export-dsa-raw" title="gnutls_x509_privkey_export_dsa_raw ()">gnutls_x509_privkey_export_dsa_raw</a> <span class="c_punctuation">()</span>
1782 </td>
1783 </tr>
1784 <tr>
1785 <td class="function_type">
1786 <span class="returnvalue">int</span>
1787 </td>
1788 <td class="function_name">
1789 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-import-dsa-raw" title="gnutls_x509_privkey_import_dsa_raw ()">gnutls_x509_privkey_import_dsa_raw</a> <span class="c_punctuation">()</span>
1790 </td>
1791 </tr>
1792 <tr>
1793 <td class="function_type">
1794 <span class="returnvalue">int</span>
1795 </td>
1796 <td class="function_name">
1797 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-import-dh-raw" title="gnutls_x509_privkey_import_dh_raw ()">gnutls_x509_privkey_import_dh_raw</a> <span class="c_punctuation">()</span>
1798 </td>
1799 </tr>
1800 <tr>
1801 <td class="function_type">
1802 <span class="returnvalue">int</span>
1803 </td>
1804 <td class="function_name">
1805 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-get-pk-algorithm" title="gnutls_x509_privkey_get_pk_algorithm ()">gnutls_x509_privkey_get_pk_algorithm</a> <span class="c_punctuation">()</span>
1806 </td>
1807 </tr>
1808 <tr>
1809 <td class="function_type">
1810 <span class="returnvalue">int</span>
1811 </td>
1812 <td class="function_name">
1813 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-get-pk-algorithm2" title="gnutls_x509_privkey_get_pk_algorithm2 ()">gnutls_x509_privkey_get_pk_algorithm2</a> <span class="c_punctuation">()</span>
1814 </td>
1815 </tr>
1816 <tr>
1817 <td class="function_type">
1818 <span class="returnvalue">int</span>
1819 </td>
1820 <td class="function_name">
1821 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-get-spki" title="gnutls_x509_privkey_get_spki ()">gnutls_x509_privkey_get_spki</a> <span class="c_punctuation">()</span>
1822 </td>
1823 </tr>
1824 <tr>
1825 <td class="function_type">
1826 <span class="returnvalue">int</span>
1827 </td>
1828 <td class="function_name">
1829 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-set-spki" title="gnutls_x509_privkey_set_spki ()">gnutls_x509_privkey_set_spki</a> <span class="c_punctuation">()</span>
1830 </td>
1831 </tr>
1832 <tr>
1833 <td class="function_type">
1834 <span class="returnvalue">int</span>
1835 </td>
1836 <td class="function_name">
1837 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-get-key-id" title="gnutls_x509_privkey_get_key_id ()">gnutls_x509_privkey_get_key_id</a> <span class="c_punctuation">()</span>
1838 </td>
1839 </tr>
1840 <tr>
1841 <td class="function_type">
1842 <span class="returnvalue">int</span>
1843 </td>
1844 <td class="function_name">
1845 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-generate" title="gnutls_x509_privkey_generate ()">gnutls_x509_privkey_generate</a> <span class="c_punctuation">()</span>
1846 </td>
1847 </tr>
1848 <tr>
1849 <td class="function_type">
1850 <span class="returnvalue">void</span>
1851 </td>
1852 <td class="function_name">
1853 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-set-flags" title="gnutls_x509_privkey_set_flags ()">gnutls_x509_privkey_set_flags</a> <span class="c_punctuation">()</span>
1854 </td>
1855 </tr>
1856 <tr>
1857 <td class="function_type">
1858 <span class="returnvalue">int</span>
1859 </td>
1860 <td class="function_name">
1861 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-generate2" title="gnutls_x509_privkey_generate2 ()">gnutls_x509_privkey_generate2</a> <span class="c_punctuation">()</span>
1862 </td>
1863 </tr>
1864 <tr>
1865 <td class="function_type">
1866 <span class="returnvalue">int</span>
1867 </td>
1868 <td class="function_name">
1869 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-verify-seed" title="gnutls_x509_privkey_verify_seed ()">gnutls_x509_privkey_verify_seed</a> <span class="c_punctuation">()</span>
1870 </td>
1871 </tr>
1872 <tr>
1873 <td class="function_type">
1874 <span class="returnvalue">int</span>
1875 </td>
1876 <td class="function_name">
1877 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-get-seed" title="gnutls_x509_privkey_get_seed ()">gnutls_x509_privkey_get_seed</a> <span class="c_punctuation">()</span>
1878 </td>
1879 </tr>
1880 <tr>
1881 <td class="function_type">
1882 <span class="returnvalue">int</span>
1883 </td>
1884 <td class="function_name">
1885 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-verify-params" title="gnutls_x509_privkey_verify_params ()">gnutls_x509_privkey_verify_params</a> <span class="c_punctuation">()</span>
1886 </td>
1887 </tr>
1888 <tr>
1889 <td class="function_type">
1890 <span class="returnvalue">int</span>
1891 </td>
1892 <td class="function_name">
1893 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-export" title="gnutls_x509_privkey_export ()">gnutls_x509_privkey_export</a> <span class="c_punctuation">()</span>
1894 </td>
1895 </tr>
1896 <tr>
1897 <td class="function_type">
1898 <span class="returnvalue">int</span>
1899 </td>
1900 <td class="function_name">
1901 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-export2" title="gnutls_x509_privkey_export2 ()">gnutls_x509_privkey_export2</a> <span class="c_punctuation">()</span>
1902 </td>
1903 </tr>
1904 <tr>
1905 <td class="function_type">
1906 <span class="returnvalue">int</span>
1907 </td>
1908 <td class="function_name">
1909 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-export-pkcs8" title="gnutls_x509_privkey_export_pkcs8 ()">gnutls_x509_privkey_export_pkcs8</a> <span class="c_punctuation">()</span>
1910 </td>
1911 </tr>
1912 <tr>
1913 <td class="function_type">
1914 <span class="returnvalue">int</span>
1915 </td>
1916 <td class="function_name">
1917 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-export2-pkcs8" title="gnutls_x509_privkey_export2_pkcs8 ()">gnutls_x509_privkey_export2_pkcs8</a> <span class="c_punctuation">()</span>
1918 </td>
1919 </tr>
1920 <tr>
1921 <td class="function_type">
1922 <span class="returnvalue">int</span>
1923 </td>
1924 <td class="function_name">
1925 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-export-rsa-raw2" title="gnutls_x509_privkey_export_rsa_raw2 ()">gnutls_x509_privkey_export_rsa_raw2</a> <span class="c_punctuation">()</span>
1926 </td>
1927 </tr>
1928 <tr>
1929 <td class="function_type">
1930 <span class="returnvalue">int</span>
1931 </td>
1932 <td class="function_name">
1933 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-export-rsa-raw" title="gnutls_x509_privkey_export_rsa_raw ()">gnutls_x509_privkey_export_rsa_raw</a> <span class="c_punctuation">()</span>
1934 </td>
1935 </tr>
1936 <tr>
1937 <td class="function_type">
1938 <span class="returnvalue">int</span>
1939 </td>
1940 <td class="function_name">
1941 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-export-ecc-raw" title="gnutls_x509_privkey_export_ecc_raw ()">gnutls_x509_privkey_export_ecc_raw</a> <span class="c_punctuation">()</span>
1942 </td>
1943 </tr>
1944 <tr>
1945 <td class="function_type">
1946 <span class="returnvalue">int</span>
1947 </td>
1948 <td class="function_name">
1949 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-export-gost-raw" title="gnutls_x509_privkey_export_gost_raw ()">gnutls_x509_privkey_export_gost_raw</a> <span class="c_punctuation">()</span>
1950 </td>
1951 </tr>
1952 <tr>
1953 <td class="function_type">
1954 <span class="returnvalue">int</span>
1955 </td>
1956 <td class="function_name">
1957 <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-sign-data" title="gnutls_x509_privkey_sign_data ()">gnutls_x509_privkey_sign_data</a> <span class="c_punctuation">()</span>
1958 </td>
1959 </tr>
1960 <tr>
1961 <td class="function_type">
1962 <span class="returnvalue">int</span>
1963 </td>
1964 <td class="function_name">
1965 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-sign" title="gnutls_x509_crq_sign ()">gnutls_x509_crq_sign</a> <span class="c_punctuation">()</span>
1966 </td>
1967 </tr>
1968 <tr>
1969 <td class="function_type">
1970 <span class="returnvalue">int</span>
1971 </td>
1972 <td class="function_name">
1973 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-sign2" title="gnutls_x509_crq_sign2 ()">gnutls_x509_crq_sign2</a> <span class="c_punctuation">()</span>
1974 </td>
1975 </tr>
1976 <tr>
1977 <td class="function_type">
1978 <span class="returnvalue">int</span>
1979 </td>
1980 <td class="function_name">
1981 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-print" title="gnutls_x509_crq_print ()">gnutls_x509_crq_print</a> <span class="c_punctuation">()</span>
1982 </td>
1983 </tr>
1984 <tr>
1985 <td class="function_type">
1986 <span class="returnvalue">int</span>
1987 </td>
1988 <td class="function_name">
1989 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-verify" title="gnutls_x509_crq_verify ()">gnutls_x509_crq_verify</a> <span class="c_punctuation">()</span>
1990 </td>
1991 </tr>
1992 <tr>
1993 <td class="function_type">
1994 <span class="returnvalue">int</span>
1995 </td>
1996 <td class="function_name">
1997 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-init" title="gnutls_x509_crq_init ()">gnutls_x509_crq_init</a> <span class="c_punctuation">()</span>
1998 </td>
1999 </tr>
2000 <tr>
2001 <td class="function_type">
2002 <span class="returnvalue">void</span>
2003 </td>
2004 <td class="function_name">
2005 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-deinit" title="gnutls_x509_crq_deinit ()">gnutls_x509_crq_deinit</a> <span class="c_punctuation">()</span>
2006 </td>
2007 </tr>
2008 <tr>
2009 <td class="function_type">
2010 <span class="returnvalue">int</span>
2011 </td>
2012 <td class="function_name">
2013 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-import" title="gnutls_x509_crq_import ()">gnutls_x509_crq_import</a> <span class="c_punctuation">()</span>
2014 </td>
2015 </tr>
2016 <tr>
2017 <td class="function_type">
2018 <span class="returnvalue">int</span>
2019 </td>
2020 <td class="function_name">
2021 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-private-key-usage-period" title="gnutls_x509_crq_get_private_key_usage_period ()">gnutls_x509_crq_get_private_key_usage_period</a> <span class="c_punctuation">()</span>
2022 </td>
2023 </tr>
2024 <tr>
2025 <td class="function_type">
2026 <span class="returnvalue">int</span>
2027 </td>
2028 <td class="function_name">
2029 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-dn" title="gnutls_x509_crq_get_dn ()">gnutls_x509_crq_get_dn</a> <span class="c_punctuation">()</span>
2030 </td>
2031 </tr>
2032 <tr>
2033 <td class="function_type">
2034 <span class="returnvalue">int</span>
2035 </td>
2036 <td class="function_name">
2037 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-dn2" title="gnutls_x509_crq_get_dn2 ()">gnutls_x509_crq_get_dn2</a> <span class="c_punctuation">()</span>
2038 </td>
2039 </tr>
2040 <tr>
2041 <td class="function_type">
2042 <span class="returnvalue">int</span>
2043 </td>
2044 <td class="function_name">
2045 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-dn3" title="gnutls_x509_crq_get_dn3 ()">gnutls_x509_crq_get_dn3</a> <span class="c_punctuation">()</span>
2046 </td>
2047 </tr>
2048 <tr>
2049 <td class="function_type">
2050 <span class="returnvalue">int</span>
2051 </td>
2052 <td class="function_name">
2053 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-dn-oid" title="gnutls_x509_crq_get_dn_oid ()">gnutls_x509_crq_get_dn_oid</a> <span class="c_punctuation">()</span>
2054 </td>
2055 </tr>
2056 <tr>
2057 <td class="function_type">
2058 <span class="returnvalue">int</span>
2059 </td>
2060 <td class="function_name">
2061 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-dn-by-oid" title="gnutls_x509_crq_get_dn_by_oid ()">gnutls_x509_crq_get_dn_by_oid</a> <span class="c_punctuation">()</span>
2062 </td>
2063 </tr>
2064 <tr>
2065 <td class="function_type">
2066 <span class="returnvalue">int</span>
2067 </td>
2068 <td class="function_name">
2069 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-dn" title="gnutls_x509_crq_set_dn ()">gnutls_x509_crq_set_dn</a> <span class="c_punctuation">()</span>
2070 </td>
2071 </tr>
2072 <tr>
2073 <td class="function_type">
2074 <span class="returnvalue">int</span>
2075 </td>
2076 <td class="function_name">
2077 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-dn-by-oid" title="gnutls_x509_crq_set_dn_by_oid ()">gnutls_x509_crq_set_dn_by_oid</a> <span class="c_punctuation">()</span>
2078 </td>
2079 </tr>
2080 <tr>
2081 <td class="function_type">
2082 <span class="returnvalue">int</span>
2083 </td>
2084 <td class="function_name">
2085 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-version" title="gnutls_x509_crq_set_version ()">gnutls_x509_crq_set_version</a> <span class="c_punctuation">()</span>
2086 </td>
2087 </tr>
2088 <tr>
2089 <td class="function_type">
2090 <span class="returnvalue">int</span>
2091 </td>
2092 <td class="function_name">
2093 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-version" title="gnutls_x509_crq_get_version ()">gnutls_x509_crq_get_version</a> <span class="c_punctuation">()</span>
2094 </td>
2095 </tr>
2096 <tr>
2097 <td class="function_type">
2098 <span class="returnvalue">int</span>
2099 </td>
2100 <td class="function_name">
2101 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-key" title="gnutls_x509_crq_set_key ()">gnutls_x509_crq_set_key</a> <span class="c_punctuation">()</span>
2102 </td>
2103 </tr>
2104 <tr>
2105 <td class="function_type">
2106 <span class="returnvalue">int</span>
2107 </td>
2108 <td class="function_name">
2109 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-extension-by-oid" title="gnutls_x509_crq_set_extension_by_oid ()">gnutls_x509_crq_set_extension_by_oid</a> <span class="c_punctuation">()</span>
2110 </td>
2111 </tr>
2112 <tr>
2113 <td class="function_type">
2114 <span class="returnvalue">int</span>
2115 </td>
2116 <td class="function_name">
2117 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-challenge-password" title="gnutls_x509_crq_set_challenge_password ()">gnutls_x509_crq_set_challenge_password</a> <span class="c_punctuation">()</span>
2118 </td>
2119 </tr>
2120 <tr>
2121 <td class="function_type">
2122 <span class="returnvalue">int</span>
2123 </td>
2124 <td class="function_name">
2125 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-challenge-password" title="gnutls_x509_crq_get_challenge_password ()">gnutls_x509_crq_get_challenge_password</a> <span class="c_punctuation">()</span>
2126 </td>
2127 </tr>
2128 <tr>
2129 <td class="function_type">
2130 <span class="returnvalue">int</span>
2131 </td>
2132 <td class="function_name">
2133 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-attribute-by-oid" title="gnutls_x509_crq_set_attribute_by_oid ()">gnutls_x509_crq_set_attribute_by_oid</a> <span class="c_punctuation">()</span>
2134 </td>
2135 </tr>
2136 <tr>
2137 <td class="function_type">
2138 <span class="returnvalue">int</span>
2139 </td>
2140 <td class="function_name">
2141 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-attribute-by-oid" title="gnutls_x509_crq_get_attribute_by_oid ()">gnutls_x509_crq_get_attribute_by_oid</a> <span class="c_punctuation">()</span>
2142 </td>
2143 </tr>
2144 <tr>
2145 <td class="function_type">
2146 <span class="returnvalue">int</span>
2147 </td>
2148 <td class="function_name">
2149 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-export" title="gnutls_x509_crq_export ()">gnutls_x509_crq_export</a> <span class="c_punctuation">()</span>
2150 </td>
2151 </tr>
2152 <tr>
2153 <td class="function_type">
2154 <span class="returnvalue">int</span>
2155 </td>
2156 <td class="function_name">
2157 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-export2" title="gnutls_x509_crq_export2 ()">gnutls_x509_crq_export2</a> <span class="c_punctuation">()</span>
2158 </td>
2159 </tr>
2160 <tr>
2161 <td class="function_type">
2162 <span class="returnvalue">int</span>
2163 </td>
2164 <td class="function_name">
2165 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-crq" title="gnutls_x509_crt_set_crq ()">gnutls_x509_crt_set_crq</a> <span class="c_punctuation">()</span>
2166 </td>
2167 </tr>
2168 <tr>
2169 <td class="function_type">
2170 <span class="returnvalue">int</span>
2171 </td>
2172 <td class="function_name">
2173 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-crq-extensions" title="gnutls_x509_crt_set_crq_extensions ()">gnutls_x509_crt_set_crq_extensions</a> <span class="c_punctuation">()</span>
2174 </td>
2175 </tr>
2176 <tr>
2177 <td class="function_type">
2178 <span class="returnvalue">int</span>
2179 </td>
2180 <td class="function_name">
2181 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-crq-extension-by-oid" title="gnutls_x509_crt_set_crq_extension_by_oid ()">gnutls_x509_crt_set_crq_extension_by_oid</a> <span class="c_punctuation">()</span>
2182 </td>
2183 </tr>
2184 <tr>
2185 <td class="function_type">
2186 <span class="returnvalue">int</span>
2187 </td>
2188 <td class="function_name">
2189 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-private-key-usage-period" title="gnutls_x509_crq_set_private_key_usage_period ()">gnutls_x509_crq_set_private_key_usage_period</a> <span class="c_punctuation">()</span>
2190 </td>
2191 </tr>
2192 <tr>
2193 <td class="function_type">
2194 <span class="returnvalue">int</span>
2195 </td>
2196 <td class="function_name">
2197 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-key-rsa-raw" title="gnutls_x509_crq_set_key_rsa_raw ()">gnutls_x509_crq_set_key_rsa_raw</a> <span class="c_punctuation">()</span>
2198 </td>
2199 </tr>
2200 <tr>
2201 <td class="function_type">
2202 <span class="returnvalue">int</span>
2203 </td>
2204 <td class="function_name">
2205 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-subject-alt-name" title="gnutls_x509_crq_set_subject_alt_name ()">gnutls_x509_crq_set_subject_alt_name</a> <span class="c_punctuation">()</span>
2206 </td>
2207 </tr>
2208 <tr>
2209 <td class="function_type">
2210 <span class="returnvalue">int</span>
2211 </td>
2212 <td class="function_name">
2213 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-subject-alt-othername" title="gnutls_x509_crq_set_subject_alt_othername ()">gnutls_x509_crq_set_subject_alt_othername</a> <span class="c_punctuation">()</span>
2214 </td>
2215 </tr>
2216 <tr>
2217 <td class="function_type">
2218 <span class="returnvalue">int</span>
2219 </td>
2220 <td class="function_name">
2221 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-key-usage" title="gnutls_x509_crq_set_key_usage ()">gnutls_x509_crq_set_key_usage</a> <span class="c_punctuation">()</span>
2222 </td>
2223 </tr>
2224 <tr>
2225 <td class="function_type">
2226 <span class="returnvalue">int</span>
2227 </td>
2228 <td class="function_name">
2229 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-basic-constraints" title="gnutls_x509_crq_set_basic_constraints ()">gnutls_x509_crq_set_basic_constraints</a> <span class="c_punctuation">()</span>
2230 </td>
2231 </tr>
2232 <tr>
2233 <td class="function_type">
2234 <span class="returnvalue">int</span>
2235 </td>
2236 <td class="function_name">
2237 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-key-purpose-oid" title="gnutls_x509_crq_set_key_purpose_oid ()">gnutls_x509_crq_set_key_purpose_oid</a> <span class="c_punctuation">()</span>
2238 </td>
2239 </tr>
2240 <tr>
2241 <td class="function_type">
2242 <span class="returnvalue">int</span>
2243 </td>
2244 <td class="function_name">
2245 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-key-purpose-oid" title="gnutls_x509_crq_get_key_purpose_oid ()">gnutls_x509_crq_get_key_purpose_oid</a> <span class="c_punctuation">()</span>
2246 </td>
2247 </tr>
2248 <tr>
2249 <td class="function_type">
2250 <span class="returnvalue">int</span>
2251 </td>
2252 <td class="function_name">
2253 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-extension-data" title="gnutls_x509_crq_get_extension_data ()">gnutls_x509_crq_get_extension_data</a> <span class="c_punctuation">()</span>
2254 </td>
2255 </tr>
2256 <tr>
2257 <td class="function_type">
2258 <span class="returnvalue">int</span>
2259 </td>
2260 <td class="function_name">
2261 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-extension-data2" title="gnutls_x509_crq_get_extension_data2 ()">gnutls_x509_crq_get_extension_data2</a> <span class="c_punctuation">()</span>
2262 </td>
2263 </tr>
2264 <tr>
2265 <td class="function_type">
2266 <span class="returnvalue">int</span>
2267 </td>
2268 <td class="function_name">
2269 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-extension-info" title="gnutls_x509_crq_get_extension_info ()">gnutls_x509_crq_get_extension_info</a> <span class="c_punctuation">()</span>
2270 </td>
2271 </tr>
2272 <tr>
2273 <td class="function_type">
2274 <span class="returnvalue">int</span>
2275 </td>
2276 <td class="function_name">
2277 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-attribute-data" title="gnutls_x509_crq_get_attribute_data ()">gnutls_x509_crq_get_attribute_data</a> <span class="c_punctuation">()</span>
2278 </td>
2279 </tr>
2280 <tr>
2281 <td class="function_type">
2282 <span class="returnvalue">int</span>
2283 </td>
2284 <td class="function_name">
2285 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-attribute-info" title="gnutls_x509_crq_get_attribute_info ()">gnutls_x509_crq_get_attribute_info</a> <span class="c_punctuation">()</span>
2286 </td>
2287 </tr>
2288 <tr>
2289 <td class="function_type">
2290 <span class="returnvalue">int</span>
2291 </td>
2292 <td class="function_name">
2293 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-pk-algorithm" title="gnutls_x509_crq_get_pk_algorithm ()">gnutls_x509_crq_get_pk_algorithm</a> <span class="c_punctuation">()</span>
2294 </td>
2295 </tr>
2296 <tr>
2297 <td class="function_type">
2298 <span class="returnvalue">int</span>
2299 </td>
2300 <td class="function_name">
2301 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-spki" title="gnutls_x509_crq_get_spki ()">gnutls_x509_crq_get_spki</a> <span class="c_punctuation">()</span>
2302 </td>
2303 </tr>
2304 <tr>
2305 <td class="function_type">
2306 <span class="returnvalue">int</span>
2307 </td>
2308 <td class="function_name">
2309 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-spki" title="gnutls_x509_crq_set_spki ()">gnutls_x509_crq_set_spki</a> <span class="c_punctuation">()</span>
2310 </td>
2311 </tr>
2312 <tr>
2313 <td class="function_type">
2314 <span class="returnvalue">int</span>
2315 </td>
2316 <td class="function_name">
2317 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-signature-oid" title="gnutls_x509_crq_get_signature_oid ()">gnutls_x509_crq_get_signature_oid</a> <span class="c_punctuation">()</span>
2318 </td>
2319 </tr>
2320 <tr>
2321 <td class="function_type">
2322 <span class="returnvalue">int</span>
2323 </td>
2324 <td class="function_name">
2325 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-pk-oid" title="gnutls_x509_crq_get_pk_oid ()">gnutls_x509_crq_get_pk_oid</a> <span class="c_punctuation">()</span>
2326 </td>
2327 </tr>
2328 <tr>
2329 <td class="function_type">
2330 <span class="returnvalue">int</span>
2331 </td>
2332 <td class="function_name">
2333 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-key-id" title="gnutls_x509_crq_get_key_id ()">gnutls_x509_crq_get_key_id</a> <span class="c_punctuation">()</span>
2334 </td>
2335 </tr>
2336 <tr>
2337 <td class="function_type">
2338 <span class="returnvalue">int</span>
2339 </td>
2340 <td class="function_name">
2341 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-key-rsa-raw" title="gnutls_x509_crq_get_key_rsa_raw ()">gnutls_x509_crq_get_key_rsa_raw</a> <span class="c_punctuation">()</span>
2342 </td>
2343 </tr>
2344 <tr>
2345 <td class="function_type">
2346 <span class="returnvalue">int</span>
2347 </td>
2348 <td class="function_name">
2349 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-key-usage" title="gnutls_x509_crq_get_key_usage ()">gnutls_x509_crq_get_key_usage</a> <span class="c_punctuation">()</span>
2350 </td>
2351 </tr>
2352 <tr>
2353 <td class="function_type">
2354 <span class="returnvalue">int</span>
2355 </td>
2356 <td class="function_name">
2357 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-basic-constraints" title="gnutls_x509_crq_get_basic_constraints ()">gnutls_x509_crq_get_basic_constraints</a> <span class="c_punctuation">()</span>
2358 </td>
2359 </tr>
2360 <tr>
2361 <td class="function_type">
2362 <span class="returnvalue">int</span>
2363 </td>
2364 <td class="function_name">
2365 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-subject-alt-name" title="gnutls_x509_crq_get_subject_alt_name ()">gnutls_x509_crq_get_subject_alt_name</a> <span class="c_punctuation">()</span>
2366 </td>
2367 </tr>
2368 <tr>
2369 <td class="function_type">
2370 <span class="returnvalue">int</span>
2371 </td>
2372 <td class="function_name">
2373 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-subject-alt-othername-oid" title="gnutls_x509_crq_get_subject_alt_othername_oid ()">gnutls_x509_crq_get_subject_alt_othername_oid</a> <span class="c_punctuation">()</span>
2374 </td>
2375 </tr>
2376 <tr>
2377 <td class="function_type">
2378 <span class="returnvalue">int</span>
2379 </td>
2380 <td class="function_name">
2381 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-extension-by-oid" title="gnutls_x509_crq_get_extension_by_oid ()">gnutls_x509_crq_get_extension_by_oid</a> <span class="c_punctuation">()</span>
2382 </td>
2383 </tr>
2384 <tr>
2385 <td class="function_type">
2386 <span class="returnvalue">int</span>
2387 </td>
2388 <td class="function_name">
2389 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-tlsfeatures" title="gnutls_x509_crq_get_tlsfeatures ()">gnutls_x509_crq_get_tlsfeatures</a> <span class="c_punctuation">()</span>
2390 </td>
2391 </tr>
2392 <tr>
2393 <td class="function_type">
2394 <span class="returnvalue">int</span>
2395 </td>
2396 <td class="function_name">
2397 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-tlsfeatures" title="gnutls_x509_crq_set_tlsfeatures ()">gnutls_x509_crq_set_tlsfeatures</a> <span class="c_punctuation">()</span>
2398 </td>
2399 </tr>
2400 <tr>
2401 <td class="function_type">
2402 <span class="returnvalue">int</span>
2403 </td>
2404 <td class="function_name">
2405 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-extension-by-oid2" title="gnutls_x509_crt_get_extension_by_oid2 ()">gnutls_x509_crt_get_extension_by_oid2</a> <span class="c_punctuation">()</span>
2406 </td>
2407 </tr>
2408 <tr>
2409 <td class="function_type">
2410 <span class="returnvalue">int</span>
2411 </td>
2412 <td class="function_name">
2413 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-init" title="gnutls_x509_trust_list_init ()">gnutls_x509_trust_list_init</a> <span class="c_punctuation">()</span>
2414 </td>
2415 </tr>
2416 <tr>
2417 <td class="function_type">
2418 <span class="returnvalue">void</span>
2419 </td>
2420 <td class="function_name">
2421 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-deinit" title="gnutls_x509_trust_list_deinit ()">gnutls_x509_trust_list_deinit</a> <span class="c_punctuation">()</span>
2422 </td>
2423 </tr>
2424 <tr>
2425 <td class="function_type">
2426 <span class="returnvalue">int</span>
2427 </td>
2428 <td class="function_name">
2429 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-get-issuer" title="gnutls_x509_trust_list_get_issuer ()">gnutls_x509_trust_list_get_issuer</a> <span class="c_punctuation">()</span>
2430 </td>
2431 </tr>
2432 <tr>
2433 <td class="function_type">
2434 <span class="returnvalue">int</span>
2435 </td>
2436 <td class="function_name">
2437 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-get-issuer-by-dn" title="gnutls_x509_trust_list_get_issuer_by_dn ()">gnutls_x509_trust_list_get_issuer_by_dn</a> <span class="c_punctuation">()</span>
2438 </td>
2439 </tr>
2440 <tr>
2441 <td class="function_type">
2442 <span class="returnvalue">int</span>
2443 </td>
2444 <td class="function_name">
2445 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-get-issuer-by-subject-key-id" title="gnutls_x509_trust_list_get_issuer_by_subject_key_id ()">gnutls_x509_trust_list_get_issuer_by_subject_key_id</a> <span class="c_punctuation">()</span>
2446 </td>
2447 </tr>
2448 <tr>
2449 <td class="function_type">
2450 <span class="returnvalue">int</span>
2451 </td>
2452 <td class="function_name">
2453 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-add-cas" title="gnutls_x509_trust_list_add_cas ()">gnutls_x509_trust_list_add_cas</a> <span class="c_punctuation">()</span>
2454 </td>
2455 </tr>
2456 <tr>
2457 <td class="function_type">
2458 <span class="returnvalue">int</span>
2459 </td>
2460 <td class="function_name">
2461 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-remove-cas" title="gnutls_x509_trust_list_remove_cas ()">gnutls_x509_trust_list_remove_cas</a> <span class="c_punctuation">()</span>
2462 </td>
2463 </tr>
2464 <tr>
2465 <td class="function_type">
2466 <span class="returnvalue">int</span>
2467 </td>
2468 <td class="function_name">
2469 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-add-named-crt" title="gnutls_x509_trust_list_add_named_crt ()">gnutls_x509_trust_list_add_named_crt</a> <span class="c_punctuation">()</span>
2470 </td>
2471 </tr>
2472 <tr>
2473 <td class="function_type">
2474 <span class="returnvalue">int</span>
2475 </td>
2476 <td class="function_name">
2477 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-add-crls" title="gnutls_x509_trust_list_add_crls ()">gnutls_x509_trust_list_add_crls</a> <span class="c_punctuation">()</span>
2478 </td>
2479 </tr>
2480 <tr>
2481 <td class="function_type">
2482 <span class="returnvalue">int</span>
2483 </td>
2484 <td class="function_name">
2485 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-iter-get-ca" title="gnutls_x509_trust_list_iter_get_ca ()">gnutls_x509_trust_list_iter_get_ca</a> <span class="c_punctuation">()</span>
2486 </td>
2487 </tr>
2488 <tr>
2489 <td class="function_type">
2490 <span class="returnvalue">void</span>
2491 </td>
2492 <td class="function_name">
2493 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-iter-deinit" title="gnutls_x509_trust_list_iter_deinit ()">gnutls_x509_trust_list_iter_deinit</a> <span class="c_punctuation">()</span>
2494 </td>
2495 </tr>
2496 <tr>
2497 <td class="function_type">
2498 <span class="returnvalue">void</span>
2499 </td>
2500 <td class="function_name">
2501 <a class="link" href="gnutls-x509.html#gnutls-session-set-verify-output-function" title="gnutls_session_set_verify_output_function ()">gnutls_session_set_verify_output_function</a> <span class="c_punctuation">()</span>
2502 </td>
2503 </tr>
2504 <tr>
2505 <td class="function_type">
2506 <span class="returnvalue">int</span>
2507 </td>
2508 <td class="function_name">
2509 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-verify-named-crt" title="gnutls_x509_trust_list_verify_named_crt ()">gnutls_x509_trust_list_verify_named_crt</a> <span class="c_punctuation">()</span>
2510 </td>
2511 </tr>
2512 <tr>
2513 <td class="function_type">
2514 <span class="returnvalue">int</span>
2515 </td>
2516 <td class="function_name">
2517 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-verify-crt2" title="gnutls_x509_trust_list_verify_crt2 ()">gnutls_x509_trust_list_verify_crt2</a> <span class="c_punctuation">()</span>
2518 </td>
2519 </tr>
2520 <tr>
2521 <td class="function_type">
2522 <span class="returnvalue">int</span>
2523 </td>
2524 <td class="function_name">
2525 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-verify-crt" title="gnutls_x509_trust_list_verify_crt ()">gnutls_x509_trust_list_verify_crt</a> <span class="c_punctuation">()</span>
2526 </td>
2527 </tr>
2528 <tr>
2529 <td class="function_type">
2530 <span class="returnvalue">int</span>
2531 </td>
2532 <td class="function_name">
2533 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-add-trust-mem" title="gnutls_x509_trust_list_add_trust_mem ()">gnutls_x509_trust_list_add_trust_mem</a> <span class="c_punctuation">()</span>
2534 </td>
2535 </tr>
2536 <tr>
2537 <td class="function_type">
2538 <span class="returnvalue">int</span>
2539 </td>
2540 <td class="function_name">
2541 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-add-trust-file" title="gnutls_x509_trust_list_add_trust_file ()">gnutls_x509_trust_list_add_trust_file</a> <span class="c_punctuation">()</span>
2542 </td>
2543 </tr>
2544 <tr>
2545 <td class="function_type">
2546 <span class="returnvalue">int</span>
2547 </td>
2548 <td class="function_name">
2549 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-add-trust-dir" title="gnutls_x509_trust_list_add_trust_dir ()">gnutls_x509_trust_list_add_trust_dir</a> <span class="c_punctuation">()</span>
2550 </td>
2551 </tr>
2552 <tr>
2553 <td class="function_type">
2554 <span class="returnvalue">int</span>
2555 </td>
2556 <td class="function_name">
2557 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-remove-trust-file" title="gnutls_x509_trust_list_remove_trust_file ()">gnutls_x509_trust_list_remove_trust_file</a> <span class="c_punctuation">()</span>
2558 </td>
2559 </tr>
2560 <tr>
2561 <td class="function_type">
2562 <span class="returnvalue">int</span>
2563 </td>
2564 <td class="function_name">
2565 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-remove-trust-mem" title="gnutls_x509_trust_list_remove_trust_mem ()">gnutls_x509_trust_list_remove_trust_mem</a> <span class="c_punctuation">()</span>
2566 </td>
2567 </tr>
2568 <tr>
2569 <td class="function_type">
2570 <span class="returnvalue">int</span>
2571 </td>
2572 <td class="function_name">
2573 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-add-system-trust" title="gnutls_x509_trust_list_add_system_trust ()">gnutls_x509_trust_list_add_system_trust</a> <span class="c_punctuation">()</span>
2574 </td>
2575 </tr>
2576 <tr>
2577 <td class="function_type">
2578 <span class="returnvalue">void</span>
2579 </td>
2580 <td class="function_name">
2581 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-set-getissuer-function" title="gnutls_x509_trust_list_set_getissuer_function ()">gnutls_x509_trust_list_set_getissuer_function</a> <span class="c_punctuation">()</span>
2582 </td>
2583 </tr>
2584 <tr>
2585 <td class="function_type">
2586 <span class="returnvalue">void</span>
2587 </td>
2588 <td class="function_name">
2589 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-set-ptr" title="gnutls_x509_trust_list_set_ptr ()">gnutls_x509_trust_list_set_ptr</a> <span class="c_punctuation">()</span>
2590 </td>
2591 </tr>
2592 <tr>
2593 <td class="function_type">
2594 <span class="returnvalue">void</span> *
2595 </td>
2596 <td class="function_name">
2597 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-get-ptr" title="gnutls_x509_trust_list_get_ptr ()">gnutls_x509_trust_list_get_ptr</a> <span class="c_punctuation">()</span>
2598 </td>
2599 </tr>
2600 <tr>
2601 <td class="function_type">
2602 <span class="returnvalue">void</span>
2603 </td>
2604 <td class="function_name">
2605 <a class="link" href="gnutls-x509.html#gnutls-certificate-set-trust-list" title="gnutls_certificate_set_trust_list ()">gnutls_certificate_set_trust_list</a> <span class="c_punctuation">()</span>
2606 </td>
2607 </tr>
2608 <tr>
2609 <td class="function_type">
2610 <span class="returnvalue">void</span>
2611 </td>
2612 <td class="function_name">
2613 <a class="link" href="gnutls-x509.html#gnutls-certificate-get-trust-list" title="gnutls_certificate_get_trust_list ()">gnutls_certificate_get_trust_list</a> <span class="c_punctuation">()</span>
2614 </td>
2615 </tr>
2616 <tr>
2617 <td class="function_type">
2618 <span class="returnvalue">void</span>
2619 </td>
2620 <td class="function_name">
2621 <a class="link" href="gnutls-x509.html#gnutls-x509-ext-deinit" title="gnutls_x509_ext_deinit ()">gnutls_x509_ext_deinit</a> <span class="c_punctuation">()</span>
2622 </td>
2623 </tr>
2624 <tr>
2625 <td class="function_type">
2626 <span class="returnvalue">int</span>
2627 </td>
2628 <td class="function_name">
2629 <a class="link" href="gnutls-x509.html#gnutls-x509-ext-print" title="gnutls_x509_ext_print ()">gnutls_x509_ext_print</a> <span class="c_punctuation">()</span>
2630 </td>
2631 </tr>
2632 </tbody>
2633 </table></div>
2634 </div>
2635 <div class="refsect1">
2636 <a name="gnutls-x509.other"></a><h2>Types and Values</h2>
2637 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2638 <colgroup>
2639 <col width="150px" class="other_proto_type">
2640 <col class="other_proto_name">
2641 </colgroup>
2642 <tbody>
2643 <tr>
2644 <td class="define_keyword">#define</td>
2645 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-X520-COUNTRY-NAME:CAPS" title="GNUTLS_OID_X520_COUNTRY_NAME">GNUTLS_OID_X520_COUNTRY_NAME</a></td>
2646 </tr>
2647 <tr>
2648 <td class="define_keyword">#define</td>
2649 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-X520-ORGANIZATION-NAME:CAPS" title="GNUTLS_OID_X520_ORGANIZATION_NAME">GNUTLS_OID_X520_ORGANIZATION_NAME</a></td>
2650 </tr>
2651 <tr>
2652 <td class="define_keyword">#define</td>
2653 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-X520-ORGANIZATIONAL-UNIT-NAME:CAPS" title="GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME">GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME</a></td>
2654 </tr>
2655 <tr>
2656 <td class="define_keyword">#define</td>
2657 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-X520-COMMON-NAME:CAPS" title="GNUTLS_OID_X520_COMMON_NAME">GNUTLS_OID_X520_COMMON_NAME</a></td>
2658 </tr>
2659 <tr>
2660 <td class="define_keyword">#define</td>
2661 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-X520-LOCALITY-NAME:CAPS" title="GNUTLS_OID_X520_LOCALITY_NAME">GNUTLS_OID_X520_LOCALITY_NAME</a></td>
2662 </tr>
2663 <tr>
2664 <td class="define_keyword">#define</td>
2665 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-X520-STATE-OR-PROVINCE-NAME:CAPS" title="GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME">GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME</a></td>
2666 </tr>
2667 <tr>
2668 <td class="define_keyword">#define</td>
2669 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-X520-INITIALS:CAPS" title="GNUTLS_OID_X520_INITIALS">GNUTLS_OID_X520_INITIALS</a></td>
2670 </tr>
2671 <tr>
2672 <td class="define_keyword">#define</td>
2673 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-X520-GENERATION-QUALIFIER:CAPS" title="GNUTLS_OID_X520_GENERATION_QUALIFIER">GNUTLS_OID_X520_GENERATION_QUALIFIER</a></td>
2674 </tr>
2675 <tr>
2676 <td class="define_keyword">#define</td>
2677 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-X520-SURNAME:CAPS" title="GNUTLS_OID_X520_SURNAME">GNUTLS_OID_X520_SURNAME</a></td>
2678 </tr>
2679 <tr>
2680 <td class="define_keyword">#define</td>
2681 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-X520-GIVEN-NAME:CAPS" title="GNUTLS_OID_X520_GIVEN_NAME">GNUTLS_OID_X520_GIVEN_NAME</a></td>
2682 </tr>
2683 <tr>
2684 <td class="define_keyword">#define</td>
2685 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-X520-TITLE:CAPS" title="GNUTLS_OID_X520_TITLE">GNUTLS_OID_X520_TITLE</a></td>
2686 </tr>
2687 <tr>
2688 <td class="define_keyword">#define</td>
2689 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-X520-DN-QUALIFIER:CAPS" title="GNUTLS_OID_X520_DN_QUALIFIER">GNUTLS_OID_X520_DN_QUALIFIER</a></td>
2690 </tr>
2691 <tr>
2692 <td class="define_keyword">#define</td>
2693 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-X520-PSEUDONYM:CAPS" title="GNUTLS_OID_X520_PSEUDONYM">GNUTLS_OID_X520_PSEUDONYM</a></td>
2694 </tr>
2695 <tr>
2696 <td class="define_keyword">#define</td>
2697 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-X520-POSTALCODE:CAPS" title="GNUTLS_OID_X520_POSTALCODE">GNUTLS_OID_X520_POSTALCODE</a></td>
2698 </tr>
2699 <tr>
2700 <td class="define_keyword">#define</td>
2701 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-X520-NAME:CAPS" title="GNUTLS_OID_X520_NAME">GNUTLS_OID_X520_NAME</a></td>
2702 </tr>
2703 <tr>
2704 <td class="define_keyword">#define</td>
2705 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-LDAP-DC:CAPS" title="GNUTLS_OID_LDAP_DC">GNUTLS_OID_LDAP_DC</a></td>
2706 </tr>
2707 <tr>
2708 <td class="define_keyword">#define</td>
2709 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-LDAP-UID:CAPS" title="GNUTLS_OID_LDAP_UID">GNUTLS_OID_LDAP_UID</a></td>
2710 </tr>
2711 <tr>
2712 <td class="define_keyword">#define</td>
2713 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-PKCS9-EMAIL:CAPS" title="GNUTLS_OID_PKCS9_EMAIL">GNUTLS_OID_PKCS9_EMAIL</a></td>
2714 </tr>
2715 <tr>
2716 <td class="define_keyword">#define</td>
2717 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-PKIX-DATE-OF-BIRTH:CAPS" title="GNUTLS_OID_PKIX_DATE_OF_BIRTH">GNUTLS_OID_PKIX_DATE_OF_BIRTH</a></td>
2718 </tr>
2719 <tr>
2720 <td class="define_keyword">#define</td>
2721 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-PKIX-PLACE-OF-BIRTH:CAPS" title="GNUTLS_OID_PKIX_PLACE_OF_BIRTH">GNUTLS_OID_PKIX_PLACE_OF_BIRTH</a></td>
2722 </tr>
2723 <tr>
2724 <td class="define_keyword">#define</td>
2725 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-PKIX-GENDER:CAPS" title="GNUTLS_OID_PKIX_GENDER">GNUTLS_OID_PKIX_GENDER</a></td>
2726 </tr>
2727 <tr>
2728 <td class="define_keyword">#define</td>
2729 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-PKIX-COUNTRY-OF-CITIZENSHIP:CAPS" title="GNUTLS_OID_PKIX_COUNTRY_OF_CITIZENSHIP">GNUTLS_OID_PKIX_COUNTRY_OF_CITIZENSHIP</a></td>
2730 </tr>
2731 <tr>
2732 <td class="define_keyword">#define</td>
2733 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-PKIX-COUNTRY-OF-RESIDENCE:CAPS" title="GNUTLS_OID_PKIX_COUNTRY_OF_RESIDENCE">GNUTLS_OID_PKIX_COUNTRY_OF_RESIDENCE</a></td>
2734 </tr>
2735 <tr>
2736 <td class="define_keyword">#define</td>
2737 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-KP-TLS-WWW-SERVER:CAPS" title="GNUTLS_KP_TLS_WWW_SERVER">GNUTLS_KP_TLS_WWW_SERVER</a></td>
2738 </tr>
2739 <tr>
2740 <td class="define_keyword">#define</td>
2741 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-KP-TLS-WWW-CLIENT:CAPS" title="GNUTLS_KP_TLS_WWW_CLIENT">GNUTLS_KP_TLS_WWW_CLIENT</a></td>
2742 </tr>
2743 <tr>
2744 <td class="define_keyword">#define</td>
2745 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-KP-CODE-SIGNING:CAPS" title="GNUTLS_KP_CODE_SIGNING">GNUTLS_KP_CODE_SIGNING</a></td>
2746 </tr>
2747 <tr>
2748 <td class="define_keyword">#define</td>
2749 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-KP-MS-SMART-CARD-LOGON:CAPS" title="GNUTLS_KP_MS_SMART_CARD_LOGON">GNUTLS_KP_MS_SMART_CARD_LOGON</a></td>
2750 </tr>
2751 <tr>
2752 <td class="define_keyword">#define</td>
2753 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-KP-EMAIL-PROTECTION:CAPS" title="GNUTLS_KP_EMAIL_PROTECTION">GNUTLS_KP_EMAIL_PROTECTION</a></td>
2754 </tr>
2755 <tr>
2756 <td class="define_keyword">#define</td>
2757 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-KP-TIME-STAMPING:CAPS" title="GNUTLS_KP_TIME_STAMPING">GNUTLS_KP_TIME_STAMPING</a></td>
2758 </tr>
2759 <tr>
2760 <td class="define_keyword">#define</td>
2761 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-KP-OCSP-SIGNING:CAPS" title="GNUTLS_KP_OCSP_SIGNING">GNUTLS_KP_OCSP_SIGNING</a></td>
2762 </tr>
2763 <tr>
2764 <td class="define_keyword">#define</td>
2765 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-KP-IPSEC-IKE:CAPS" title="GNUTLS_KP_IPSEC_IKE">GNUTLS_KP_IPSEC_IKE</a></td>
2766 </tr>
2767 <tr>
2768 <td class="define_keyword">#define</td>
2769 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-KP-ANY:CAPS" title="GNUTLS_KP_ANY">GNUTLS_KP_ANY</a></td>
2770 </tr>
2771 <tr>
2772 <td class="define_keyword">#define</td>
2773 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-KP-FLAG-DISALLOW-ANY:CAPS" title="GNUTLS_KP_FLAG_DISALLOW_ANY">GNUTLS_KP_FLAG_DISALLOW_ANY</a></td>
2774 </tr>
2775 <tr>
2776 <td class="define_keyword">#define</td>
2777 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-AIA:CAPS" title="GNUTLS_OID_AIA">GNUTLS_OID_AIA</a></td>
2778 </tr>
2779 <tr>
2780 <td class="define_keyword">#define</td>
2781 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-AD-OCSP:CAPS" title="GNUTLS_OID_AD_OCSP">GNUTLS_OID_AD_OCSP</a></td>
2782 </tr>
2783 <tr>
2784 <td class="define_keyword">#define</td>
2785 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-OID-AD-CAISSUERS:CAPS" title="GNUTLS_OID_AD_CAISSUERS">GNUTLS_OID_AD_CAISSUERS</a></td>
2786 </tr>
2787 <tr>
2788 <td class="define_keyword">#define</td>
2789 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-FSAN-SET:CAPS" title="GNUTLS_FSAN_SET">GNUTLS_FSAN_SET</a></td>
2790 </tr>
2791 <tr>
2792 <td class="define_keyword">#define</td>
2793 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-FSAN-APPEND:CAPS" title="GNUTLS_FSAN_APPEND">GNUTLS_FSAN_APPEND</a></td>
2794 </tr>
2795 <tr>
2796 <td class="define_keyword">#define</td>
2797 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-FSAN-ENCODE-OCTET-STRING:CAPS" title="GNUTLS_FSAN_ENCODE_OCTET_STRING">GNUTLS_FSAN_ENCODE_OCTET_STRING</a></td>
2798 </tr>
2799 <tr>
2800 <td class="define_keyword">#define</td>
2801 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-FSAN-ENCODE-UTF8-STRING:CAPS" title="GNUTLS_FSAN_ENCODE_UTF8_STRING">GNUTLS_FSAN_ENCODE_UTF8_STRING</a></td>
2802 </tr>
2803 <tr>
2804 <td class="define_keyword">#define</td>
2805 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509EXT-OID-SUBJECT-KEY-ID:CAPS" title="GNUTLS_X509EXT_OID_SUBJECT_KEY_ID">GNUTLS_X509EXT_OID_SUBJECT_KEY_ID</a></td>
2806 </tr>
2807 <tr>
2808 <td class="define_keyword">#define</td>
2809 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509EXT-OID-KEY-USAGE:CAPS" title="GNUTLS_X509EXT_OID_KEY_USAGE">GNUTLS_X509EXT_OID_KEY_USAGE</a></td>
2810 </tr>
2811 <tr>
2812 <td class="define_keyword">#define</td>
2813 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509EXT-OID-PRIVATE-KEY-USAGE-PERIOD:CAPS" title="GNUTLS_X509EXT_OID_PRIVATE_KEY_USAGE_PERIOD">GNUTLS_X509EXT_OID_PRIVATE_KEY_USAGE_PERIOD</a></td>
2814 </tr>
2815 <tr>
2816 <td class="define_keyword">#define</td>
2817 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509EXT-OID-SAN:CAPS" title="GNUTLS_X509EXT_OID_SAN">GNUTLS_X509EXT_OID_SAN</a></td>
2818 </tr>
2819 <tr>
2820 <td class="define_keyword">#define</td>
2821 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509EXT-OID-IAN:CAPS" title="GNUTLS_X509EXT_OID_IAN">GNUTLS_X509EXT_OID_IAN</a></td>
2822 </tr>
2823 <tr>
2824 <td class="define_keyword">#define</td>
2825 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509EXT-OID-BASIC-CONSTRAINTS:CAPS" title="GNUTLS_X509EXT_OID_BASIC_CONSTRAINTS">GNUTLS_X509EXT_OID_BASIC_CONSTRAINTS</a></td>
2826 </tr>
2827 <tr>
2828 <td class="define_keyword">#define</td>
2829 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509EXT-OID-NAME-CONSTRAINTS:CAPS" title="GNUTLS_X509EXT_OID_NAME_CONSTRAINTS">GNUTLS_X509EXT_OID_NAME_CONSTRAINTS</a></td>
2830 </tr>
2831 <tr>
2832 <td class="define_keyword">#define</td>
2833 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509EXT-OID-CRL-DIST-POINTS:CAPS" title="GNUTLS_X509EXT_OID_CRL_DIST_POINTS">GNUTLS_X509EXT_OID_CRL_DIST_POINTS</a></td>
2834 </tr>
2835 <tr>
2836 <td class="define_keyword">#define</td>
2837 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509EXT-OID-CRT-POLICY:CAPS" title="GNUTLS_X509EXT_OID_CRT_POLICY">GNUTLS_X509EXT_OID_CRT_POLICY</a></td>
2838 </tr>
2839 <tr>
2840 <td class="define_keyword">#define</td>
2841 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509EXT-OID-AUTHORITY-KEY-ID:CAPS" title="GNUTLS_X509EXT_OID_AUTHORITY_KEY_ID">GNUTLS_X509EXT_OID_AUTHORITY_KEY_ID</a></td>
2842 </tr>
2843 <tr>
2844 <td class="define_keyword">#define</td>
2845 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509EXT-OID-EXTENDED-KEY-USAGE:CAPS" title="GNUTLS_X509EXT_OID_EXTENDED_KEY_USAGE">GNUTLS_X509EXT_OID_EXTENDED_KEY_USAGE</a></td>
2846 </tr>
2847 <tr>
2848 <td class="define_keyword">#define</td>
2849 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509EXT-OID-INHIBIT-ANYPOLICY:CAPS" title="GNUTLS_X509EXT_OID_INHIBIT_ANYPOLICY">GNUTLS_X509EXT_OID_INHIBIT_ANYPOLICY</a></td>
2850 </tr>
2851 <tr>
2852 <td class="define_keyword">#define</td>
2853 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509EXT-OID-AUTHORITY-INFO-ACCESS:CAPS" title="GNUTLS_X509EXT_OID_AUTHORITY_INFO_ACCESS">GNUTLS_X509EXT_OID_AUTHORITY_INFO_ACCESS</a></td>
2854 </tr>
2855 <tr>
2856 <td class="define_keyword">#define</td>
2857 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509EXT-OID-PROXY-CRT-INFO:CAPS" title="GNUTLS_X509EXT_OID_PROXY_CRT_INFO">GNUTLS_X509EXT_OID_PROXY_CRT_INFO</a></td>
2858 </tr>
2859 <tr>
2860 <td class="define_keyword">#define</td>
2861 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509EXT-OID-TLSFEATURES:CAPS" title="GNUTLS_X509EXT_OID_TLSFEATURES">GNUTLS_X509EXT_OID_TLSFEATURES</a></td>
2862 </tr>
2863 <tr>
2864 <td class="define_keyword">#define</td>
2865 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509EXT-OID-CT-SCT-V1:CAPS" title="GNUTLS_X509EXT_OID_CT_SCT_V1">GNUTLS_X509EXT_OID_CT_SCT_V1</a></td>
2866 </tr>
2867 <tr>
2868 <td class="define_keyword">#define</td>
2869 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509-OID-POLICY-ANY:CAPS" title="GNUTLS_X509_OID_POLICY_ANY">GNUTLS_X509_OID_POLICY_ANY</a></td>
2870 </tr>
2871 <tr>
2872 <td class="datatype_keyword">enum</td>
2873 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-certificate-import-flags" title="enum gnutls_certificate_import_flags">gnutls_certificate_import_flags</a></td>
2874 </tr>
2875 <tr>
2876 <td class="datatype_keyword">enum</td>
2877 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-x509-crt-flags" title="enum gnutls_x509_crt_flags">gnutls_x509_crt_flags</a></td>
2878 </tr>
2879 <tr>
2880 <td class="datatype_keyword">enum</td>
2881 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-keyid-flags-t" title="enum gnutls_keyid_flags_t">gnutls_keyid_flags_t</a></td>
2882 </tr>
2883 <tr>
2884 <td class="datatype_keyword">enum</td>
2885 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-info-access-what-t" title="enum gnutls_info_access_what_t">gnutls_info_access_what_t</a></td>
2886 </tr>
2887 <tr>
2888 <td class="typedef_keyword">typedef</td>
2889 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-t" title="gnutls_x509_name_constraints_t">gnutls_x509_name_constraints_t</a></td>
2890 </tr>
2891 <tr>
2892 <td class="define_keyword">#define</td>
2893 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-EXT-FLAG-APPEND:CAPS" title="GNUTLS_EXT_FLAG_APPEND">GNUTLS_EXT_FLAG_APPEND</a></td>
2894 </tr>
2895 <tr>
2896 <td class="define_keyword">#define</td>
2897 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-NAME-CONSTRAINTS-FLAG-APPEND:CAPS" title="GNUTLS_NAME_CONSTRAINTS_FLAG_APPEND">GNUTLS_NAME_CONSTRAINTS_FLAG_APPEND</a></td>
2898 </tr>
2899 <tr>
2900 <td class="define_keyword">#define</td>
2901 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-CRL-REASON-SUPERSEEDED:CAPS" title="GNUTLS_CRL_REASON_SUPERSEEDED">GNUTLS_CRL_REASON_SUPERSEEDED</a></td>
2902 </tr>
2903 <tr>
2904 <td class="datatype_keyword">enum</td>
2905 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-x509-crl-reason-flags-t" title="enum gnutls_x509_crl_reason_flags_t">gnutls_x509_crl_reason_flags_t</a></td>
2906 </tr>
2907 <tr>
2908 <td class="define_keyword">#define</td>
2909 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509-NO-WELL-DEFINED-EXPIRATION:CAPS" title="GNUTLS_X509_NO_WELL_DEFINED_EXPIRATION">GNUTLS_X509_NO_WELL_DEFINED_EXPIRATION</a></td>
2910 </tr>
2911 <tr>
2912 <td class="typedef_keyword">typedef</td>
2913 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t">gnutls_x509_spki_t</a></td>
2914 </tr>
2915 <tr>
2916 <td class="typedef_keyword">typedef</td>
2917 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-x509-tlsfeatures-t" title="gnutls_x509_tlsfeatures_t">gnutls_x509_tlsfeatures_t</a></td>
2918 </tr>
2919 <tr>
2920 <td class="define_keyword">#define</td>
2921 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-MAX-QUALIFIERS:CAPS" title="GNUTLS_MAX_QUALIFIERS">GNUTLS_MAX_QUALIFIERS</a></td>
2922 </tr>
2923 <tr>
2924 <td class="datatype_keyword">enum</td>
2925 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-x509-qualifier-t" title="enum gnutls_x509_qualifier_t">gnutls_x509_qualifier_t</a></td>
2926 </tr>
2927 <tr>
2928 <td class="datatype_keyword"> </td>
2929 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-x509-policy-st" title="gnutls_x509_policy_st">gnutls_x509_policy_st</a></td>
2930 </tr>
2931 <tr>
2932 <td class="define_keyword">#define</td>
2933 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509-DN-OID-RETURN-OID:CAPS" title="GNUTLS_X509_DN_OID_RETURN_OID">GNUTLS_X509_DN_OID_RETURN_OID</a></td>
2934 </tr>
2935 <tr>
2936 <td class="typedef_keyword">typedef</td>
2937 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-x509-dn-t" title="gnutls_x509_dn_t">gnutls_x509_dn_t</a></td>
2938 </tr>
2939 <tr>
2940 <td class="datatype_keyword"> </td>
2941 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-x509-ava-st" title="gnutls_x509_ava_st">gnutls_x509_ava_st</a></td>
2942 </tr>
2943 <tr>
2944 <td class="define_keyword">#define</td>
2945 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-X509-DN-FLAG-COMPAT:CAPS" title="GNUTLS_X509_DN_FLAG_COMPAT">GNUTLS_X509_DN_FLAG_COMPAT</a></td>
2946 </tr>
2947 <tr>
2948 <td class="typedef_keyword">typedef</td>
2949 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-x509-crl-iter-t" title="gnutls_x509_crl_iter_t">gnutls_x509_crl_iter_t</a></td>
2950 </tr>
2951 <tr>
2952 <td class="define_keyword">#define</td>
2953 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-certificate-count" title="gnutls_x509_crl_get_certificate_count">gnutls_x509_crl_get_certificate_count</a></td>
2954 </tr>
2955 <tr>
2956 <td class="define_keyword">#define</td>
2957 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-certificate" title="gnutls_x509_crl_get_certificate">gnutls_x509_crl_get_certificate</a></td>
2958 </tr>
2959 <tr>
2960 <td class="datatype_keyword">enum</td>
2961 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-certificate-verify-flags" title="enum gnutls_certificate_verify_flags">gnutls_certificate_verify_flags</a></td>
2962 </tr>
2963 <tr>
2964 <td class="define_keyword">#define</td>
2965 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-VERIFY-ALLOW-BROKEN:CAPS" title="GNUTLS_VERIFY_ALLOW_BROKEN">GNUTLS_VERIFY_ALLOW_BROKEN</a></td>
2966 </tr>
2967 <tr>
2968 <td class="datatype_keyword">enum</td>
2969 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-certificate-verification-profiles-t" title="enum gnutls_certificate_verification_profiles_t">gnutls_certificate_verification_profiles_t</a></td>
2970 </tr>
2971 <tr>
2972 <td class="define_keyword">#define</td>
2973 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-VFLAGS-PROFILE-MASK:CAPS" title="GNUTLS_VFLAGS_PROFILE_MASK">GNUTLS_VFLAGS_PROFILE_MASK</a></td>
2974 </tr>
2975 <tr>
2976 <td class="define_keyword">#define</td>
2977 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-PKCS8-PLAIN:CAPS" title="GNUTLS_PKCS8_PLAIN">GNUTLS_PKCS8_PLAIN</a></td>
2978 </tr>
2979 <tr>
2980 <td class="define_keyword">#define</td>
2981 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-PKCS8-USE-PKCS12-3DES:CAPS" title="GNUTLS_PKCS8_USE_PKCS12_3DES">GNUTLS_PKCS8_USE_PKCS12_3DES</a></td>
2982 </tr>
2983 <tr>
2984 <td class="define_keyword">#define</td>
2985 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-PKCS8-USE-PKCS12-ARCFOUR:CAPS" title="GNUTLS_PKCS8_USE_PKCS12_ARCFOUR">GNUTLS_PKCS8_USE_PKCS12_ARCFOUR</a></td>
2986 </tr>
2987 <tr>
2988 <td class="define_keyword">#define</td>
2989 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-PKCS8-USE-PKCS12-RC2-40:CAPS" title="GNUTLS_PKCS8_USE_PKCS12_RC2_40">GNUTLS_PKCS8_USE_PKCS12_RC2_40</a></td>
2990 </tr>
2991 <tr>
2992 <td class="datatype_keyword">enum</td>
2993 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-pkcs-encrypt-flags-t" title="enum gnutls_pkcs_encrypt_flags_t">gnutls_pkcs_encrypt_flags_t</a></td>
2994 </tr>
2995 <tr>
2996 <td class="define_keyword">#define</td>
2997 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-PKCS-USE-PKCS12-3DES:CAPS" title="GNUTLS_PKCS_USE_PKCS12_3DES">GNUTLS_PKCS_USE_PKCS12_3DES</a></td>
2998 </tr>
2999 <tr>
3000 <td class="define_keyword">#define</td>
3001 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-PKCS-USE-PKCS12-ARCFOUR:CAPS" title="GNUTLS_PKCS_USE_PKCS12_ARCFOUR">GNUTLS_PKCS_USE_PKCS12_ARCFOUR</a></td>
3002 </tr>
3003 <tr>
3004 <td class="define_keyword">#define</td>
3005 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-PKCS-USE-PKCS12-RC2-40:CAPS" title="GNUTLS_PKCS_USE_PKCS12_RC2_40">GNUTLS_PKCS_USE_PKCS12_RC2_40</a></td>
3006 </tr>
3007 <tr>
3008 <td class="define_keyword">#define</td>
3009 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-PKCS-USE-PBES2-3DES:CAPS" title="GNUTLS_PKCS_USE_PBES2_3DES">GNUTLS_PKCS_USE_PBES2_3DES</a></td>
3010 </tr>
3011 <tr>
3012 <td class="define_keyword">#define</td>
3013 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-PKCS-USE-PBES2-AES-128:CAPS" title="GNUTLS_PKCS_USE_PBES2_AES_128">GNUTLS_PKCS_USE_PBES2_AES_128</a></td>
3014 </tr>
3015 <tr>
3016 <td class="define_keyword">#define</td>
3017 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-PKCS-USE-PBES2-AES-192:CAPS" title="GNUTLS_PKCS_USE_PBES2_AES_192">GNUTLS_PKCS_USE_PBES2_AES_192</a></td>
3018 </tr>
3019 <tr>
3020 <td class="define_keyword">#define</td>
3021 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-PKCS-USE-PBES2-AES-256:CAPS" title="GNUTLS_PKCS_USE_PBES2_AES_256">GNUTLS_PKCS_USE_PBES2_AES_256</a></td>
3022 </tr>
3023 <tr>
3024 <td class="define_keyword">#define</td>
3025 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-PKCS-USE-PBES2-GOST-TC26Z:CAPS" title="GNUTLS_PKCS_USE_PBES2_GOST_TC26Z">GNUTLS_PKCS_USE_PBES2_GOST_TC26Z</a></td>
3026 </tr>
3027 <tr>
3028 <td class="define_keyword">#define</td>
3029 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-PKCS-USE-PBES2-GOST-CPA:CAPS" title="GNUTLS_PKCS_USE_PBES2_GOST_CPA">GNUTLS_PKCS_USE_PBES2_GOST_CPA</a></td>
3030 </tr>
3031 <tr>
3032 <td class="define_keyword">#define</td>
3033 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-PKCS-USE-PBES2-GOST-CPB:CAPS" title="GNUTLS_PKCS_USE_PBES2_GOST_CPB">GNUTLS_PKCS_USE_PBES2_GOST_CPB</a></td>
3034 </tr>
3035 <tr>
3036 <td class="define_keyword">#define</td>
3037 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-PKCS-USE-PBES2-GOST-CPC:CAPS" title="GNUTLS_PKCS_USE_PBES2_GOST_CPC">GNUTLS_PKCS_USE_PBES2_GOST_CPC</a></td>
3038 </tr>
3039 <tr>
3040 <td class="define_keyword">#define</td>
3041 <td class="function_name"><a class="link" href="gnutls-x509.html#GNUTLS-PKCS-USE-PBES2-GOST-CPD:CAPS" title="GNUTLS_PKCS_USE_PBES2_GOST_CPD">GNUTLS_PKCS_USE_PBES2_GOST_CPD</a></td>
3042 </tr>
3043 <tr>
3044 <td class="datatype_keyword">enum</td>
3045 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-keygen-types-t" title="enum gnutls_keygen_types_t">gnutls_keygen_types_t</a></td>
3046 </tr>
3047 <tr>
3048 <td class="datatype_keyword"> </td>
3049 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-keygen-data-st" title="gnutls_keygen_data_st">gnutls_keygen_data_st</a></td>
3050 </tr>
3051 <tr>
3052 <td class="typedef_keyword">typedef</td>
3053 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t">gnutls_x509_trust_list_t</a></td>
3054 </tr>
3055 <tr>
3056 <td class="typedef_keyword">typedef</td>
3057 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-iter-t" title="gnutls_x509_trust_list_iter_t">gnutls_x509_trust_list_iter_t</a></td>
3058 </tr>
3059 <tr>
3060 <td class="datatype_keyword">enum</td>
3061 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-trust-list-flags-t" title="enum gnutls_trust_list_flags_t">gnutls_trust_list_flags_t</a></td>
3062 </tr>
3063 <tr>
3064 <td class="datatype_keyword"> </td>
3065 <td class="function_name"><a class="link" href="gnutls-x509.html#gnutls-x509-ext-st" title="gnutls_x509_ext_st">gnutls_x509_ext_st</a></td>
3066 </tr>
3067 </tbody>
3068 </table></div>
3069 </div>
3070 <div class="refsect1">
3071 <a name="gnutls-x509.description"></a><h2>Description</h2>
3072 </div>
3073 <div class="refsect1">
3074 <a name="gnutls-x509.functions_details"></a><h2>Functions</h2>
3075 <div class="refsect2">
3076 <a name="gnutls-x509-crt-init"></a><h3>gnutls_x509_crt_init ()</h3>
3077 <pre class="programlisting"><span class="returnvalue">int</span>
3078 gnutls_x509_crt_init (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *cert</code></em>);</pre>
3079 <p>This function will initialize an X.509 certificate structure.</p>
3080 <div class="refsect3">
3081 <a name="gnutls-x509-crt-init.parameters"></a><h4>Parameters</h4>
3082 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3083 <colgroup>
3084 <col width="150px" class="parameters_name">
3085 <col class="parameters_description">
3086 <col width="200px" class="parameters_annotations">
3087 </colgroup>
3088 <tbody><tr>
3089 <td class="parameter_name"><p>cert</p></td>
3090 <td class="parameter_description"><p>A pointer to the type to be initialized</p></td>
3091 <td class="parameter_annotations"> </td>
3092 </tr></tbody>
3093 </table></div>
3094 </div>
3095 <div class="refsect3">
3096 <a name="gnutls-x509-crt-init.returns"></a><h4>Returns</h4>
3097 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
3098 negative error value.</p>
3099 </div>
3100 </div>
3101 <hr>
3102 <div class="refsect2">
3103 <a name="gnutls-x509-crt-deinit"></a><h3>gnutls_x509_crt_deinit ()</h3>
3104 <pre class="programlisting"><span class="returnvalue">void</span>
3105 gnutls_x509_crt_deinit (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>);</pre>
3106 <p>This function will deinitialize a certificate structure.</p>
3107 <div class="refsect3">
3108 <a name="gnutls-x509-crt-deinit.parameters"></a><h4>Parameters</h4>
3109 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3110 <colgroup>
3111 <col width="150px" class="parameters_name">
3112 <col class="parameters_description">
3113 <col width="200px" class="parameters_annotations">
3114 </colgroup>
3115 <tbody><tr>
3116 <td class="parameter_name"><p>cert</p></td>
3117 <td class="parameter_description"><p>The data to be deinitialized</p></td>
3118 <td class="parameter_annotations"> </td>
3119 </tr></tbody>
3120 </table></div>
3121 </div>
3122 </div>
3123 <hr>
3124 <div class="refsect2">
3125 <a name="gnutls-x509-crt-set-flags"></a><h3>gnutls_x509_crt_set_flags ()</h3>
3126 <pre class="programlisting"><span class="returnvalue">void</span>
3127 gnutls_x509_crt_set_flags (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
3128 <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre>
3129 <p>This function will set flags for the specified certificate.
3130 Currently this is useful for the <a class="link" href="gnutls-x509.html#GNUTLS-X509-CRT-FLAG-IGNORE-SANITY:CAPS"><code class="literal">GNUTLS_X509_CRT_FLAG_IGNORE_SANITY</code></a>
3131 which allows importing certificates even if they have known issues.</p>
3132 <div class="refsect3">
3133 <a name="gnutls-x509-crt-set-flags.parameters"></a><h4>Parameters</h4>
3134 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3135 <colgroup>
3136 <col width="150px" class="parameters_name">
3137 <col class="parameters_description">
3138 <col width="200px" class="parameters_annotations">
3139 </colgroup>
3140 <tbody>
3141 <tr>
3142 <td class="parameter_name"><p>cert</p></td>
3143 <td class="parameter_description"><p>A type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
3144 <td class="parameter_annotations"> </td>
3145 </tr>
3146 <tr>
3147 <td class="parameter_name"><p>flags</p></td>
3148 <td class="parameter_description"><p>flags from the <a class="link" href="gnutls-x509.html#gnutls-x509-crt-flags" title="enum gnutls_x509_crt_flags"><code class="literal">gnutls_x509_crt_flags</code></a></p></td>
3149 <td class="parameter_annotations"> </td>
3150 </tr>
3151 </tbody>
3152 </table></div>
3153 </div>
3154 <p class="since">Since: 3.6.0</p>
3155 </div>
3156 <hr>
3157 <div class="refsect2">
3158 <a name="gnutls-x509-crt-equals"></a><h3>gnutls_x509_crt_equals ()</h3>
3159 <pre class="programlisting"><span class="returnvalue">unsigned</span>
3160 gnutls_x509_crt_equals (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert1</code></em>,
3161 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert2</code></em>);</pre>
3162 </div>
3163 <hr>
3164 <div class="refsect2">
3165 <a name="gnutls-x509-crt-equals2"></a><h3>gnutls_x509_crt_equals2 ()</h3>
3166 <pre class="programlisting"><span class="returnvalue">unsigned</span>
3167 gnutls_x509_crt_equals2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert1</code></em>,
3168 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *der</code></em>);</pre>
3169 </div>
3170 <hr>
3171 <div class="refsect2">
3172 <a name="gnutls-x509-crt-import"></a><h3>gnutls_x509_crt_import ()</h3>
3173 <pre class="programlisting"><span class="returnvalue">int</span>
3174 gnutls_x509_crt_import (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
3175 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>,
3176 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>);</pre>
3177 <p>This function will convert the given DER or PEM encoded Certificate
3178 to the native gnutls_x509_crt_t format. The output will be stored
3179 in <em class="parameter"><code>cert</code></em>
3180 .</p>
3181 <p>If the Certificate is PEM encoded it should have a header of "X509
3182 CERTIFICATE", or "CERTIFICATE".</p>
3183 <div class="refsect3">
3184 <a name="gnutls-x509-crt-import.parameters"></a><h4>Parameters</h4>
3185 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3186 <colgroup>
3187 <col width="150px" class="parameters_name">
3188 <col class="parameters_description">
3189 <col width="200px" class="parameters_annotations">
3190 </colgroup>
3191 <tbody>
3192 <tr>
3193 <td class="parameter_name"><p>cert</p></td>
3194 <td class="parameter_description"><p>The data to store the parsed certificate.</p></td>
3195 <td class="parameter_annotations"> </td>
3196 </tr>
3197 <tr>
3198 <td class="parameter_name"><p>data</p></td>
3199 <td class="parameter_description"><p>The DER or PEM encoded certificate.</p></td>
3200 <td class="parameter_annotations"> </td>
3201 </tr>
3202 <tr>
3203 <td class="parameter_name"><p>format</p></td>
3204 <td class="parameter_description"><p>One of DER or PEM</p></td>
3205 <td class="parameter_annotations"> </td>
3206 </tr>
3207 </tbody>
3208 </table></div>
3209 </div>
3210 <div class="refsect3">
3211 <a name="gnutls-x509-crt-import.returns"></a><h4>Returns</h4>
3212 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
3213 negative error value.</p>
3214 </div>
3215 </div>
3216 <hr>
3217 <div class="refsect2">
3218 <a name="gnutls-x509-crt-list-import2"></a><h3>gnutls_x509_crt_list_import2 ()</h3>
3219 <pre class="programlisting"><span class="returnvalue">int</span>
3220 gnutls_x509_crt_list_import2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> **certs</code></em>,
3221 <em class="parameter"><code>unsigned <span class="type">int</span> *size</code></em>,
3222 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>,
3223 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
3224 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
3225 <p>This function will convert the given PEM encoded certificate list
3226 to the native gnutls_x509_crt_t format. The output will be stored
3227 in <em class="parameter"><code>certs</code></em>
3228 which will be allocated and initialized.</p>
3229 <p>If the Certificate is PEM encoded it should have a header of "X509
3230 CERTIFICATE", or "CERTIFICATE".</p>
3231 <p>To deinitialize <em class="parameter"><code>certs</code></em>
3232 , you need to deinitialize each crt structure
3233 independently, and use <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a> at <em class="parameter"><code>certs</code></em>
3234 .</p>
3235 <div class="refsect3">
3236 <a name="gnutls-x509-crt-list-import2.parameters"></a><h4>Parameters</h4>
3237 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3238 <colgroup>
3239 <col width="150px" class="parameters_name">
3240 <col class="parameters_description">
3241 <col width="200px" class="parameters_annotations">
3242 </colgroup>
3243 <tbody>
3244 <tr>
3245 <td class="parameter_name"><p>certs</p></td>
3246 <td class="parameter_description"><p>Will hold the parsed certificate list.</p></td>
3247 <td class="parameter_annotations"> </td>
3248 </tr>
3249 <tr>
3250 <td class="parameter_name"><p>size</p></td>
3251 <td class="parameter_description"><p>It will contain the size of the list.</p></td>
3252 <td class="parameter_annotations"> </td>
3253 </tr>
3254 <tr>
3255 <td class="parameter_name"><p>data</p></td>
3256 <td class="parameter_description"><p>The PEM encoded certificate.</p></td>
3257 <td class="parameter_annotations"> </td>
3258 </tr>
3259 <tr>
3260 <td class="parameter_name"><p>format</p></td>
3261 <td class="parameter_description"><p>One of DER or PEM.</p></td>
3262 <td class="parameter_annotations"> </td>
3263 </tr>
3264 <tr>
3265 <td class="parameter_name"><p>flags</p></td>
3266 <td class="parameter_description"><p>must be (0) or an OR'd sequence of gnutls_certificate_import_flags.</p></td>
3267 <td class="parameter_annotations"> </td>
3268 </tr>
3269 </tbody>
3270 </table></div>
3271 </div>
3272 <div class="refsect3">
3273 <a name="gnutls-x509-crt-list-import2.returns"></a><h4>Returns</h4>
3274 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p>
3275 </div>
3276 <p class="since">Since: 3.0</p>
3277 </div>
3278 <hr>
3279 <div class="refsect2">
3280 <a name="gnutls-x509-crt-list-import"></a><h3>gnutls_x509_crt_list_import ()</h3>
3281 <pre class="programlisting"><span class="returnvalue">int</span>
3282 gnutls_x509_crt_list_import (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *certs</code></em>,
3283 <em class="parameter"><code>unsigned <span class="type">int</span> *cert_max</code></em>,
3284 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>,
3285 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
3286 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
3287 <p>This function will convert the given PEM encoded certificate list
3288 to the native gnutls_x509_crt_t format. The output will be stored
3289 in <em class="parameter"><code>certs</code></em>
3290 . They will be automatically initialized.</p>
3291 <p>The flag <a class="link" href="gnutls-x509.html#GNUTLS-X509-CRT-LIST-IMPORT-FAIL-IF-EXCEED:CAPS"><code class="literal">GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED</code></a> will cause
3292 import to fail if the certificates in the provided buffer are more
3293 than the available structures. The <a class="link" href="gnutls-x509.html#GNUTLS-X509-CRT-LIST-FAIL-IF-UNSORTED:CAPS"><code class="literal">GNUTLS_X509_CRT_LIST_FAIL_IF_UNSORTED</code></a>
3294 flag will cause the function to fail if the provided list is not
3295 sorted from subject to issuer.</p>
3296 <p>If the Certificate is PEM encoded it should have a header of "X509
3297 CERTIFICATE", or "CERTIFICATE".</p>
3298 <div class="refsect3">
3299 <a name="gnutls-x509-crt-list-import.parameters"></a><h4>Parameters</h4>
3300 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3301 <colgroup>
3302 <col width="150px" class="parameters_name">
3303 <col class="parameters_description">
3304 <col width="200px" class="parameters_annotations">
3305 </colgroup>
3306 <tbody>
3307 <tr>
3308 <td class="parameter_name"><p>certs</p></td>
3309 <td class="parameter_description"><p>Indicates where the parsed list will be copied to. Must not be initialized.</p></td>
3310 <td class="parameter_annotations"> </td>
3311 </tr>
3312 <tr>
3313 <td class="parameter_name"><p>cert_max</p></td>
3314 <td class="parameter_description"><p>Initially must hold the maximum number of certs. It will be updated with the number of certs available.</p></td>
3315 <td class="parameter_annotations"> </td>
3316 </tr>
3317 <tr>
3318 <td class="parameter_name"><p>data</p></td>
3319 <td class="parameter_description"><p>The PEM encoded certificate.</p></td>
3320 <td class="parameter_annotations"> </td>
3321 </tr>
3322 <tr>
3323 <td class="parameter_name"><p>format</p></td>
3324 <td class="parameter_description"><p>One of DER or PEM.</p></td>
3325 <td class="parameter_annotations"> </td>
3326 </tr>
3327 <tr>
3328 <td class="parameter_name"><p>flags</p></td>
3329 <td class="parameter_description"><p>must be (0) or an OR'd sequence of gnutls_certificate_import_flags.</p></td>
3330 <td class="parameter_annotations"> </td>
3331 </tr>
3332 </tbody>
3333 </table></div>
3334 </div>
3335 <div class="refsect3">
3336 <a name="gnutls-x509-crt-list-import.returns"></a><h4>Returns</h4>
3337 <p> the number of certificates read or a negative error value.</p>
3338 </div>
3339 </div>
3340 <hr>
3341 <div class="refsect2">
3342 <a name="gnutls-x509-crt-import-url"></a><h3>gnutls_x509_crt_import_url ()</h3>
3343 <pre class="programlisting"><span class="returnvalue">int</span>
3344 gnutls_x509_crt_import_url (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
3345 <em class="parameter"><code>const <span class="type">char</span> *url</code></em>,
3346 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
3347 <p>This function will import a certificate present in a PKCS<span class="type">11</span> token
3348 or any type of back-end that supports URLs.</p>
3349 <p>In previous versions of gnutls this function was named
3350 gnutls_x509_crt_import_pkcs11_url, and the old name is
3351 an alias to this one.</p>
3352 <div class="refsect3">
3353 <a name="gnutls-x509-crt-import-url.parameters"></a><h4>Parameters</h4>
3354 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3355 <colgroup>
3356 <col width="150px" class="parameters_name">
3357 <col class="parameters_description">
3358 <col width="200px" class="parameters_annotations">
3359 </colgroup>
3360 <tbody>
3361 <tr>
3362 <td class="parameter_name"><p>crt</p></td>
3363 <td class="parameter_description"><p>A certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
3364 <td class="parameter_annotations"> </td>
3365 </tr>
3366 <tr>
3367 <td class="parameter_name"><p>url</p></td>
3368 <td class="parameter_description"><p>A PKCS 11 url</p></td>
3369 <td class="parameter_annotations"> </td>
3370 </tr>
3371 <tr>
3372 <td class="parameter_name"><p>flags</p></td>
3373 <td class="parameter_description"><p>One of GNUTLS_PKCS11_OBJ_* flags for PKCS<span class="type">11</span> URLs or zero otherwise</p></td>
3374 <td class="parameter_annotations"> </td>
3375 </tr>
3376 </tbody>
3377 </table></div>
3378 </div>
3379 <div class="refsect3">
3380 <a name="gnutls-x509-crt-import-url.returns"></a><h4>Returns</h4>
3381 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
3382 negative error value.</p>
3383 </div>
3384 <p class="since">Since: 3.4.0</p>
3385 </div>
3386 <hr>
3387 <div class="refsect2">
3388 <a name="gnutls-x509-crt-list-import-url"></a><h3>gnutls_x509_crt_list_import_url ()</h3>
3389 <pre class="programlisting"><span class="returnvalue">int</span>
3390 gnutls_x509_crt_list_import_url (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> **certs</code></em>,
3391 <em class="parameter"><code>unsigned <span class="type">int</span> *size</code></em>,
3392 <em class="parameter"><code>const <span class="type">char</span> *url</code></em>,
3393 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pin-callback-t" title="gnutls_pin_callback_t ()"><span class="type">gnutls_pin_callback_t</span></a> pin_fn</code></em>,
3394 <em class="parameter"><code><span class="type">void</span> *pin_fn_userdata</code></em>,
3395 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
3396 <p>This function will import a certificate chain present in a PKCS<span class="type">11</span> token
3397 or any type of back-end that supports URLs. The certificates
3398 must be deinitialized afterwards using <a class="link" href="gnutls-x509.html#gnutls-x509-crt-deinit" title="gnutls_x509_crt_deinit ()"><code class="function">gnutls_x509_crt_deinit()</code></a>
3399 and the returned pointer must be freed using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p>
3400 <p>The URI provided must be the first certificate in the chain; subsequent
3401 certificates will be retrieved using <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-get-raw-issuer" title="gnutls_pkcs11_get_raw_issuer ()"><code class="function">gnutls_pkcs11_get_raw_issuer()</code></a> or
3402 equivalent functionality for the supported URI.</p>
3403 <div class="refsect3">
3404 <a name="gnutls-x509-crt-list-import-url.parameters"></a><h4>Parameters</h4>
3405 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3406 <colgroup>
3407 <col width="150px" class="parameters_name">
3408 <col class="parameters_description">
3409 <col width="200px" class="parameters_annotations">
3410 </colgroup>
3411 <tbody>
3412 <tr>
3413 <td class="parameter_name"><p>certs</p></td>
3414 <td class="parameter_description"><p>Will hold the allocated certificate list.</p></td>
3415 <td class="parameter_annotations"> </td>
3416 </tr>
3417 <tr>
3418 <td class="parameter_name"><p>size</p></td>
3419 <td class="parameter_description"><p>It will contain the size of the list.</p></td>
3420 <td class="parameter_annotations"> </td>
3421 </tr>
3422 <tr>
3423 <td class="parameter_name"><p>url</p></td>
3424 <td class="parameter_description"><p>A PKCS 11 url</p></td>
3425 <td class="parameter_annotations"> </td>
3426 </tr>
3427 <tr>
3428 <td class="parameter_name"><p>pin_fn</p></td>
3429 <td class="parameter_description"><p>a PIN callback if not globally set</p></td>
3430 <td class="parameter_annotations"> </td>
3431 </tr>
3432 <tr>
3433 <td class="parameter_name"><p>pin_fn_userdata</p></td>
3434 <td class="parameter_description"><p>parameter for the PIN callback</p></td>
3435 <td class="parameter_annotations"> </td>
3436 </tr>
3437 <tr>
3438 <td class="parameter_name"><p>flags</p></td>
3439 <td class="parameter_description"><p>One of GNUTLS_PKCS11_OBJ_* flags for PKCS<span class="type">11</span> URLs or zero otherwise</p></td>
3440 <td class="parameter_annotations"> </td>
3441 </tr>
3442 </tbody>
3443 </table></div>
3444 </div>
3445 <div class="refsect3">
3446 <a name="gnutls-x509-crt-list-import-url.returns"></a><h4>Returns</h4>
3447 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
3448 negative error value.</p>
3449 </div>
3450 <p class="since">Since: 3.6.3</p>
3451 </div>
3452 <hr>
3453 <div class="refsect2">
3454 <a name="gnutls-x509-crt-export"></a><h3>gnutls_x509_crt_export ()</h3>
3455 <pre class="programlisting"><span class="returnvalue">int</span>
3456 gnutls_x509_crt_export (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
3457 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
3458 <em class="parameter"><code><span class="type">void</span> *output_data</code></em>,
3459 <em class="parameter"><code><span class="type">size_t</span> *output_data_size</code></em>);</pre>
3460 <p>This function will export the certificate to DER or PEM format.</p>
3461 <p>If the buffer provided is not long enough to hold the output, then
3462 *output_data_size is updated and GNUTLS_E_SHORT_MEMORY_BUFFER will
3463 be returned.</p>
3464 <p>If the structure is PEM encoded, it will have a header
3465 of "BEGIN CERTIFICATE".</p>
3466 <div class="refsect3">
3467 <a name="gnutls-x509-crt-export.parameters"></a><h4>Parameters</h4>
3468 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3469 <colgroup>
3470 <col width="150px" class="parameters_name">
3471 <col class="parameters_description">
3472 <col width="200px" class="parameters_annotations">
3473 </colgroup>
3474 <tbody>
3475 <tr>
3476 <td class="parameter_name"><p>cert</p></td>
3477 <td class="parameter_description"><p>Holds the certificate</p></td>
3478 <td class="parameter_annotations"> </td>
3479 </tr>
3480 <tr>
3481 <td class="parameter_name"><p>format</p></td>
3482 <td class="parameter_description"><p>the format of output params. One of PEM or DER.</p></td>
3483 <td class="parameter_annotations"> </td>
3484 </tr>
3485 <tr>
3486 <td class="parameter_name"><p>output_data</p></td>
3487 <td class="parameter_description"><p>will contain a certificate PEM or DER encoded</p></td>
3488 <td class="parameter_annotations"> </td>
3489 </tr>
3490 <tr>
3491 <td class="parameter_name"><p>output_data_size</p></td>
3492 <td class="parameter_description"><p>holds the size of output_data (and will be
3493 replaced by the actual size of parameters)</p></td>
3494 <td class="parameter_annotations"> </td>
3495 </tr>
3496 </tbody>
3497 </table></div>
3498 </div>
3499 <div class="refsect3">
3500 <a name="gnutls-x509-crt-export.returns"></a><h4>Returns</h4>
3501 <p> In case of failure a negative error code will be
3502 returned, and 0 on success.</p>
3503 </div>
3504 </div>
3505 <hr>
3506 <div class="refsect2">
3507 <a name="gnutls-x509-crt-export2"></a><h3>gnutls_x509_crt_export2 ()</h3>
3508 <pre class="programlisting"><span class="returnvalue">int</span>
3509 gnutls_x509_crt_export2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
3510 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
3511 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>);</pre>
3512 <p>This function will export the certificate to DER or PEM format.
3513 The output buffer is allocated using <code class="function">gnutls_malloc()</code>.</p>
3514 <p>If the structure is PEM encoded, it will have a header
3515 of "BEGIN CERTIFICATE".</p>
3516 <div class="refsect3">
3517 <a name="gnutls-x509-crt-export2.parameters"></a><h4>Parameters</h4>
3518 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3519 <colgroup>
3520 <col width="150px" class="parameters_name">
3521 <col class="parameters_description">
3522 <col width="200px" class="parameters_annotations">
3523 </colgroup>
3524 <tbody>
3525 <tr>
3526 <td class="parameter_name"><p>cert</p></td>
3527 <td class="parameter_description"><p>Holds the certificate</p></td>
3528 <td class="parameter_annotations"> </td>
3529 </tr>
3530 <tr>
3531 <td class="parameter_name"><p>format</p></td>
3532 <td class="parameter_description"><p>the format of output params. One of PEM or DER.</p></td>
3533 <td class="parameter_annotations"> </td>
3534 </tr>
3535 <tr>
3536 <td class="parameter_name"><p>out</p></td>
3537 <td class="parameter_description"><p>will contain a certificate PEM or DER encoded</p></td>
3538 <td class="parameter_annotations"> </td>
3539 </tr>
3540 </tbody>
3541 </table></div>
3542 </div>
3543 <div class="refsect3">
3544 <a name="gnutls-x509-crt-export2.returns"></a><h4>Returns</h4>
3545 <p> In case of failure a negative error code will be
3546 returned, and 0 on success.</p>
3547 </div>
3548 <p class="since">Since: 3.1.3</p>
3549 </div>
3550 <hr>
3551 <div class="refsect2">
3552 <a name="gnutls-x509-crt-get-private-key-usage-period"></a><h3>gnutls_x509_crt_get_private_key_usage_period ()</h3>
3553 <pre class="programlisting"><span class="returnvalue">int</span>
3554 gnutls_x509_crt_get_private_key_usage_period
3555 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
3556 <em class="parameter"><code><span class="type">time_t</span> *activation</code></em>,
3557 <em class="parameter"><code><span class="type">time_t</span> *expiration</code></em>,
3558 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
3559 <p>This function will return the expiration and activation
3560 times of the private key of the certificate. It relies on
3561 the PKIX extension 2.5.29.16 being present.</p>
3562 <div class="refsect3">
3563 <a name="gnutls-x509-crt-get-private-key-usage-period.parameters"></a><h4>Parameters</h4>
3564 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3565 <colgroup>
3566 <col width="150px" class="parameters_name">
3567 <col class="parameters_description">
3568 <col width="200px" class="parameters_annotations">
3569 </colgroup>
3570 <tbody>
3571 <tr>
3572 <td class="parameter_name"><p>cert</p></td>
3573 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
3574 <td class="parameter_annotations"> </td>
3575 </tr>
3576 <tr>
3577 <td class="parameter_name"><p>activation</p></td>
3578 <td class="parameter_description"><p>The activation time</p></td>
3579 <td class="parameter_annotations"> </td>
3580 </tr>
3581 <tr>
3582 <td class="parameter_name"><p>expiration</p></td>
3583 <td class="parameter_description"><p>The expiration time</p></td>
3584 <td class="parameter_annotations"> </td>
3585 </tr>
3586 <tr>
3587 <td class="parameter_name"><p>critical</p></td>
3588 <td class="parameter_description"><p>the extension status</p></td>
3589 <td class="parameter_annotations"> </td>
3590 </tr>
3591 </tbody>
3592 </table></div>
3593 </div>
3594 <div class="refsect3">
3595 <a name="gnutls-x509-crt-get-private-key-usage-period.returns"></a><h4>Returns</h4>
3596 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
3597 if the extension is not present, otherwise a negative error value.</p>
3598 </div>
3599 </div>
3600 <hr>
3601 <div class="refsect2">
3602 <a name="gnutls-x509-crt-get-issuer-dn"></a><h3>gnutls_x509_crt_get_issuer_dn ()</h3>
3603 <pre class="programlisting"><span class="returnvalue">int</span>
3604 gnutls_x509_crt_get_issuer_dn (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
3605 <em class="parameter"><code><span class="type">char</span> *buf</code></em>,
3606 <em class="parameter"><code><span class="type">size_t</span> *buf_size</code></em>);</pre>
3607 <p>This function will copy the name of the Certificate issuer in the
3608 provided buffer. The name will be in the form
3609 "C=xxxx,O=yyyy,CN=zzzz" as described in RFC4514. The output string
3610 will be ASCII or UTF-8 encoded, depending on the certificate data.</p>
3611 <p>If <em class="parameter"><code>buf</code></em>
3612 is null then only the size will be filled.</p>
3613 <p>This function does not output a fully RFC4514 compliant string, if
3614 that is required see <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-issuer-dn3" title="gnutls_x509_crt_get_issuer_dn3 ()"><code class="function">gnutls_x509_crt_get_issuer_dn3()</code></a>.</p>
3615 <div class="refsect3">
3616 <a name="gnutls-x509-crt-get-issuer-dn.parameters"></a><h4>Parameters</h4>
3617 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3618 <colgroup>
3619 <col width="150px" class="parameters_name">
3620 <col class="parameters_description">
3621 <col width="200px" class="parameters_annotations">
3622 </colgroup>
3623 <tbody>
3624 <tr>
3625 <td class="parameter_name"><p>cert</p></td>
3626 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
3627 <td class="parameter_annotations"> </td>
3628 </tr>
3629 <tr>
3630 <td class="parameter_name"><p>buf</p></td>
3631 <td class="parameter_description"><p>a pointer to a structure to hold the name (may be null)</p></td>
3632 <td class="parameter_annotations"> </td>
3633 </tr>
3634 <tr>
3635 <td class="parameter_name"><p>buf_size</p></td>
3636 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>buf</code></em>
3637 </p></td>
3638 <td class="parameter_annotations"> </td>
3639 </tr>
3640 </tbody>
3641 </table></div>
3642 </div>
3643 <div class="refsect3">
3644 <a name="gnutls-x509-crt-get-issuer-dn.returns"></a><h4>Returns</h4>
3645 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the provided buffer is not
3646 long enough, and in that case the <em class="parameter"><code>buf_size</code></em>
3647 will be updated
3648 with the required size. <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> if
3649 the DN does not exist, or another error value on error. On success 0 is returned.</p>
3650 </div>
3651 </div>
3652 <hr>
3653 <div class="refsect2">
3654 <a name="gnutls-x509-crt-get-issuer-dn2"></a><h3>gnutls_x509_crt_get_issuer_dn2 ()</h3>
3655 <pre class="programlisting"><span class="returnvalue">int</span>
3656 gnutls_x509_crt_get_issuer_dn2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
3657 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *dn</code></em>);</pre>
3658 <p>This function will allocate buffer and copy the name of issuer of the Certificate.
3659 The name will be in the form "C=xxxx,O=yyyy,CN=zzzz" as
3660 described in RFC4514. The output string will be ASCII or UTF-8
3661 encoded, depending on the certificate data.</p>
3662 <p>This function does not output a fully RFC4514 compliant string, if
3663 that is required see <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-issuer-dn3" title="gnutls_x509_crt_get_issuer_dn3 ()"><code class="function">gnutls_x509_crt_get_issuer_dn3()</code></a>.</p>
3664 <div class="refsect3">
3665 <a name="gnutls-x509-crt-get-issuer-dn2.parameters"></a><h4>Parameters</h4>
3666 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3667 <colgroup>
3668 <col width="150px" class="parameters_name">
3669 <col class="parameters_description">
3670 <col width="200px" class="parameters_annotations">
3671 </colgroup>
3672 <tbody>
3673 <tr>
3674 <td class="parameter_name"><p>cert</p></td>
3675 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
3676 <td class="parameter_annotations"> </td>
3677 </tr>
3678 <tr>
3679 <td class="parameter_name"><p>dn</p></td>
3680 <td class="parameter_description"><p>a pointer to a structure to hold the name; must be freed using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a></p></td>
3681 <td class="parameter_annotations"> </td>
3682 </tr>
3683 </tbody>
3684 </table></div>
3685 </div>
3686 <div class="refsect3">
3687 <a name="gnutls-x509-crt-get-issuer-dn2.returns"></a><h4>Returns</h4>
3688 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
3689 negative error value.</p>
3690 </div>
3691 <p class="since">Since: 3.1.10</p>
3692 </div>
3693 <hr>
3694 <div class="refsect2">
3695 <a name="gnutls-x509-crt-get-issuer-dn3"></a><h3>gnutls_x509_crt_get_issuer_dn3 ()</h3>
3696 <pre class="programlisting"><span class="returnvalue">int</span>
3697 gnutls_x509_crt_get_issuer_dn3 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
3698 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *dn</code></em>,
3699 <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre>
3700 <p>This function will allocate buffer and copy the name of issuer of the Certificate.
3701 The name will be in the form "C=xxxx,O=yyyy,CN=zzzz" as
3702 described in RFC4514. The output string will be ASCII or UTF-8
3703 encoded, depending on the certificate data.</p>
3704 <p>When the flag <a class="link" href="gnutls-x509.html#GNUTLS-X509-DN-FLAG-COMPAT:CAPS" title="GNUTLS_X509_DN_FLAG_COMPAT"><code class="literal">GNUTLS_X509_DN_FLAG_COMPAT</code></a> is specified, the output
3705 format will match the format output by previous to 3.5.6 versions of GnuTLS
3706 which was not not fully RFC4514-compliant.</p>
3707 <div class="refsect3">
3708 <a name="gnutls-x509-crt-get-issuer-dn3.parameters"></a><h4>Parameters</h4>
3709 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3710 <colgroup>
3711 <col width="150px" class="parameters_name">
3712 <col class="parameters_description">
3713 <col width="200px" class="parameters_annotations">
3714 </colgroup>
3715 <tbody>
3716 <tr>
3717 <td class="parameter_name"><p>cert</p></td>
3718 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
3719 <td class="parameter_annotations"> </td>
3720 </tr>
3721 <tr>
3722 <td class="parameter_name"><p>dn</p></td>
3723 <td class="parameter_description"><p>a pointer to a structure to hold the name; must be freed using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a></p></td>
3724 <td class="parameter_annotations"> </td>
3725 </tr>
3726 <tr>
3727 <td class="parameter_name"><p>flags</p></td>
3728 <td class="parameter_description"><p>zero or <a class="link" href="gnutls-x509.html#GNUTLS-X509-DN-FLAG-COMPAT:CAPS" title="GNUTLS_X509_DN_FLAG_COMPAT"><code class="literal">GNUTLS_X509_DN_FLAG_COMPAT</code></a></p></td>
3729 <td class="parameter_annotations"> </td>
3730 </tr>
3731 </tbody>
3732 </table></div>
3733 </div>
3734 <div class="refsect3">
3735 <a name="gnutls-x509-crt-get-issuer-dn3.returns"></a><h4>Returns</h4>
3736 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
3737 negative error value.</p>
3738 </div>
3739 <p class="since">Since: 3.5.7</p>
3740 </div>
3741 <hr>
3742 <div class="refsect2">
3743 <a name="gnutls-x509-crt-get-issuer-dn-oid"></a><h3>gnutls_x509_crt_get_issuer_dn_oid ()</h3>
3744 <pre class="programlisting"><span class="returnvalue">int</span>
3745 gnutls_x509_crt_get_issuer_dn_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
3746 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
3747 <em class="parameter"><code><span class="type">void</span> *oid</code></em>,
3748 <em class="parameter"><code><span class="type">size_t</span> *oid_size</code></em>);</pre>
3749 <p>This function will extract the OIDs of the name of the Certificate
3750 issuer specified by the given index.</p>
3751 <p>If <em class="parameter"><code>oid</code></em>
3752 is null then only the size will be filled. The <em class="parameter"><code>oid</code></em>
3753
3754 returned will be null terminated, although <em class="parameter"><code>oid_size</code></em>
3755 will not
3756 account for the trailing null.</p>
3757 <div class="refsect3">
3758 <a name="gnutls-x509-crt-get-issuer-dn-oid.parameters"></a><h4>Parameters</h4>
3759 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3760 <colgroup>
3761 <col width="150px" class="parameters_name">
3762 <col class="parameters_description">
3763 <col width="200px" class="parameters_annotations">
3764 </colgroup>
3765 <tbody>
3766 <tr>
3767 <td class="parameter_name"><p>cert</p></td>
3768 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
3769 <td class="parameter_annotations"> </td>
3770 </tr>
3771 <tr>
3772 <td class="parameter_name"><p>indx</p></td>
3773 <td class="parameter_description"><p>This specifies which OID to return. Use (0) to get the first one.</p></td>
3774 <td class="parameter_annotations"> </td>
3775 </tr>
3776 <tr>
3777 <td class="parameter_name"><p>oid</p></td>
3778 <td class="parameter_description"><p>a pointer to a buffer to hold the OID (may be null)</p></td>
3779 <td class="parameter_annotations"> </td>
3780 </tr>
3781 <tr>
3782 <td class="parameter_name"><p>oid_size</p></td>
3783 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>oid</code></em>
3784 </p></td>
3785 <td class="parameter_annotations"> </td>
3786 </tr>
3787 </tbody>
3788 </table></div>
3789 </div>
3790 <div class="refsect3">
3791 <a name="gnutls-x509-crt-get-issuer-dn-oid.returns"></a><h4>Returns</h4>
3792 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the provided buffer is not
3793 long enough, and in that case the <em class="parameter"><code>buf_size</code></em>
3794 will be updated with
3795 the required size. <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> if there
3796 are no data in the current index. On success 0 is returned.</p>
3797 </div>
3798 </div>
3799 <hr>
3800 <div class="refsect2">
3801 <a name="gnutls-x509-crt-get-issuer-dn-by-oid"></a><h3>gnutls_x509_crt_get_issuer_dn_by_oid ()</h3>
3802 <pre class="programlisting"><span class="returnvalue">int</span>
3803 gnutls_x509_crt_get_issuer_dn_by_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
3804 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
3805 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
3806 <em class="parameter"><code>unsigned <span class="type">int</span> raw_flag</code></em>,
3807 <em class="parameter"><code><span class="type">void</span> *buf</code></em>,
3808 <em class="parameter"><code><span class="type">size_t</span> *buf_size</code></em>);</pre>
3809 <p>This function will extract the part of the name of the Certificate
3810 issuer specified by the given OID. The output, if the raw flag is not
3811 used, will be encoded as described in RFC4514. Thus a string that is
3812 ASCII or UTF-8 encoded, depending on the certificate data.</p>
3813 <p>Some helper macros with popular OIDs can be found in gnutls/x509.h
3814 If raw flag is (0), this function will only return known OIDs as
3815 text. Other OIDs will be DER encoded, as described in RFC4514 --
3816 in hex format with a '#' prefix. You can check about known OIDs
3817 using <a class="link" href="gnutls-x509.html#gnutls-x509-dn-oid-known" title="gnutls_x509_dn_oid_known ()"><code class="function">gnutls_x509_dn_oid_known()</code></a>.</p>
3818 <p>If <em class="parameter"><code>buf</code></em>
3819 is null then only the size will be filled. If the <em class="parameter"><code>raw_flag</code></em>
3820
3821 is not specified the output is always null terminated, although the
3822 <em class="parameter"><code>buf_size</code></em>
3823 will not include the null character.</p>
3824 <div class="refsect3">
3825 <a name="gnutls-x509-crt-get-issuer-dn-by-oid.parameters"></a><h4>Parameters</h4>
3826 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3827 <colgroup>
3828 <col width="150px" class="parameters_name">
3829 <col class="parameters_description">
3830 <col width="200px" class="parameters_annotations">
3831 </colgroup>
3832 <tbody>
3833 <tr>
3834 <td class="parameter_name"><p>cert</p></td>
3835 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
3836 <td class="parameter_annotations"> </td>
3837 </tr>
3838 <tr>
3839 <td class="parameter_name"><p>oid</p></td>
3840 <td class="parameter_description"><p>holds an Object Identified in null terminated string</p></td>
3841 <td class="parameter_annotations"> </td>
3842 </tr>
3843 <tr>
3844 <td class="parameter_name"><p>indx</p></td>
3845 <td class="parameter_description"><p>In case multiple same OIDs exist in the RDN, this specifies which to send. Use (0) to get the first one.</p></td>
3846 <td class="parameter_annotations"> </td>
3847 </tr>
3848 <tr>
3849 <td class="parameter_name"><p>raw_flag</p></td>
3850 <td class="parameter_description"><p>If non-zero returns the raw DER data of the DN part.</p></td>
3851 <td class="parameter_annotations"> </td>
3852 </tr>
3853 <tr>
3854 <td class="parameter_name"><p>buf</p></td>
3855 <td class="parameter_description"><p>a pointer to a structure to hold the name (may be null)</p></td>
3856 <td class="parameter_annotations"> </td>
3857 </tr>
3858 <tr>
3859 <td class="parameter_name"><p>buf_size</p></td>
3860 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>buf</code></em>
3861 </p></td>
3862 <td class="parameter_annotations"> </td>
3863 </tr>
3864 </tbody>
3865 </table></div>
3866 </div>
3867 <div class="refsect3">
3868 <a name="gnutls-x509-crt-get-issuer-dn-by-oid.returns"></a><h4>Returns</h4>
3869 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the provided buffer is not
3870 long enough, and in that case the <em class="parameter"><code>buf_size</code></em>
3871 will be updated with
3872 the required size. <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> if there
3873 are no data in the current index. On success 0 is returned.</p>
3874 </div>
3875 </div>
3876 <hr>
3877 <div class="refsect2">
3878 <a name="gnutls-x509-crt-get-dn"></a><h3>gnutls_x509_crt_get_dn ()</h3>
3879 <pre class="programlisting"><span class="returnvalue">int</span>
3880 gnutls_x509_crt_get_dn (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
3881 <em class="parameter"><code><span class="type">char</span> *buf</code></em>,
3882 <em class="parameter"><code><span class="type">size_t</span> *buf_size</code></em>);</pre>
3883 <p>This function will copy the name of the Certificate in the provided
3884 buffer. The name will be in the form "C=xxxx,O=yyyy,CN=zzzz" as
3885 described in RFC4514. The output string will be ASCII or UTF-8
3886 encoded, depending on the certificate data.</p>
3887 <p>The <em class="parameter"><code>buf</code></em>
3888 returned will be null terminated and the <em class="parameter"><code>buf_size</code></em>
3889 will account
3890 for the trailing null. If <em class="parameter"><code>buf</code></em>
3891 is null then only the size will be filled.</p>
3892 <p>This function does not output a fully RFC4514 compliant string, if
3893 that is required see <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-dn3" title="gnutls_x509_crt_get_dn3 ()"><code class="function">gnutls_x509_crt_get_dn3()</code></a>.</p>
3894 <div class="refsect3">
3895 <a name="gnutls-x509-crt-get-dn.parameters"></a><h4>Parameters</h4>
3896 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3897 <colgroup>
3898 <col width="150px" class="parameters_name">
3899 <col class="parameters_description">
3900 <col width="200px" class="parameters_annotations">
3901 </colgroup>
3902 <tbody>
3903 <tr>
3904 <td class="parameter_name"><p>cert</p></td>
3905 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
3906 <td class="parameter_annotations"> </td>
3907 </tr>
3908 <tr>
3909 <td class="parameter_name"><p>buf</p></td>
3910 <td class="parameter_description"><p>a pointer to a structure to hold the name (may be null)</p></td>
3911 <td class="parameter_annotations"> </td>
3912 </tr>
3913 <tr>
3914 <td class="parameter_name"><p>buf_size</p></td>
3915 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>buf</code></em>
3916 </p></td>
3917 <td class="parameter_annotations"> </td>
3918 </tr>
3919 </tbody>
3920 </table></div>
3921 </div>
3922 <div class="refsect3">
3923 <a name="gnutls-x509-crt-get-dn.returns"></a><h4>Returns</h4>
3924 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the provided buffer is not
3925 long enough, and in that case the <em class="parameter"><code>buf_size</code></em>
3926 will be updated
3927 with the required size. <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> if
3928 the DN does not exist, or another error value on error. On success 0 is returned.</p>
3929 </div>
3930 </div>
3931 <hr>
3932 <div class="refsect2">
3933 <a name="gnutls-x509-crt-get-dn2"></a><h3>gnutls_x509_crt_get_dn2 ()</h3>
3934 <pre class="programlisting"><span class="returnvalue">int</span>
3935 gnutls_x509_crt_get_dn2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
3936 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *dn</code></em>);</pre>
3937 <p>This function will allocate buffer and copy the name of the Certificate.
3938 The name will be in the form "C=xxxx,O=yyyy,CN=zzzz" as
3939 described in RFC4514. The output string will be ASCII or UTF-8
3940 encoded, depending on the certificate data.</p>
3941 <p>This function does not output a fully RFC4514 compliant string, if
3942 that is required see <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-dn3" title="gnutls_x509_crt_get_dn3 ()"><code class="function">gnutls_x509_crt_get_dn3()</code></a>.</p>
3943 <div class="refsect3">
3944 <a name="gnutls-x509-crt-get-dn2.parameters"></a><h4>Parameters</h4>
3945 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3946 <colgroup>
3947 <col width="150px" class="parameters_name">
3948 <col class="parameters_description">
3949 <col width="200px" class="parameters_annotations">
3950 </colgroup>
3951 <tbody>
3952 <tr>
3953 <td class="parameter_name"><p>cert</p></td>
3954 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
3955 <td class="parameter_annotations"> </td>
3956 </tr>
3957 <tr>
3958 <td class="parameter_name"><p>dn</p></td>
3959 <td class="parameter_description"><p>a pointer to a structure to hold the name; must be freed using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a></p></td>
3960 <td class="parameter_annotations"> </td>
3961 </tr>
3962 </tbody>
3963 </table></div>
3964 </div>
3965 <div class="refsect3">
3966 <a name="gnutls-x509-crt-get-dn2.returns"></a><h4>Returns</h4>
3967 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
3968 negative error value.</p>
3969 </div>
3970 <p class="since">Since: 3.1.10</p>
3971 </div>
3972 <hr>
3973 <div class="refsect2">
3974 <a name="gnutls-x509-crt-get-dn3"></a><h3>gnutls_x509_crt_get_dn3 ()</h3>
3975 <pre class="programlisting"><span class="returnvalue">int</span>
3976 gnutls_x509_crt_get_dn3 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
3977 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *dn</code></em>,
3978 <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre>
3979 <p>This function will allocate buffer and copy the name of the Certificate.
3980 The name will be in the form "C=xxxx,O=yyyy,CN=zzzz" as
3981 described in RFC4514. The output string will be ASCII or UTF-8
3982 encoded, depending on the certificate data.</p>
3983 <p>When the flag <a class="link" href="gnutls-x509.html#GNUTLS-X509-DN-FLAG-COMPAT:CAPS" title="GNUTLS_X509_DN_FLAG_COMPAT"><code class="literal">GNUTLS_X509_DN_FLAG_COMPAT</code></a> is specified, the output
3984 format will match the format output by previous to 3.5.6 versions of GnuTLS
3985 which was not not fully RFC4514-compliant.</p>
3986 <div class="refsect3">
3987 <a name="gnutls-x509-crt-get-dn3.parameters"></a><h4>Parameters</h4>
3988 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3989 <colgroup>
3990 <col width="150px" class="parameters_name">
3991 <col class="parameters_description">
3992 <col width="200px" class="parameters_annotations">
3993 </colgroup>
3994 <tbody>
3995 <tr>
3996 <td class="parameter_name"><p>cert</p></td>
3997 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
3998 <td class="parameter_annotations"> </td>
3999 </tr>
4000 <tr>
4001 <td class="parameter_name"><p>dn</p></td>
4002 <td class="parameter_description"><p>a pointer to a structure to hold the name; must be freed using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a></p></td>
4003 <td class="parameter_annotations"> </td>
4004 </tr>
4005 <tr>
4006 <td class="parameter_name"><p>flags</p></td>
4007 <td class="parameter_description"><p>zero or <a class="link" href="gnutls-x509.html#GNUTLS-X509-DN-FLAG-COMPAT:CAPS" title="GNUTLS_X509_DN_FLAG_COMPAT"><code class="literal">GNUTLS_X509_DN_FLAG_COMPAT</code></a></p></td>
4008 <td class="parameter_annotations"> </td>
4009 </tr>
4010 </tbody>
4011 </table></div>
4012 </div>
4013 <div class="refsect3">
4014 <a name="gnutls-x509-crt-get-dn3.returns"></a><h4>Returns</h4>
4015 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
4016 negative error value.</p>
4017 </div>
4018 <p class="since">Since: 3.5.7</p>
4019 </div>
4020 <hr>
4021 <div class="refsect2">
4022 <a name="gnutls-x509-crt-get-dn-oid"></a><h3>gnutls_x509_crt_get_dn_oid ()</h3>
4023 <pre class="programlisting"><span class="returnvalue">int</span>
4024 gnutls_x509_crt_get_dn_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
4025 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
4026 <em class="parameter"><code><span class="type">void</span> *oid</code></em>,
4027 <em class="parameter"><code><span class="type">size_t</span> *oid_size</code></em>);</pre>
4028 <p>This function will extract the OIDs of the name of the Certificate
4029 subject specified by the given index.</p>
4030 <p>If <em class="parameter"><code>oid</code></em>
4031 is null then only the size will be filled. The <em class="parameter"><code>oid</code></em>
4032
4033 returned will be null terminated, although <em class="parameter"><code>oid_size</code></em>
4034 will not
4035 account for the trailing null.</p>
4036 <div class="refsect3">
4037 <a name="gnutls-x509-crt-get-dn-oid.parameters"></a><h4>Parameters</h4>
4038 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4039 <colgroup>
4040 <col width="150px" class="parameters_name">
4041 <col class="parameters_description">
4042 <col width="200px" class="parameters_annotations">
4043 </colgroup>
4044 <tbody>
4045 <tr>
4046 <td class="parameter_name"><p>cert</p></td>
4047 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
4048 <td class="parameter_annotations"> </td>
4049 </tr>
4050 <tr>
4051 <td class="parameter_name"><p>indx</p></td>
4052 <td class="parameter_description"><p>This specifies which OID to return. Use (0) to get the first one.</p></td>
4053 <td class="parameter_annotations"> </td>
4054 </tr>
4055 <tr>
4056 <td class="parameter_name"><p>oid</p></td>
4057 <td class="parameter_description"><p>a pointer to a buffer to hold the OID (may be null)</p></td>
4058 <td class="parameter_annotations"> </td>
4059 </tr>
4060 <tr>
4061 <td class="parameter_name"><p>oid_size</p></td>
4062 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>oid</code></em>
4063 </p></td>
4064 <td class="parameter_annotations"> </td>
4065 </tr>
4066 </tbody>
4067 </table></div>
4068 </div>
4069 <div class="refsect3">
4070 <a name="gnutls-x509-crt-get-dn-oid.returns"></a><h4>Returns</h4>
4071 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the provided buffer is not
4072 long enough, and in that case the <em class="parameter"><code>buf_size</code></em>
4073 will be updated with
4074 the required size. <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> if there
4075 are no data in the current index. On success 0 is returned.</p>
4076 </div>
4077 </div>
4078 <hr>
4079 <div class="refsect2">
4080 <a name="gnutls-x509-crt-get-dn-by-oid"></a><h3>gnutls_x509_crt_get_dn_by_oid ()</h3>
4081 <pre class="programlisting"><span class="returnvalue">int</span>
4082 gnutls_x509_crt_get_dn_by_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
4083 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
4084 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
4085 <em class="parameter"><code>unsigned <span class="type">int</span> raw_flag</code></em>,
4086 <em class="parameter"><code><span class="type">void</span> *buf</code></em>,
4087 <em class="parameter"><code><span class="type">size_t</span> *buf_size</code></em>);</pre>
4088 <p>This function will extract the part of the name of the Certificate
4089 subject specified by the given OID. The output, if the raw flag is
4090 not used, will be encoded as described in RFC4514. Thus a string
4091 that is ASCII or UTF-8 encoded, depending on the certificate data.</p>
4092 <p>Some helper macros with popular OIDs can be found in gnutls/x509.h
4093 If raw flag is (0), this function will only return known OIDs as
4094 text. Other OIDs will be DER encoded, as described in RFC4514 --
4095 in hex format with a '#' prefix. You can check about known OIDs
4096 using <a class="link" href="gnutls-x509.html#gnutls-x509-dn-oid-known" title="gnutls_x509_dn_oid_known ()"><code class="function">gnutls_x509_dn_oid_known()</code></a>.</p>
4097 <p>If <em class="parameter"><code>buf</code></em>
4098 is null then only the size will be filled. If the <em class="parameter"><code>raw_flag</code></em>
4099
4100 is not specified the output is always null terminated, although the
4101 <em class="parameter"><code>buf_size</code></em>
4102 will not include the null character.</p>
4103 <div class="refsect3">
4104 <a name="gnutls-x509-crt-get-dn-by-oid.parameters"></a><h4>Parameters</h4>
4105 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4106 <colgroup>
4107 <col width="150px" class="parameters_name">
4108 <col class="parameters_description">
4109 <col width="200px" class="parameters_annotations">
4110 </colgroup>
4111 <tbody>
4112 <tr>
4113 <td class="parameter_name"><p>cert</p></td>
4114 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
4115 <td class="parameter_annotations"> </td>
4116 </tr>
4117 <tr>
4118 <td class="parameter_name"><p>oid</p></td>
4119 <td class="parameter_description"><p>holds an Object Identified in null terminated string</p></td>
4120 <td class="parameter_annotations"> </td>
4121 </tr>
4122 <tr>
4123 <td class="parameter_name"><p>indx</p></td>
4124 <td class="parameter_description"><p>In case multiple same OIDs exist in the RDN, this specifies which to send. Use (0) to get the first one.</p></td>
4125 <td class="parameter_annotations"> </td>
4126 </tr>
4127 <tr>
4128 <td class="parameter_name"><p>raw_flag</p></td>
4129 <td class="parameter_description"><p>If non-zero returns the raw DER data of the DN part.</p></td>
4130 <td class="parameter_annotations"> </td>
4131 </tr>
4132 <tr>
4133 <td class="parameter_name"><p>buf</p></td>
4134 <td class="parameter_description"><p>a pointer where the DN part will be copied (may be null).</p></td>
4135 <td class="parameter_annotations"> </td>
4136 </tr>
4137 <tr>
4138 <td class="parameter_name"><p>buf_size</p></td>
4139 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>buf</code></em>
4140 </p></td>
4141 <td class="parameter_annotations"> </td>
4142 </tr>
4143 </tbody>
4144 </table></div>
4145 </div>
4146 <div class="refsect3">
4147 <a name="gnutls-x509-crt-get-dn-by-oid.returns"></a><h4>Returns</h4>
4148 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the provided buffer is not
4149 long enough, and in that case the <em class="parameter"><code>buf_size</code></em>
4150 will be updated with
4151 the required size. <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> if there
4152 are no data in the current index. On success 0 is returned.</p>
4153 </div>
4154 </div>
4155 <hr>
4156 <div class="refsect2">
4157 <a name="gnutls-x509-crt-check-hostname"></a><h3>gnutls_x509_crt_check_hostname ()</h3>
4158 <pre class="programlisting"><span class="returnvalue">unsigned</span>
4159 gnutls_x509_crt_check_hostname (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
4160 <em class="parameter"><code>const <span class="type">char</span> *hostname</code></em>);</pre>
4161 <p>This function will check if the given certificate's subject matches
4162 the given hostname. This is a basic implementation of the matching
4163 described in RFC6125, and takes into account wildcards,
4164 and the DNSName/IPAddress subject alternative name PKIX extension.</p>
4165 <p>For details see also <a class="link" href="gnutls-x509.html#gnutls-x509-crt-check-hostname2" title="gnutls_x509_crt_check_hostname2 ()"><code class="function">gnutls_x509_crt_check_hostname2()</code></a>.</p>
4166 <div class="refsect3">
4167 <a name="gnutls-x509-crt-check-hostname.parameters"></a><h4>Parameters</h4>
4168 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4169 <colgroup>
4170 <col width="150px" class="parameters_name">
4171 <col class="parameters_description">
4172 <col width="200px" class="parameters_annotations">
4173 </colgroup>
4174 <tbody>
4175 <tr>
4176 <td class="parameter_name"><p>cert</p></td>
4177 <td class="parameter_description"><p>should contain an gnutls_x509_crt_t type</p></td>
4178 <td class="parameter_annotations"> </td>
4179 </tr>
4180 <tr>
4181 <td class="parameter_name"><p>hostname</p></td>
4182 <td class="parameter_description"><p>A null terminated string that contains a DNS name</p></td>
4183 <td class="parameter_annotations"> </td>
4184 </tr>
4185 </tbody>
4186 </table></div>
4187 </div>
4188 <div class="refsect3">
4189 <a name="gnutls-x509-crt-check-hostname.returns"></a><h4>Returns</h4>
4190 <p> non-zero for a successful match, and zero on failure.</p>
4191 </div>
4192 </div>
4193 <hr>
4194 <div class="refsect2">
4195 <a name="gnutls-x509-crt-check-hostname2"></a><h3>gnutls_x509_crt_check_hostname2 ()</h3>
4196 <pre class="programlisting"><span class="returnvalue">unsigned</span>
4197 gnutls_x509_crt_check_hostname2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
4198 <em class="parameter"><code>const <span class="type">char</span> *hostname</code></em>,
4199 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
4200 <p>This function will check if the given certificate's subject matches
4201 the given hostname. This is a basic implementation of the matching
4202 described in RFC6125, and takes into account wildcards,
4203 and the DNSName/IPAddress subject alternative name PKIX extension.</p>
4204 <p>IPv4 addresses are accepted by this function in the dotted-decimal
4205 format (e.g, ddd.ddd.ddd.ddd), and IPv6 addresses in the hexadecimal
4206 x:x:x:x:x:x:x:x format. For them the IPAddress subject alternative
4207 name extension is consulted. Previous versions to 3.6.0 of GnuTLS
4208 in case of a non-match would consult (in a non-standard extension)
4209 the DNSname and CN fields. This is no longer the case.</p>
4210 <p>When the flag <a class="link" href="gnutls-x509.html#GNUTLS-VERIFY-DO-NOT-ALLOW-WILDCARDS:CAPS"><code class="literal">GNUTLS_VERIFY_DO_NOT_ALLOW_WILDCARDS</code></a> is specified no
4211 wildcards are considered. Otherwise they are only considered if the
4212 domain name consists of three components or more, and the wildcard
4213 starts at the leftmost position.</p>
4214 <p>When the flag <a class="link" href="gnutls-x509.html#GNUTLS-VERIFY-DO-NOT-ALLOW-IP-MATCHES:CAPS"><code class="literal">GNUTLS_VERIFY_DO_NOT_ALLOW_IP_MATCHES</code></a> is specified,
4215 the input will be treated as a DNS name, and matching of textual IP addresses
4216 against the IPAddress part of the alternative name will not be allowed.</p>
4217 <p>The function <a class="link" href="gnutls-x509.html#gnutls-x509-crt-check-ip" title="gnutls_x509_crt_check_ip ()"><code class="function">gnutls_x509_crt_check_ip()</code></a> is available for matching
4218 IP addresses.</p>
4219 <div class="refsect3">
4220 <a name="gnutls-x509-crt-check-hostname2.parameters"></a><h4>Parameters</h4>
4221 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4222 <colgroup>
4223 <col width="150px" class="parameters_name">
4224 <col class="parameters_description">
4225 <col width="200px" class="parameters_annotations">
4226 </colgroup>
4227 <tbody>
4228 <tr>
4229 <td class="parameter_name"><p>cert</p></td>
4230 <td class="parameter_description"><p>should contain an gnutls_x509_crt_t type</p></td>
4231 <td class="parameter_annotations"> </td>
4232 </tr>
4233 <tr>
4234 <td class="parameter_name"><p>hostname</p></td>
4235 <td class="parameter_description"><p>A null terminated string that contains a DNS name</p></td>
4236 <td class="parameter_annotations"> </td>
4237 </tr>
4238 <tr>
4239 <td class="parameter_name"><p>flags</p></td>
4240 <td class="parameter_description"><p>gnutls_certificate_verify_flags</p></td>
4241 <td class="parameter_annotations"> </td>
4242 </tr>
4243 </tbody>
4244 </table></div>
4245 </div>
4246 <div class="refsect3">
4247 <a name="gnutls-x509-crt-check-hostname2.returns"></a><h4>Returns</h4>
4248 <p> non-zero for a successful match, and zero on failure.</p>
4249 </div>
4250 <p class="since">Since: 3.3.0</p>
4251 </div>
4252 <hr>
4253 <div class="refsect2">
4254 <a name="gnutls-x509-crt-check-email"></a><h3>gnutls_x509_crt_check_email ()</h3>
4255 <pre class="programlisting"><span class="returnvalue">unsigned</span>
4256 gnutls_x509_crt_check_email (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
4257 <em class="parameter"><code>const <span class="type">char</span> *email</code></em>,
4258 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
4259 <p>This function will check if the given certificate's subject matches
4260 the given email address.</p>
4261 <div class="refsect3">
4262 <a name="gnutls-x509-crt-check-email.parameters"></a><h4>Parameters</h4>
4263 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4264 <colgroup>
4265 <col width="150px" class="parameters_name">
4266 <col class="parameters_description">
4267 <col width="200px" class="parameters_annotations">
4268 </colgroup>
4269 <tbody>
4270 <tr>
4271 <td class="parameter_name"><p>cert</p></td>
4272 <td class="parameter_description"><p>should contain an gnutls_x509_crt_t type</p></td>
4273 <td class="parameter_annotations"> </td>
4274 </tr>
4275 <tr>
4276 <td class="parameter_name"><p>email</p></td>
4277 <td class="parameter_description"><p>A null terminated string that contains an email address (RFC822)</p></td>
4278 <td class="parameter_annotations"> </td>
4279 </tr>
4280 <tr>
4281 <td class="parameter_name"><p>flags</p></td>
4282 <td class="parameter_description"><p>should be zero</p></td>
4283 <td class="parameter_annotations"> </td>
4284 </tr>
4285 </tbody>
4286 </table></div>
4287 </div>
4288 <div class="refsect3">
4289 <a name="gnutls-x509-crt-check-email.returns"></a><h4>Returns</h4>
4290 <p> non-zero for a successful match, and zero on failure.</p>
4291 </div>
4292 </div>
4293 <hr>
4294 <div class="refsect2">
4295 <a name="gnutls-x509-crt-check-ip"></a><h3>gnutls_x509_crt_check_ip ()</h3>
4296 <pre class="programlisting"><span class="returnvalue">unsigned</span>
4297 gnutls_x509_crt_check_ip (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
4298 <em class="parameter"><code>const unsigned <span class="type">char</span> *ip</code></em>,
4299 <em class="parameter"><code>unsigned <span class="type">int</span> ip_size</code></em>,
4300 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
4301 <p>This function will check if the IP allowed IP addresses in
4302 the certificate's subject alternative name match the provided
4303 IP address.</p>
4304 <div class="refsect3">
4305 <a name="gnutls-x509-crt-check-ip.parameters"></a><h4>Parameters</h4>
4306 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4307 <colgroup>
4308 <col width="150px" class="parameters_name">
4309 <col class="parameters_description">
4310 <col width="200px" class="parameters_annotations">
4311 </colgroup>
4312 <tbody>
4313 <tr>
4314 <td class="parameter_name"><p>cert</p></td>
4315 <td class="parameter_description"><p>should contain an gnutls_x509_crt_t type</p></td>
4316 <td class="parameter_annotations"> </td>
4317 </tr>
4318 <tr>
4319 <td class="parameter_name"><p>ip</p></td>
4320 <td class="parameter_description"><p>A pointer to the raw IP address</p></td>
4321 <td class="parameter_annotations"> </td>
4322 </tr>
4323 <tr>
4324 <td class="parameter_name"><p>ip_size</p></td>
4325 <td class="parameter_description"><p>the number of bytes in ip (4 or 16)</p></td>
4326 <td class="parameter_annotations"> </td>
4327 </tr>
4328 <tr>
4329 <td class="parameter_name"><p>flags</p></td>
4330 <td class="parameter_description"><p>should be zero</p></td>
4331 <td class="parameter_annotations"> </td>
4332 </tr>
4333 </tbody>
4334 </table></div>
4335 </div>
4336 <div class="refsect3">
4337 <a name="gnutls-x509-crt-check-ip.returns"></a><h4>Returns</h4>
4338 <p> non-zero for a successful match, and zero on failure.</p>
4339 </div>
4340 </div>
4341 <hr>
4342 <div class="refsect2">
4343 <a name="gnutls-x509-crt-get-signature-algorithm"></a><h3>gnutls_x509_crt_get_signature_algorithm ()</h3>
4344 <pre class="programlisting"><span class="returnvalue">int</span>
4345 gnutls_x509_crt_get_signature_algorithm
4346 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>);</pre>
4347 <p>This function will return a value of the <a class="link" href="gnutls-gnutls.html#gnutls-sign-algorithm-t" title="enum gnutls_sign_algorithm_t"><span class="type">gnutls_sign_algorithm_t</span></a>
4348 enumeration that is the signature algorithm that has been used to
4349 sign this certificate.</p>
4350 <p>Since 3.6.0 this function never returns a negative error code.
4351 Error cases and unknown/unsupported signature algorithms are
4352 mapped to <a class="link" href="gnutls-gnutls.html#GNUTLS-SIGN-UNKNOWN:CAPS"><code class="literal">GNUTLS_SIGN_UNKNOWN</code></a>.</p>
4353 <div class="refsect3">
4354 <a name="gnutls-x509-crt-get-signature-algorithm.parameters"></a><h4>Parameters</h4>
4355 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4356 <colgroup>
4357 <col width="150px" class="parameters_name">
4358 <col class="parameters_description">
4359 <col width="200px" class="parameters_annotations">
4360 </colgroup>
4361 <tbody><tr>
4362 <td class="parameter_name"><p>cert</p></td>
4363 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
4364 <td class="parameter_annotations"> </td>
4365 </tr></tbody>
4366 </table></div>
4367 </div>
4368 <div class="refsect3">
4369 <a name="gnutls-x509-crt-get-signature-algorithm.returns"></a><h4>Returns</h4>
4370 <p> a <a class="link" href="gnutls-gnutls.html#gnutls-sign-algorithm-t" title="enum gnutls_sign_algorithm_t"><span class="type">gnutls_sign_algorithm_t</span></a> value</p>
4371 </div>
4372 </div>
4373 <hr>
4374 <div class="refsect2">
4375 <a name="gnutls-x509-crt-get-signature"></a><h3>gnutls_x509_crt_get_signature ()</h3>
4376 <pre class="programlisting"><span class="returnvalue">int</span>
4377 gnutls_x509_crt_get_signature (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
4378 <em class="parameter"><code><span class="type">char</span> *sig</code></em>,
4379 <em class="parameter"><code><span class="type">size_t</span> *sizeof_sig</code></em>);</pre>
4380 <p>This function will extract the signature field of a certificate.</p>
4381 <div class="refsect3">
4382 <a name="gnutls-x509-crt-get-signature.parameters"></a><h4>Parameters</h4>
4383 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4384 <colgroup>
4385 <col width="150px" class="parameters_name">
4386 <col class="parameters_description">
4387 <col width="200px" class="parameters_annotations">
4388 </colgroup>
4389 <tbody>
4390 <tr>
4391 <td class="parameter_name"><p>cert</p></td>
4392 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
4393 <td class="parameter_annotations"> </td>
4394 </tr>
4395 <tr>
4396 <td class="parameter_name"><p>sig</p></td>
4397 <td class="parameter_description"><p>a pointer where the signature part will be copied (may be null).</p></td>
4398 <td class="parameter_annotations"> </td>
4399 </tr>
4400 <tr>
4401 <td class="parameter_name"><p>sig_size</p></td>
4402 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>sig</code></em>
4403 </p></td>
4404 <td class="parameter_annotations"> </td>
4405 </tr>
4406 </tbody>
4407 </table></div>
4408 </div>
4409 <div class="refsect3">
4410 <a name="gnutls-x509-crt-get-signature.returns"></a><h4>Returns</h4>
4411 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
4412 negative error value.</p>
4413 </div>
4414 </div>
4415 <hr>
4416 <div class="refsect2">
4417 <a name="gnutls-x509-crt-get-version"></a><h3>gnutls_x509_crt_get_version ()</h3>
4418 <pre class="programlisting"><span class="returnvalue">int</span>
4419 gnutls_x509_crt_get_version (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>);</pre>
4420 <p>This function will return the version of the specified Certificate.</p>
4421 <div class="refsect3">
4422 <a name="gnutls-x509-crt-get-version.parameters"></a><h4>Parameters</h4>
4423 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4424 <colgroup>
4425 <col width="150px" class="parameters_name">
4426 <col class="parameters_description">
4427 <col width="200px" class="parameters_annotations">
4428 </colgroup>
4429 <tbody><tr>
4430 <td class="parameter_name"><p>cert</p></td>
4431 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
4432 <td class="parameter_annotations"> </td>
4433 </tr></tbody>
4434 </table></div>
4435 </div>
4436 <div class="refsect3">
4437 <a name="gnutls-x509-crt-get-version.returns"></a><h4>Returns</h4>
4438 <p> version of certificate, or a negative error code on error.</p>
4439 </div>
4440 </div>
4441 <hr>
4442 <div class="refsect2">
4443 <a name="gnutls-x509-crt-get-pk-oid"></a><h3>gnutls_x509_crt_get_pk_oid ()</h3>
4444 <pre class="programlisting"><span class="returnvalue">int</span>
4445 gnutls_x509_crt_get_pk_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
4446 <em class="parameter"><code><span class="type">char</span> *oid</code></em>,
4447 <em class="parameter"><code><span class="type">size_t</span> *oid_size</code></em>);</pre>
4448 <p>This function will return the OID of the public key algorithm
4449 on that certificate. This is function
4450 is useful in the case <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-pk-algorithm" title="gnutls_x509_crt_get_pk_algorithm ()"><code class="function">gnutls_x509_crt_get_pk_algorithm()</code></a>
4451 returned <a class="link" href="gnutls-gnutls.html#GNUTLS-PK-UNKNOWN:CAPS"><code class="literal">GNUTLS_PK_UNKNOWN</code></a>.</p>
4452 <div class="refsect3">
4453 <a name="gnutls-x509-crt-get-pk-oid.parameters"></a><h4>Parameters</h4>
4454 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4455 <colgroup>
4456 <col width="150px" class="parameters_name">
4457 <col class="parameters_description">
4458 <col width="200px" class="parameters_annotations">
4459 </colgroup>
4460 <tbody>
4461 <tr>
4462 <td class="parameter_name"><p>cert</p></td>
4463 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
4464 <td class="parameter_annotations"> </td>
4465 </tr>
4466 <tr>
4467 <td class="parameter_name"><p>oid</p></td>
4468 <td class="parameter_description"><p>a pointer to a buffer to hold the OID (may be null)</p></td>
4469 <td class="parameter_annotations"> </td>
4470 </tr>
4471 <tr>
4472 <td class="parameter_name"><p>oid_size</p></td>
4473 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>oid</code></em>
4474 </p></td>
4475 <td class="parameter_annotations"> </td>
4476 </tr>
4477 </tbody>
4478 </table></div>
4479 </div>
4480 <div class="refsect3">
4481 <a name="gnutls-x509-crt-get-pk-oid.returns"></a><h4>Returns</h4>
4482 <p> zero or a negative error code on error.</p>
4483 </div>
4484 <p class="since">Since: 3.5.0</p>
4485 </div>
4486 <hr>
4487 <div class="refsect2">
4488 <a name="gnutls-x509-crt-get-signature-oid"></a><h3>gnutls_x509_crt_get_signature_oid ()</h3>
4489 <pre class="programlisting"><span class="returnvalue">int</span>
4490 gnutls_x509_crt_get_signature_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
4491 <em class="parameter"><code><span class="type">char</span> *oid</code></em>,
4492 <em class="parameter"><code><span class="type">size_t</span> *oid_size</code></em>);</pre>
4493 <p>This function will return the OID of the signature algorithm
4494 that has been used to sign this certificate. This is function
4495 is useful in the case <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-signature-algorithm" title="gnutls_x509_crt_get_signature_algorithm ()"><code class="function">gnutls_x509_crt_get_signature_algorithm()</code></a>
4496 returned <a class="link" href="gnutls-gnutls.html#GNUTLS-SIGN-UNKNOWN:CAPS"><code class="literal">GNUTLS_SIGN_UNKNOWN</code></a>.</p>
4497 <div class="refsect3">
4498 <a name="gnutls-x509-crt-get-signature-oid.parameters"></a><h4>Parameters</h4>
4499 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4500 <colgroup>
4501 <col width="150px" class="parameters_name">
4502 <col class="parameters_description">
4503 <col width="200px" class="parameters_annotations">
4504 </colgroup>
4505 <tbody>
4506 <tr>
4507 <td class="parameter_name"><p>cert</p></td>
4508 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
4509 <td class="parameter_annotations"> </td>
4510 </tr>
4511 <tr>
4512 <td class="parameter_name"><p>oid</p></td>
4513 <td class="parameter_description"><p>a pointer to a buffer to hold the OID (may be null)</p></td>
4514 <td class="parameter_annotations"> </td>
4515 </tr>
4516 <tr>
4517 <td class="parameter_name"><p>oid_size</p></td>
4518 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>oid</code></em>
4519 </p></td>
4520 <td class="parameter_annotations"> </td>
4521 </tr>
4522 </tbody>
4523 </table></div>
4524 </div>
4525 <div class="refsect3">
4526 <a name="gnutls-x509-crt-get-signature-oid.returns"></a><h4>Returns</h4>
4527 <p> zero or a negative error code on error.</p>
4528 </div>
4529 <p class="since">Since: 3.5.0</p>
4530 </div>
4531 <hr>
4532 <div class="refsect2">
4533 <a name="gnutls-x509-crt-get-key-id"></a><h3>gnutls_x509_crt_get_key_id ()</h3>
4534 <pre class="programlisting"><span class="returnvalue">int</span>
4535 gnutls_x509_crt_get_key_id (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
4536 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
4537 <em class="parameter"><code>unsigned <span class="type">char</span> *output_data</code></em>,
4538 <em class="parameter"><code><span class="type">size_t</span> *output_data_size</code></em>);</pre>
4539 <p>This function will return a unique ID that depends on the public
4540 key parameters. This ID can be used in checking whether a
4541 certificate corresponds to the given private key.</p>
4542 <p>If the buffer provided is not long enough to hold the output, then
4543 *output_data_size is updated and GNUTLS_E_SHORT_MEMORY_BUFFER will
4544 be returned. The output will normally be a SHA-1 hash output,
4545 which is 20 bytes.</p>
4546 <div class="refsect3">
4547 <a name="gnutls-x509-crt-get-key-id.parameters"></a><h4>Parameters</h4>
4548 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4549 <colgroup>
4550 <col width="150px" class="parameters_name">
4551 <col class="parameters_description">
4552 <col width="200px" class="parameters_annotations">
4553 </colgroup>
4554 <tbody>
4555 <tr>
4556 <td class="parameter_name"><p>crt</p></td>
4557 <td class="parameter_description"><p>Holds the certificate</p></td>
4558 <td class="parameter_annotations"> </td>
4559 </tr>
4560 <tr>
4561 <td class="parameter_name"><p>flags</p></td>
4562 <td class="parameter_description"><p>should be one of the flags from <a class="link" href="gnutls-x509.html#gnutls-keyid-flags-t" title="enum gnutls_keyid_flags_t"><code class="literal">gnutls_keyid_flags_t</code></a></p></td>
4563 <td class="parameter_annotations"> </td>
4564 </tr>
4565 <tr>
4566 <td class="parameter_name"><p>output_data</p></td>
4567 <td class="parameter_description"><p>will contain the key ID</p></td>
4568 <td class="parameter_annotations"> </td>
4569 </tr>
4570 <tr>
4571 <td class="parameter_name"><p>output_data_size</p></td>
4572 <td class="parameter_description"><p>holds the size of output_data (and will be
4573 replaced by the actual size of parameters)</p></td>
4574 <td class="parameter_annotations"> </td>
4575 </tr>
4576 </tbody>
4577 </table></div>
4578 </div>
4579 <div class="refsect3">
4580 <a name="gnutls-x509-crt-get-key-id.returns"></a><h4>Returns</h4>
4581 <p> In case of failure a negative error code will be
4582 returned, and 0 on success.</p>
4583 </div>
4584 </div>
4585 <hr>
4586 <div class="refsect2">
4587 <a name="gnutls-x509-crt-set-private-key-usage-period"></a><h3>gnutls_x509_crt_set_private_key_usage_period ()</h3>
4588 <pre class="programlisting"><span class="returnvalue">int</span>
4589 gnutls_x509_crt_set_private_key_usage_period
4590 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
4591 <em class="parameter"><code><span class="type">time_t</span> activation</code></em>,
4592 <em class="parameter"><code><span class="type">time_t</span> expiration</code></em>);</pre>
4593 <p>This function will set the private key usage period extension (2.5.29.16).</p>
4594 <div class="refsect3">
4595 <a name="gnutls-x509-crt-set-private-key-usage-period.parameters"></a><h4>Parameters</h4>
4596 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4597 <colgroup>
4598 <col width="150px" class="parameters_name">
4599 <col class="parameters_description">
4600 <col width="200px" class="parameters_annotations">
4601 </colgroup>
4602 <tbody>
4603 <tr>
4604 <td class="parameter_name"><p>crt</p></td>
4605 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
4606 <td class="parameter_annotations"> </td>
4607 </tr>
4608 <tr>
4609 <td class="parameter_name"><p>activation</p></td>
4610 <td class="parameter_description"><p>The activation time</p></td>
4611 <td class="parameter_annotations"> </td>
4612 </tr>
4613 <tr>
4614 <td class="parameter_name"><p>expiration</p></td>
4615 <td class="parameter_description"><p>The expiration time</p></td>
4616 <td class="parameter_annotations"> </td>
4617 </tr>
4618 </tbody>
4619 </table></div>
4620 </div>
4621 <div class="refsect3">
4622 <a name="gnutls-x509-crt-set-private-key-usage-period.returns"></a><h4>Returns</h4>
4623 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
4624 negative error value.</p>
4625 </div>
4626 </div>
4627 <hr>
4628 <div class="refsect2">
4629 <a name="gnutls-x509-crt-set-authority-key-id"></a><h3>gnutls_x509_crt_set_authority_key_id ()</h3>
4630 <pre class="programlisting"><span class="returnvalue">int</span>
4631 gnutls_x509_crt_set_authority_key_id (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
4632 <em class="parameter"><code>const <span class="type">void</span> *id</code></em>,
4633 <em class="parameter"><code><span class="type">size_t</span> id_size</code></em>);</pre>
4634 <p>This function will set the X.509 certificate's authority key ID extension.
4635 Only the keyIdentifier field can be set with this function.</p>
4636 <div class="refsect3">
4637 <a name="gnutls-x509-crt-set-authority-key-id.parameters"></a><h4>Parameters</h4>
4638 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4639 <colgroup>
4640 <col width="150px" class="parameters_name">
4641 <col class="parameters_description">
4642 <col width="200px" class="parameters_annotations">
4643 </colgroup>
4644 <tbody>
4645 <tr>
4646 <td class="parameter_name"><p>cert</p></td>
4647 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
4648 <td class="parameter_annotations"> </td>
4649 </tr>
4650 <tr>
4651 <td class="parameter_name"><p>id</p></td>
4652 <td class="parameter_description"><p>The key ID</p></td>
4653 <td class="parameter_annotations"> </td>
4654 </tr>
4655 <tr>
4656 <td class="parameter_name"><p>id_size</p></td>
4657 <td class="parameter_description"><p>Holds the size of the key ID field.</p></td>
4658 <td class="parameter_annotations"> </td>
4659 </tr>
4660 </tbody>
4661 </table></div>
4662 </div>
4663 <div class="refsect3">
4664 <a name="gnutls-x509-crt-set-authority-key-id.returns"></a><h4>Returns</h4>
4665 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
4666 negative error value.</p>
4667 </div>
4668 </div>
4669 <hr>
4670 <div class="refsect2">
4671 <a name="gnutls-x509-crt-get-authority-key-id"></a><h3>gnutls_x509_crt_get_authority_key_id ()</h3>
4672 <pre class="programlisting"><span class="returnvalue">int</span>
4673 gnutls_x509_crt_get_authority_key_id (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
4674 <em class="parameter"><code><span class="type">void</span> *id</code></em>,
4675 <em class="parameter"><code><span class="type">size_t</span> *id_size</code></em>,
4676 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
4677 <p>This function will return the X.509v3 certificate authority's key
4678 identifier. This is obtained by the X.509 Authority Key
4679 identifier extension field (2.5.29.35). Note that this function
4680 only returns the keyIdentifier field of the extension and
4681 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-X509-UNSUPPORTED-EXTENSION:CAPS" title="GNUTLS_E_X509_UNSUPPORTED_EXTENSION"><code class="literal">GNUTLS_E_X509_UNSUPPORTED_EXTENSION</code></a>, if the extension contains
4682 the name and serial number of the certificate. In that case
4683 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-authority-key-gn-serial" title="gnutls_x509_crt_get_authority_key_gn_serial ()"><code class="function">gnutls_x509_crt_get_authority_key_gn_serial()</code></a> may be used.</p>
4684 <div class="refsect3">
4685 <a name="gnutls-x509-crt-get-authority-key-id.parameters"></a><h4>Parameters</h4>
4686 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4687 <colgroup>
4688 <col width="150px" class="parameters_name">
4689 <col class="parameters_description">
4690 <col width="200px" class="parameters_annotations">
4691 </colgroup>
4692 <tbody>
4693 <tr>
4694 <td class="parameter_name"><p>cert</p></td>
4695 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
4696 <td class="parameter_annotations"> </td>
4697 </tr>
4698 <tr>
4699 <td class="parameter_name"><p>id</p></td>
4700 <td class="parameter_description"><p>The place where the identifier will be copied</p></td>
4701 <td class="parameter_annotations"> </td>
4702 </tr>
4703 <tr>
4704 <td class="parameter_name"><p>id_size</p></td>
4705 <td class="parameter_description"><p>Holds the size of the id field.</p></td>
4706 <td class="parameter_annotations"> </td>
4707 </tr>
4708 <tr>
4709 <td class="parameter_name"><p>critical</p></td>
4710 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical (may be null)</p></td>
4711 <td class="parameter_annotations"> </td>
4712 </tr>
4713 </tbody>
4714 </table></div>
4715 </div>
4716 <div class="refsect3">
4717 <a name="gnutls-x509-crt-get-authority-key-id.returns"></a><h4>Returns</h4>
4718 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
4719 if the extension is not present, otherwise a negative error value.</p>
4720 </div>
4721 </div>
4722 <hr>
4723 <div class="refsect2">
4724 <a name="gnutls-x509-crt-get-authority-key-gn-serial"></a><h3>gnutls_x509_crt_get_authority_key_gn_serial ()</h3>
4725 <pre class="programlisting"><span class="returnvalue">int</span>
4726 gnutls_x509_crt_get_authority_key_gn_serial
4727 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
4728 <em class="parameter"><code>unsigned <span class="type">int</span> seq</code></em>,
4729 <em class="parameter"><code><span class="type">void</span> *alt</code></em>,
4730 <em class="parameter"><code><span class="type">size_t</span> *alt_size</code></em>,
4731 <em class="parameter"><code>unsigned <span class="type">int</span> *alt_type</code></em>,
4732 <em class="parameter"><code><span class="type">void</span> *serial</code></em>,
4733 <em class="parameter"><code><span class="type">size_t</span> *serial_size</code></em>,
4734 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
4735 <p>This function will return the X.509 authority key
4736 identifier when stored as a general name (authorityCertIssuer)
4737 and serial number.</p>
4738 <p>Because more than one general names might be stored
4739 <em class="parameter"><code>seq</code></em>
4740 can be used as a counter to request them all until
4741 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> is returned.</p>
4742 <div class="refsect3">
4743 <a name="gnutls-x509-crt-get-authority-key-gn-serial.parameters"></a><h4>Parameters</h4>
4744 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4745 <colgroup>
4746 <col width="150px" class="parameters_name">
4747 <col class="parameters_description">
4748 <col width="200px" class="parameters_annotations">
4749 </colgroup>
4750 <tbody>
4751 <tr>
4752 <td class="parameter_name"><p>cert</p></td>
4753 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
4754 <td class="parameter_annotations"> </td>
4755 </tr>
4756 <tr>
4757 <td class="parameter_name"><p>seq</p></td>
4758 <td class="parameter_description"><p>specifies the sequence number of the alt name (0 for the first one, 1 for the second etc.)</p></td>
4759 <td class="parameter_annotations"> </td>
4760 </tr>
4761 <tr>
4762 <td class="parameter_name"><p>alt</p></td>
4763 <td class="parameter_description"><p>is the place where the alternative name will be copied to</p></td>
4764 <td class="parameter_annotations"> </td>
4765 </tr>
4766 <tr>
4767 <td class="parameter_name"><p>alt_size</p></td>
4768 <td class="parameter_description"><p>holds the size of alt.</p></td>
4769 <td class="parameter_annotations"> </td>
4770 </tr>
4771 <tr>
4772 <td class="parameter_name"><p>alt_type</p></td>
4773 <td class="parameter_description"><p>holds the type of the alternative name (one of gnutls_x509_subject_alt_name_t).</p></td>
4774 <td class="parameter_annotations"> </td>
4775 </tr>
4776 <tr>
4777 <td class="parameter_name"><p>serial</p></td>
4778 <td class="parameter_description"><p>buffer to store the serial number (may be null)</p></td>
4779 <td class="parameter_annotations"> </td>
4780 </tr>
4781 <tr>
4782 <td class="parameter_name"><p>serial_size</p></td>
4783 <td class="parameter_description"><p>Holds the size of the serial field (may be null)</p></td>
4784 <td class="parameter_annotations"> </td>
4785 </tr>
4786 <tr>
4787 <td class="parameter_name"><p>critical</p></td>
4788 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical (may be null)</p></td>
4789 <td class="parameter_annotations"> </td>
4790 </tr>
4791 </tbody>
4792 </table></div>
4793 </div>
4794 <div class="refsect3">
4795 <a name="gnutls-x509-crt-get-authority-key-gn-serial.returns"></a><h4>Returns</h4>
4796 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
4797 if the extension is not present, otherwise a negative error value.</p>
4798 </div>
4799 <p class="since">Since: 3.0</p>
4800 </div>
4801 <hr>
4802 <div class="refsect2">
4803 <a name="gnutls-x509-crt-get-subject-key-id"></a><h3>gnutls_x509_crt_get_subject_key_id ()</h3>
4804 <pre class="programlisting"><span class="returnvalue">int</span>
4805 gnutls_x509_crt_get_subject_key_id (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
4806 <em class="parameter"><code><span class="type">void</span> *ret</code></em>,
4807 <em class="parameter"><code><span class="type">size_t</span> *ret_size</code></em>,
4808 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
4809 <p>This function will return the X.509v3 certificate's subject key
4810 identifier. This is obtained by the X.509 Subject Key identifier
4811 extension field (2.5.29.14).</p>
4812 <div class="refsect3">
4813 <a name="gnutls-x509-crt-get-subject-key-id.parameters"></a><h4>Parameters</h4>
4814 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4815 <colgroup>
4816 <col width="150px" class="parameters_name">
4817 <col class="parameters_description">
4818 <col width="200px" class="parameters_annotations">
4819 </colgroup>
4820 <tbody>
4821 <tr>
4822 <td class="parameter_name"><p>cert</p></td>
4823 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
4824 <td class="parameter_annotations"> </td>
4825 </tr>
4826 <tr>
4827 <td class="parameter_name"><p>ret</p></td>
4828 <td class="parameter_description"><p>The place where the identifier will be copied</p></td>
4829 <td class="parameter_annotations"> </td>
4830 </tr>
4831 <tr>
4832 <td class="parameter_name"><p>ret_size</p></td>
4833 <td class="parameter_description"><p>Holds the size of the result field.</p></td>
4834 <td class="parameter_annotations"> </td>
4835 </tr>
4836 <tr>
4837 <td class="parameter_name"><p>critical</p></td>
4838 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical (may be null)</p></td>
4839 <td class="parameter_annotations"> </td>
4840 </tr>
4841 </tbody>
4842 </table></div>
4843 </div>
4844 <div class="refsect3">
4845 <a name="gnutls-x509-crt-get-subject-key-id.returns"></a><h4>Returns</h4>
4846 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
4847 if the extension is not present, otherwise a negative error value.</p>
4848 </div>
4849 </div>
4850 <hr>
4851 <div class="refsect2">
4852 <a name="gnutls-x509-crt-get-subject-unique-id"></a><h3>gnutls_x509_crt_get_subject_unique_id ()</h3>
4853 <pre class="programlisting"><span class="returnvalue">int</span>
4854 gnutls_x509_crt_get_subject_unique_id (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
4855 <em class="parameter"><code><span class="type">char</span> *buf</code></em>,
4856 <em class="parameter"><code><span class="type">size_t</span> *buf_size</code></em>);</pre>
4857 <p>This function will extract the subjectUniqueID value (if present) for
4858 the given certificate.</p>
4859 <p>If the user allocated memory buffer is not large enough to hold the
4860 full subjectUniqueID, then a GNUTLS_E_SHORT_MEMORY_BUFFER error will be
4861 returned, and buf_size will be set to the actual length.</p>
4862 <p>This function had a bug prior to 3.4.8 that prevented the setting
4863 of <code class="literal">NULL</code> <em class="parameter"><code>buf</code></em>
4864 to discover the <em class="parameter"><code>buf_size</code></em>
4865 . To use this function safely
4866 with the older versions the <em class="parameter"><code>buf</code></em>
4867 must be a valid buffer that can hold
4868 at least a single byte if <em class="parameter"><code>buf_size</code></em>
4869 is zero.</p>
4870 <div class="refsect3">
4871 <a name="gnutls-x509-crt-get-subject-unique-id.parameters"></a><h4>Parameters</h4>
4872 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4873 <colgroup>
4874 <col width="150px" class="parameters_name">
4875 <col class="parameters_description">
4876 <col width="200px" class="parameters_annotations">
4877 </colgroup>
4878 <tbody>
4879 <tr>
4880 <td class="parameter_name"><p>crt</p></td>
4881 <td class="parameter_description"><p>Holds the certificate</p></td>
4882 <td class="parameter_annotations"> </td>
4883 </tr>
4884 <tr>
4885 <td class="parameter_name"><p>buf</p></td>
4886 <td class="parameter_description"><p>user allocated memory buffer, will hold the unique id</p></td>
4887 <td class="parameter_annotations"> </td>
4888 </tr>
4889 <tr>
4890 <td class="parameter_name"><p>buf_size</p></td>
4891 <td class="parameter_description"><p>size of user allocated memory buffer (on input), will hold
4892 actual size of the unique ID on return.</p></td>
4893 <td class="parameter_annotations"> </td>
4894 </tr>
4895 </tbody>
4896 </table></div>
4897 </div>
4898 <div class="refsect3">
4899 <a name="gnutls-x509-crt-get-subject-unique-id.returns"></a><h4>Returns</h4>
4900 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p>
4901 </div>
4902 </div>
4903 <hr>
4904 <div class="refsect2">
4905 <a name="gnutls-x509-crt-get-issuer-unique-id"></a><h3>gnutls_x509_crt_get_issuer_unique_id ()</h3>
4906 <pre class="programlisting"><span class="returnvalue">int</span>
4907 gnutls_x509_crt_get_issuer_unique_id (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
4908 <em class="parameter"><code><span class="type">char</span> *buf</code></em>,
4909 <em class="parameter"><code><span class="type">size_t</span> *buf_size</code></em>);</pre>
4910 <p>This function will extract the issuerUniqueID value (if present) for
4911 the given certificate.</p>
4912 <p>If the user allocated memory buffer is not large enough to hold the
4913 full subjectUniqueID, then a GNUTLS_E_SHORT_MEMORY_BUFFER error will be
4914 returned, and buf_size will be set to the actual length.</p>
4915 <p>This function had a bug prior to 3.4.8 that prevented the setting
4916 of <code class="literal">NULL</code> <em class="parameter"><code>buf</code></em>
4917 to discover the <em class="parameter"><code>buf_size</code></em>
4918 . To use this function safely
4919 with the older versions the <em class="parameter"><code>buf</code></em>
4920 must be a valid buffer that can hold
4921 at least a single byte if <em class="parameter"><code>buf_size</code></em>
4922 is zero.</p>
4923 <div class="refsect3">
4924 <a name="gnutls-x509-crt-get-issuer-unique-id.parameters"></a><h4>Parameters</h4>
4925 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4926 <colgroup>
4927 <col width="150px" class="parameters_name">
4928 <col class="parameters_description">
4929 <col width="200px" class="parameters_annotations">
4930 </colgroup>
4931 <tbody>
4932 <tr>
4933 <td class="parameter_name"><p>crt</p></td>
4934 <td class="parameter_description"><p>Holds the certificate</p></td>
4935 <td class="parameter_annotations"> </td>
4936 </tr>
4937 <tr>
4938 <td class="parameter_name"><p>buf</p></td>
4939 <td class="parameter_description"><p>user allocated memory buffer, will hold the unique id</p></td>
4940 <td class="parameter_annotations"> </td>
4941 </tr>
4942 <tr>
4943 <td class="parameter_name"><p>buf_size</p></td>
4944 <td class="parameter_description"><p>size of user allocated memory buffer (on input), will hold
4945 actual size of the unique ID on return.</p></td>
4946 <td class="parameter_annotations"> </td>
4947 </tr>
4948 </tbody>
4949 </table></div>
4950 </div>
4951 <div class="refsect3">
4952 <a name="gnutls-x509-crt-get-issuer-unique-id.returns"></a><h4>Returns</h4>
4953 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p>
4954 </div>
4955 <p class="since">Since: 2.12.0</p>
4956 </div>
4957 <hr>
4958 <div class="refsect2">
4959 <a name="gnutls-x509-crt-set-pin-function"></a><h3>gnutls_x509_crt_set_pin_function ()</h3>
4960 <pre class="programlisting"><span class="returnvalue">void</span>
4961 gnutls_x509_crt_set_pin_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
4962 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pin-callback-t" title="gnutls_pin_callback_t ()"><span class="type">gnutls_pin_callback_t</span></a> fn</code></em>,
4963 <em class="parameter"><code><span class="type">void</span> *userdata</code></em>);</pre>
4964 <p>This function will set a callback function to be used when
4965 it is required to access a protected object. This function overrides
4966 the global function set using <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-set-pin-function" title="gnutls_pkcs11_set_pin_function ()"><code class="function">gnutls_pkcs11_set_pin_function()</code></a>.</p>
4967 <p>Note that this callback is currently used only during the import
4968 of a PKCS <span class="type">11</span> certificate with <a class="link" href="gnutls-x509.html#gnutls-x509-crt-import-url" title="gnutls_x509_crt_import_url ()"><code class="function">gnutls_x509_crt_import_url()</code></a>.</p>
4969 <div class="refsect3">
4970 <a name="gnutls-x509-crt-set-pin-function.parameters"></a><h4>Parameters</h4>
4971 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4972 <colgroup>
4973 <col width="150px" class="parameters_name">
4974 <col class="parameters_description">
4975 <col width="200px" class="parameters_annotations">
4976 </colgroup>
4977 <tbody>
4978 <tr>
4979 <td class="parameter_name"><p>crt</p></td>
4980 <td class="parameter_description"><p>The certificate structure</p></td>
4981 <td class="parameter_annotations"> </td>
4982 </tr>
4983 <tr>
4984 <td class="parameter_name"><p>fn</p></td>
4985 <td class="parameter_description"><p>the callback</p></td>
4986 <td class="parameter_annotations"> </td>
4987 </tr>
4988 <tr>
4989 <td class="parameter_name"><p>userdata</p></td>
4990 <td class="parameter_description"><p>data associated with the callback</p></td>
4991 <td class="parameter_annotations"> </td>
4992 </tr>
4993 </tbody>
4994 </table></div>
4995 </div>
4996 <p class="since">Since: 3.1.0</p>
4997 </div>
4998 <hr>
4999 <div class="refsect2">
5000 <a name="gnutls-x509-crt-get-authority-info-access"></a><h3>gnutls_x509_crt_get_authority_info_access ()</h3>
5001 <pre class="programlisting"><span class="returnvalue">int</span>
5002 gnutls_x509_crt_get_authority_info_access
5003 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
5004 <em class="parameter"><code>unsigned <span class="type">int</span> seq</code></em>,
5005 <em class="parameter"><code><span class="type">int</span> what</code></em>,
5006 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>,
5007 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
5008 <p>Note that a simpler API to access the authority info data is provided
5009 by <code class="function">gnutls_x509_aia_get()</code> and <code class="function">gnutls_x509_ext_import_aia()</code>.</p>
5010 <p>This function extracts the Authority Information Access (AIA)
5011 extension, see RFC 5280 section 4.2.2.1 for more information. The
5012 AIA extension holds a sequence of AccessDescription (AD) data.</p>
5013 <p>The <em class="parameter"><code>seq</code></em>
5014 input parameter is used to indicate which member of the
5015 sequence the caller is interested in. The first member is 0, the
5016 second member 1 and so on. When the <em class="parameter"><code>seq</code></em>
5017 value is out of bounds,
5018 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> is returned.</p>
5019 <p>The type of data returned in <em class="parameter"><code>data</code></em>
5020 is specified via <em class="parameter"><code>what</code></em>
5021 which
5022 should be <a class="link" href="gnutls-x509.html#gnutls-info-access-what-t" title="enum gnutls_info_access_what_t"><span class="type">gnutls_info_access_what_t</span></a> values.</p>
5023 <p>If <em class="parameter"><code>what</code></em>
5024 is <a class="link" href="gnutls-x509.html#GNUTLS-IA-ACCESSMETHOD-OID:CAPS"><code class="literal">GNUTLS_IA_ACCESSMETHOD_OID</code></a> then <em class="parameter"><code>data</code></em>
5025 will hold the
5026 accessMethod OID (e.g., "1.3.6.1.5.5.7.48.1").</p>
5027 <p>If <em class="parameter"><code>what</code></em>
5028 is <a class="link" href="gnutls-x509.html#GNUTLS-IA-ACCESSLOCATION-GENERALNAME-TYPE:CAPS"><code class="literal">GNUTLS_IA_ACCESSLOCATION_GENERALNAME_TYPE</code></a>, <em class="parameter"><code>data</code></em>
5029 will
5030 hold the accessLocation GeneralName type (e.g.,
5031 "uniformResourceIdentifier").</p>
5032 <p>If <em class="parameter"><code>what</code></em>
5033 is <a class="link" href="gnutls-x509.html#GNUTLS-IA-URI:CAPS"><code class="literal">GNUTLS_IA_URI</code></a>, <em class="parameter"><code>data</code></em>
5034 will hold the accessLocation URI
5035 data. Requesting this <em class="parameter"><code>what</code></em>
5036 value leads to an error if the
5037 accessLocation is not of the "uniformResourceIdentifier" type.</p>
5038 <p>If <em class="parameter"><code>what</code></em>
5039 is <a class="link" href="gnutls-x509.html#GNUTLS-IA-OCSP-URI:CAPS"><code class="literal">GNUTLS_IA_OCSP_URI</code></a>, <em class="parameter"><code>data</code></em>
5040 will hold the OCSP URI.
5041 Requesting this <em class="parameter"><code>what</code></em>
5042 value leads to an error if the accessMethod
5043 is not 1.3.6.1.5.5.7.48.1 aka OCSP, or if accessLocation is not of
5044 the "uniformResourceIdentifier" type. In that case <a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNKNOWN-ALGORITHM:CAPS" title="GNUTLS_E_UNKNOWN_ALGORITHM"><code class="literal">GNUTLS_E_UNKNOWN_ALGORITHM</code></a>
5045 will be returned, and <em class="parameter"><code>seq</code></em>
5046 should be increased and this function
5047 called again.</p>
5048 <p>If <em class="parameter"><code>what</code></em>
5049 is <a class="link" href="gnutls-x509.html#GNUTLS-IA-CAISSUERS-URI:CAPS"><code class="literal">GNUTLS_IA_CAISSUERS_URI</code></a>, <em class="parameter"><code>data</code></em>
5050 will hold the caIssuers
5051 URI. Requesting this <em class="parameter"><code>what</code></em>
5052 value leads to an error if the
5053 accessMethod is not 1.3.6.1.5.5.7.48.2 aka caIssuers, or if
5054 accessLocation is not of the "uniformResourceIdentifier" type.
5055 In that case handle as in <a class="link" href="gnutls-x509.html#GNUTLS-IA-OCSP-URI:CAPS"><code class="literal">GNUTLS_IA_OCSP_URI</code></a>.</p>
5056 <p>More <em class="parameter"><code>what</code></em>
5057 values may be allocated in the future as needed.</p>
5058 <p>If <em class="parameter"><code>data</code></em>
5059 is NULL, the function does the same without storing the
5060 output data, that is, it will set <em class="parameter"><code>critical</code></em>
5061 and do error checking
5062 as usual.</p>
5063 <p>The value of the critical flag is returned in *<em class="parameter"><code>critical</code></em>
5064 . Supply a
5065 NULL <em class="parameter"><code>critical</code></em>
5066 if you want the function to make sure the extension
5067 is non-critical, as required by RFC 5280.</p>
5068 <div class="refsect3">
5069 <a name="gnutls-x509-crt-get-authority-info-access.parameters"></a><h4>Parameters</h4>
5070 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5071 <colgroup>
5072 <col width="150px" class="parameters_name">
5073 <col class="parameters_description">
5074 <col width="200px" class="parameters_annotations">
5075 </colgroup>
5076 <tbody>
5077 <tr>
5078 <td class="parameter_name"><p>crt</p></td>
5079 <td class="parameter_description"><p>Holds the certificate</p></td>
5080 <td class="parameter_annotations"> </td>
5081 </tr>
5082 <tr>
5083 <td class="parameter_name"><p>seq</p></td>
5084 <td class="parameter_description"><p>specifies the sequence number of the access descriptor (0 for the first one, 1 for the second etc.)</p></td>
5085 <td class="parameter_annotations"> </td>
5086 </tr>
5087 <tr>
5088 <td class="parameter_name"><p>what</p></td>
5089 <td class="parameter_description"><p>what data to get, a <a class="link" href="gnutls-x509.html#gnutls-info-access-what-t" title="enum gnutls_info_access_what_t"><span class="type">gnutls_info_access_what_t</span></a> type.</p></td>
5090 <td class="parameter_annotations"> </td>
5091 </tr>
5092 <tr>
5093 <td class="parameter_name"><p>data</p></td>
5094 <td class="parameter_description"><p>output data to be freed with <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p></td>
5095 <td class="parameter_annotations"> </td>
5096 </tr>
5097 <tr>
5098 <td class="parameter_name"><p>critical</p></td>
5099 <td class="parameter_description"><p>pointer to output integer that is set to non-zero if the extension is marked as critical (may be <code class="literal">NULL</code>)</p></td>
5100 <td class="parameter_annotations"> </td>
5101 </tr>
5102 </tbody>
5103 </table></div>
5104 </div>
5105 <div class="refsect3">
5106 <a name="gnutls-x509-crt-get-authority-info-access.returns"></a><h4>Returns</h4>
5107 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a> on
5108 invalid <em class="parameter"><code>crt</code></em>
5109 , <a class="link" href="gnutls-gnutls.html#GNUTLS-E-CONSTRAINT-ERROR:CAPS" title="GNUTLS_E_CONSTRAINT_ERROR"><code class="literal">GNUTLS_E_CONSTRAINT_ERROR</code></a> if the extension is
5110 incorrectly marked as critical (use a non-NULL <em class="parameter"><code>critical</code></em>
5111 to
5112 override), <a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNKNOWN-ALGORITHM:CAPS" title="GNUTLS_E_UNKNOWN_ALGORITHM"><code class="literal">GNUTLS_E_UNKNOWN_ALGORITHM</code></a> if the requested OID does
5113 not match (e.g., when using <a class="link" href="gnutls-x509.html#GNUTLS-IA-OCSP-URI:CAPS"><code class="literal">GNUTLS_IA_OCSP_URI</code></a>), otherwise a
5114 negative error code.</p>
5115 </div>
5116 <p class="since">Since: 3.0</p>
5117 </div>
5118 <hr>
5119 <div class="refsect2">
5120 <a name="gnutls-x509-name-constraints-check"></a><h3>gnutls_x509_name_constraints_check ()</h3>
5121 <pre class="programlisting"><span class="returnvalue">unsigned</span>
5122 gnutls_x509_name_constraints_check (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-t" title="gnutls_x509_name_constraints_t"><span class="type">gnutls_x509_name_constraints_t</span></a> nc</code></em>,
5123 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a> type</code></em>,
5124 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *name</code></em>);</pre>
5125 <p>This function will check the provided name against the constraints in
5126 <em class="parameter"><code>nc</code></em>
5127 using the RFC5280 rules. Currently this function is limited to DNS
5128 names, emails and IP addresses (of type <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-DNSNAME:CAPS"><code class="literal">GNUTLS_SAN_DNSNAME</code></a>,
5129 <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-RFC822NAME:CAPS"><code class="literal">GNUTLS_SAN_RFC822NAME</code></a> and <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-IPADDRESS:CAPS"><code class="literal">GNUTLS_SAN_IPADDRESS</code></a>).</p>
5130 <div class="refsect3">
5131 <a name="gnutls-x509-name-constraints-check.parameters"></a><h4>Parameters</h4>
5132 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5133 <colgroup>
5134 <col width="150px" class="parameters_name">
5135 <col class="parameters_description">
5136 <col width="200px" class="parameters_annotations">
5137 </colgroup>
5138 <tbody>
5139 <tr>
5140 <td class="parameter_name"><p>nc</p></td>
5141 <td class="parameter_description"><p>the extracted name constraints</p></td>
5142 <td class="parameter_annotations"> </td>
5143 </tr>
5144 <tr>
5145 <td class="parameter_name"><p>type</p></td>
5146 <td class="parameter_description"><p>the type of the constraint to check (of type gnutls_x509_subject_alt_name_t)</p></td>
5147 <td class="parameter_annotations"> </td>
5148 </tr>
5149 <tr>
5150 <td class="parameter_name"><p>name</p></td>
5151 <td class="parameter_description"><p>the name to be checked</p></td>
5152 <td class="parameter_annotations"> </td>
5153 </tr>
5154 </tbody>
5155 </table></div>
5156 </div>
5157 <div class="refsect3">
5158 <a name="gnutls-x509-name-constraints-check.returns"></a><h4>Returns</h4>
5159 <p> zero if the provided name is not acceptable, and non-zero otherwise.</p>
5160 </div>
5161 <p class="since">Since: 3.3.0</p>
5162 </div>
5163 <hr>
5164 <div class="refsect2">
5165 <a name="gnutls-x509-name-constraints-check-crt"></a><h3>gnutls_x509_name_constraints_check_crt ()</h3>
5166 <pre class="programlisting"><span class="returnvalue">unsigned</span>
5167 gnutls_x509_name_constraints_check_crt
5168 (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-t" title="gnutls_x509_name_constraints_t"><span class="type">gnutls_x509_name_constraints_t</span></a> nc</code></em>,
5169 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a> type</code></em>,
5170 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>);</pre>
5171 <p>This function will check the provided certificate names against the constraints in
5172 <em class="parameter"><code>nc</code></em>
5173 using the RFC5280 rules. It will traverse all the certificate's names and
5174 alternative names.</p>
5175 <p>Currently this function is limited to DNS
5176 names and emails (of type <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-DNSNAME:CAPS"><code class="literal">GNUTLS_SAN_DNSNAME</code></a> and <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-RFC822NAME:CAPS"><code class="literal">GNUTLS_SAN_RFC822NAME</code></a>).</p>
5177 <div class="refsect3">
5178 <a name="gnutls-x509-name-constraints-check-crt.parameters"></a><h4>Parameters</h4>
5179 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5180 <colgroup>
5181 <col width="150px" class="parameters_name">
5182 <col class="parameters_description">
5183 <col width="200px" class="parameters_annotations">
5184 </colgroup>
5185 <tbody>
5186 <tr>
5187 <td class="parameter_name"><p>nc</p></td>
5188 <td class="parameter_description"><p>the extracted name constraints</p></td>
5189 <td class="parameter_annotations"> </td>
5190 </tr>
5191 <tr>
5192 <td class="parameter_name"><p>type</p></td>
5193 <td class="parameter_description"><p>the type of the constraint to check (of type gnutls_x509_subject_alt_name_t)</p></td>
5194 <td class="parameter_annotations"> </td>
5195 </tr>
5196 <tr>
5197 <td class="parameter_name"><p>cert</p></td>
5198 <td class="parameter_description"><p>the certificate to be checked</p></td>
5199 <td class="parameter_annotations"> </td>
5200 </tr>
5201 </tbody>
5202 </table></div>
5203 </div>
5204 <div class="refsect3">
5205 <a name="gnutls-x509-name-constraints-check-crt.returns"></a><h4>Returns</h4>
5206 <p> zero if the provided name is not acceptable, and non-zero otherwise.</p>
5207 </div>
5208 <p class="since">Since: 3.3.0</p>
5209 </div>
5210 <hr>
5211 <div class="refsect2">
5212 <a name="gnutls-x509-name-constraints-init"></a><h3>gnutls_x509_name_constraints_init ()</h3>
5213 <pre class="programlisting"><span class="returnvalue">int</span>
5214 gnutls_x509_name_constraints_init (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-t" title="gnutls_x509_name_constraints_t"><span class="type">gnutls_x509_name_constraints_t</span></a> *nc</code></em>);</pre>
5215 <p>This function will initialize a name constraints type.</p>
5216 <div class="refsect3">
5217 <a name="gnutls-x509-name-constraints-init.parameters"></a><h4>Parameters</h4>
5218 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5219 <colgroup>
5220 <col width="150px" class="parameters_name">
5221 <col class="parameters_description">
5222 <col width="200px" class="parameters_annotations">
5223 </colgroup>
5224 <tbody><tr>
5225 <td class="parameter_name"><p>nc</p></td>
5226 <td class="parameter_description"><p>The nameconstraints</p></td>
5227 <td class="parameter_annotations"> </td>
5228 </tr></tbody>
5229 </table></div>
5230 </div>
5231 <div class="refsect3">
5232 <a name="gnutls-x509-name-constraints-init.returns"></a><h4>Returns</h4>
5233 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a negative error value.</p>
5234 </div>
5235 <p class="since">Since: 3.3.0</p>
5236 </div>
5237 <hr>
5238 <div class="refsect2">
5239 <a name="gnutls-x509-name-constraints-deinit"></a><h3>gnutls_x509_name_constraints_deinit ()</h3>
5240 <pre class="programlisting"><span class="returnvalue">void</span>
5241 gnutls_x509_name_constraints_deinit (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-t" title="gnutls_x509_name_constraints_t"><span class="type">gnutls_x509_name_constraints_t</span></a> nc</code></em>);</pre>
5242 <p>This function will deinitialize a name constraints type.</p>
5243 <div class="refsect3">
5244 <a name="gnutls-x509-name-constraints-deinit.parameters"></a><h4>Parameters</h4>
5245 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5246 <colgroup>
5247 <col width="150px" class="parameters_name">
5248 <col class="parameters_description">
5249 <col width="200px" class="parameters_annotations">
5250 </colgroup>
5251 <tbody><tr>
5252 <td class="parameter_name"><p>nc</p></td>
5253 <td class="parameter_description"><p>The nameconstraints</p></td>
5254 <td class="parameter_annotations"> </td>
5255 </tr></tbody>
5256 </table></div>
5257 </div>
5258 <p class="since">Since: 3.3.0</p>
5259 </div>
5260 <hr>
5261 <div class="refsect2">
5262 <a name="gnutls-x509-crt-get-name-constraints"></a><h3>gnutls_x509_crt_get_name_constraints ()</h3>
5263 <pre class="programlisting"><span class="returnvalue">int</span>
5264 gnutls_x509_crt_get_name_constraints (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
5265 <em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-t" title="gnutls_x509_name_constraints_t"><span class="type">gnutls_x509_name_constraints_t</span></a> nc</code></em>,
5266 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
5267 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
5268 <p>This function will return an intermediate type containing
5269 the name constraints of the provided CA certificate. That
5270 structure can be used in combination with <a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-check" title="gnutls_x509_name_constraints_check ()"><code class="function">gnutls_x509_name_constraints_check()</code></a>
5271 to verify whether a server's name is in accordance with the constraints.</p>
5272 <p>When the <em class="parameter"><code>flags</code></em>
5273 is set to <a class="link" href="gnutls-x509.html#GNUTLS-EXT-FLAG-APPEND:CAPS" title="GNUTLS_EXT_FLAG_APPEND"><code class="literal">GNUTLS_EXT_FLAG_APPEND</code></a>,
5274 then if the <em class="parameter"><code>nc</code></em>
5275 structure is empty this function will behave
5276 identically as if the flag was not set.
5277 Otherwise if there are elements in the <em class="parameter"><code>nc</code></em>
5278 structure then the
5279 constraints will be merged with the existing constraints following
5280 RFC5280 p6.1.4 (excluded constraints will be appended, permitted
5281 will be intersected).</p>
5282 <p>Note that <em class="parameter"><code>nc</code></em>
5283 must be initialized prior to calling this function.</p>
5284 <div class="refsect3">
5285 <a name="gnutls-x509-crt-get-name-constraints.parameters"></a><h4>Parameters</h4>
5286 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5287 <colgroup>
5288 <col width="150px" class="parameters_name">
5289 <col class="parameters_description">
5290 <col width="200px" class="parameters_annotations">
5291 </colgroup>
5292 <tbody>
5293 <tr>
5294 <td class="parameter_name"><p>crt</p></td>
5295 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
5296 <td class="parameter_annotations"> </td>
5297 </tr>
5298 <tr>
5299 <td class="parameter_name"><p>nc</p></td>
5300 <td class="parameter_description"><p>The nameconstraints intermediate type</p></td>
5301 <td class="parameter_annotations"> </td>
5302 </tr>
5303 <tr>
5304 <td class="parameter_name"><p>flags</p></td>
5305 <td class="parameter_description"><p>zero or <a class="link" href="gnutls-x509.html#GNUTLS-EXT-FLAG-APPEND:CAPS" title="GNUTLS_EXT_FLAG_APPEND"><code class="literal">GNUTLS_EXT_FLAG_APPEND</code></a></p></td>
5306 <td class="parameter_annotations"> </td>
5307 </tr>
5308 <tr>
5309 <td class="parameter_name"><p>critical</p></td>
5310 <td class="parameter_description"><p>the extension status</p></td>
5311 <td class="parameter_annotations"> </td>
5312 </tr>
5313 </tbody>
5314 </table></div>
5315 </div>
5316 <div class="refsect3">
5317 <a name="gnutls-x509-crt-get-name-constraints.returns"></a><h4>Returns</h4>
5318 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
5319 if the extension is not present, otherwise a negative error value.</p>
5320 </div>
5321 <p class="since">Since: 3.3.0</p>
5322 </div>
5323 <hr>
5324 <div class="refsect2">
5325 <a name="gnutls-x509-name-constraints-add-permitted"></a><h3>gnutls_x509_name_constraints_add_permitted ()</h3>
5326 <pre class="programlisting"><span class="returnvalue">int</span>
5327 gnutls_x509_name_constraints_add_permitted
5328 (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-t" title="gnutls_x509_name_constraints_t"><span class="type">gnutls_x509_name_constraints_t</span></a> nc</code></em>,
5329 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a> type</code></em>,
5330 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *name</code></em>);</pre>
5331 <p>This function will add a name constraint to the list of permitted
5332 constraints. The constraints <em class="parameter"><code>type</code></em>
5333 can be any of the following types:
5334 <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-DNSNAME:CAPS"><code class="literal">GNUTLS_SAN_DNSNAME</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-RFC822NAME:CAPS"><code class="literal">GNUTLS_SAN_RFC822NAME</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-DN:CAPS"><code class="literal">GNUTLS_SAN_DN</code></a>,
5335 <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-URI:CAPS"><code class="literal">GNUTLS_SAN_URI</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-IPADDRESS:CAPS"><code class="literal">GNUTLS_SAN_IPADDRESS</code></a>. For the latter, an IP address
5336 in network byte order is expected, followed by its network mask.</p>
5337 <div class="refsect3">
5338 <a name="gnutls-x509-name-constraints-add-permitted.parameters"></a><h4>Parameters</h4>
5339 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5340 <colgroup>
5341 <col width="150px" class="parameters_name">
5342 <col class="parameters_description">
5343 <col width="200px" class="parameters_annotations">
5344 </colgroup>
5345 <tbody>
5346 <tr>
5347 <td class="parameter_name"><p>nc</p></td>
5348 <td class="parameter_description"><p>The nameconstraints</p></td>
5349 <td class="parameter_annotations"> </td>
5350 </tr>
5351 <tr>
5352 <td class="parameter_name"><p>type</p></td>
5353 <td class="parameter_description"><p>The type of the constraints</p></td>
5354 <td class="parameter_annotations"> </td>
5355 </tr>
5356 <tr>
5357 <td class="parameter_name"><p>name</p></td>
5358 <td class="parameter_description"><p>The data of the constraints</p></td>
5359 <td class="parameter_annotations"> </td>
5360 </tr>
5361 </tbody>
5362 </table></div>
5363 </div>
5364 <div class="refsect3">
5365 <a name="gnutls-x509-name-constraints-add-permitted.returns"></a><h4>Returns</h4>
5366 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a negative error value.</p>
5367 </div>
5368 <p class="since">Since: 3.3.0</p>
5369 </div>
5370 <hr>
5371 <div class="refsect2">
5372 <a name="gnutls-x509-name-constraints-add-excluded"></a><h3>gnutls_x509_name_constraints_add_excluded ()</h3>
5373 <pre class="programlisting"><span class="returnvalue">int</span>
5374 gnutls_x509_name_constraints_add_excluded
5375 (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-t" title="gnutls_x509_name_constraints_t"><span class="type">gnutls_x509_name_constraints_t</span></a> nc</code></em>,
5376 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a> type</code></em>,
5377 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *name</code></em>);</pre>
5378 <p>This function will add a name constraint to the list of excluded
5379 constraints. The constraints <em class="parameter"><code>type</code></em>
5380 can be any of the following types:
5381 <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-DNSNAME:CAPS"><code class="literal">GNUTLS_SAN_DNSNAME</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-RFC822NAME:CAPS"><code class="literal">GNUTLS_SAN_RFC822NAME</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-DN:CAPS"><code class="literal">GNUTLS_SAN_DN</code></a>,
5382 <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-URI:CAPS"><code class="literal">GNUTLS_SAN_URI</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-IPADDRESS:CAPS"><code class="literal">GNUTLS_SAN_IPADDRESS</code></a>. For the latter, an IP address
5383 in network byte order is expected, followed by its network mask (which is
5384 4 bytes in IPv4 or 16-bytes in IPv6).</p>
5385 <div class="refsect3">
5386 <a name="gnutls-x509-name-constraints-add-excluded.parameters"></a><h4>Parameters</h4>
5387 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5388 <colgroup>
5389 <col width="150px" class="parameters_name">
5390 <col class="parameters_description">
5391 <col width="200px" class="parameters_annotations">
5392 </colgroup>
5393 <tbody>
5394 <tr>
5395 <td class="parameter_name"><p>nc</p></td>
5396 <td class="parameter_description"><p>The nameconstraints</p></td>
5397 <td class="parameter_annotations"> </td>
5398 </tr>
5399 <tr>
5400 <td class="parameter_name"><p>type</p></td>
5401 <td class="parameter_description"><p>The type of the constraints</p></td>
5402 <td class="parameter_annotations"> </td>
5403 </tr>
5404 <tr>
5405 <td class="parameter_name"><p>name</p></td>
5406 <td class="parameter_description"><p>The data of the constraints</p></td>
5407 <td class="parameter_annotations"> </td>
5408 </tr>
5409 </tbody>
5410 </table></div>
5411 </div>
5412 <div class="refsect3">
5413 <a name="gnutls-x509-name-constraints-add-excluded.returns"></a><h4>Returns</h4>
5414 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a negative error value.</p>
5415 </div>
5416 <p class="since">Since: 3.3.0</p>
5417 </div>
5418 <hr>
5419 <div class="refsect2">
5420 <a name="gnutls-x509-crt-set-name-constraints"></a><h3>gnutls_x509_crt_set_name_constraints ()</h3>
5421 <pre class="programlisting"><span class="returnvalue">int</span>
5422 gnutls_x509_crt_set_name_constraints (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
5423 <em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-t" title="gnutls_x509_name_constraints_t"><span class="type">gnutls_x509_name_constraints_t</span></a> nc</code></em>,
5424 <em class="parameter"><code>unsigned <span class="type">int</span> critical</code></em>);</pre>
5425 <p>This function will set the provided name constraints to
5426 the certificate extension list. This extension is always
5427 marked as critical.</p>
5428 <div class="refsect3">
5429 <a name="gnutls-x509-crt-set-name-constraints.parameters"></a><h4>Parameters</h4>
5430 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5431 <colgroup>
5432 <col width="150px" class="parameters_name">
5433 <col class="parameters_description">
5434 <col width="200px" class="parameters_annotations">
5435 </colgroup>
5436 <tbody>
5437 <tr>
5438 <td class="parameter_name"><p>crt</p></td>
5439 <td class="parameter_description"><p>The certificate</p></td>
5440 <td class="parameter_annotations"> </td>
5441 </tr>
5442 <tr>
5443 <td class="parameter_name"><p>nc</p></td>
5444 <td class="parameter_description"><p>The nameconstraints structure</p></td>
5445 <td class="parameter_annotations"> </td>
5446 </tr>
5447 <tr>
5448 <td class="parameter_name"><p>critical</p></td>
5449 <td class="parameter_description"><p>whether this extension will be critical</p></td>
5450 <td class="parameter_annotations"> </td>
5451 </tr>
5452 </tbody>
5453 </table></div>
5454 </div>
5455 <div class="refsect3">
5456 <a name="gnutls-x509-crt-set-name-constraints.returns"></a><h4>Returns</h4>
5457 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a negative error value.</p>
5458 </div>
5459 <p class="since">Since: 3.3.0</p>
5460 </div>
5461 <hr>
5462 <div class="refsect2">
5463 <a name="gnutls-x509-name-constraints-get-permitted"></a><h3>gnutls_x509_name_constraints_get_permitted ()</h3>
5464 <pre class="programlisting"><span class="returnvalue">int</span>
5465 gnutls_x509_name_constraints_get_permitted
5466 (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-t" title="gnutls_x509_name_constraints_t"><span class="type">gnutls_x509_name_constraints_t</span></a> nc</code></em>,
5467 <em class="parameter"><code><span class="type">unsigned </span> idx</code></em>,
5468 <em class="parameter"><code><span class="type">unsigned</span> *type</code></em>,
5469 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *name</code></em>);</pre>
5470 <p>This function will return an intermediate type containing
5471 the name constraints of the provided CA certificate. That
5472 structure can be used in combination with <a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-check" title="gnutls_x509_name_constraints_check ()"><code class="function">gnutls_x509_name_constraints_check()</code></a>
5473 to verify whether a server's name is in accordance with the constraints.</p>
5474 <p>The name should be treated as constant and valid for the lifetime of <em class="parameter"><code>nc</code></em>
5475 .</p>
5476 <div class="refsect3">
5477 <a name="gnutls-x509-name-constraints-get-permitted.parameters"></a><h4>Parameters</h4>
5478 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5479 <colgroup>
5480 <col width="150px" class="parameters_name">
5481 <col class="parameters_description">
5482 <col width="200px" class="parameters_annotations">
5483 </colgroup>
5484 <tbody>
5485 <tr>
5486 <td class="parameter_name"><p>nc</p></td>
5487 <td class="parameter_description"><p>the extracted name constraints</p></td>
5488 <td class="parameter_annotations"> </td>
5489 </tr>
5490 <tr>
5491 <td class="parameter_name"><p>idx</p></td>
5492 <td class="parameter_description"><p>the index of the constraint</p></td>
5493 <td class="parameter_annotations"> </td>
5494 </tr>
5495 <tr>
5496 <td class="parameter_name"><p>type</p></td>
5497 <td class="parameter_description"><p>the type of the constraint (of type gnutls_x509_subject_alt_name_t)</p></td>
5498 <td class="parameter_annotations"> </td>
5499 </tr>
5500 <tr>
5501 <td class="parameter_name"><p>name</p></td>
5502 <td class="parameter_description"><p>the name in the constraint (of the specific type)</p></td>
5503 <td class="parameter_annotations"> </td>
5504 </tr>
5505 </tbody>
5506 </table></div>
5507 </div>
5508 <div class="refsect3">
5509 <a name="gnutls-x509-name-constraints-get-permitted.returns"></a><h4>Returns</h4>
5510 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
5511 if the extension is not present, otherwise a negative error value.</p>
5512 </div>
5513 <p class="since">Since: 3.3.0</p>
5514 </div>
5515 <hr>
5516 <div class="refsect2">
5517 <a name="gnutls-x509-name-constraints-get-excluded"></a><h3>gnutls_x509_name_constraints_get_excluded ()</h3>
5518 <pre class="programlisting"><span class="returnvalue">int</span>
5519 gnutls_x509_name_constraints_get_excluded
5520 (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-t" title="gnutls_x509_name_constraints_t"><span class="type">gnutls_x509_name_constraints_t</span></a> nc</code></em>,
5521 <em class="parameter"><code><span class="type">unsigned </span> idx</code></em>,
5522 <em class="parameter"><code><span class="type">unsigned</span> *type</code></em>,
5523 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *name</code></em>);</pre>
5524 <p>This function will return an intermediate type containing
5525 the name constraints of the provided CA certificate. That
5526 structure can be used in combination with <a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-check" title="gnutls_x509_name_constraints_check ()"><code class="function">gnutls_x509_name_constraints_check()</code></a>
5527 to verify whether a server's name is in accordance with the constraints.</p>
5528 <p>The name should be treated as constant and valid for the lifetime of <em class="parameter"><code>nc</code></em>
5529 .</p>
5530 <div class="refsect3">
5531 <a name="gnutls-x509-name-constraints-get-excluded.parameters"></a><h4>Parameters</h4>
5532 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5533 <colgroup>
5534 <col width="150px" class="parameters_name">
5535 <col class="parameters_description">
5536 <col width="200px" class="parameters_annotations">
5537 </colgroup>
5538 <tbody>
5539 <tr>
5540 <td class="parameter_name"><p>nc</p></td>
5541 <td class="parameter_description"><p>the extracted name constraints</p></td>
5542 <td class="parameter_annotations"> </td>
5543 </tr>
5544 <tr>
5545 <td class="parameter_name"><p>idx</p></td>
5546 <td class="parameter_description"><p>the index of the constraint</p></td>
5547 <td class="parameter_annotations"> </td>
5548 </tr>
5549 <tr>
5550 <td class="parameter_name"><p>type</p></td>
5551 <td class="parameter_description"><p>the type of the constraint (of type gnutls_x509_subject_alt_name_t)</p></td>
5552 <td class="parameter_annotations"> </td>
5553 </tr>
5554 <tr>
5555 <td class="parameter_name"><p>name</p></td>
5556 <td class="parameter_description"><p>the name in the constraint (of the specific type)</p></td>
5557 <td class="parameter_annotations"> </td>
5558 </tr>
5559 </tbody>
5560 </table></div>
5561 </div>
5562 <div class="refsect3">
5563 <a name="gnutls-x509-name-constraints-get-excluded.returns"></a><h4>Returns</h4>
5564 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
5565 if the extension is not present, otherwise a negative error value.</p>
5566 </div>
5567 <p class="since">Since: 3.3.0</p>
5568 </div>
5569 <hr>
5570 <div class="refsect2">
5571 <a name="gnutls-x509-cidr-to-rfc5280"></a><h3>gnutls_x509_cidr_to_rfc5280 ()</h3>
5572 <pre class="programlisting"><span class="returnvalue">int</span>
5573 gnutls_x509_cidr_to_rfc5280 (<em class="parameter"><code>const <span class="type">char</span> *cidr</code></em>,
5574 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *cidr_rfc5280</code></em>);</pre>
5575 <p>This function will convert text CIDR range with prefix (such as '10.0.0.0/8')
5576 to RFC5280 (IP address in network byte order followed by its network mask).
5577 Works for both IPv4 and IPv6.</p>
5578 <p>The resulting object is directly usable for IP name constraints usage,
5579 for example in functions <a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-add-permitted" title="gnutls_x509_name_constraints_add_permitted ()"><code class="literal">gnutls_x509_name_constraints_add_permitted</code></a>
5580 or <a class="link" href="gnutls-x509.html#gnutls-x509-name-constraints-add-excluded" title="gnutls_x509_name_constraints_add_excluded ()"><code class="literal">gnutls_x509_name_constraints_add_excluded</code></a>.</p>
5581 <p>The data in datum needs to be deallocated using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p>
5582 <div class="refsect3">
5583 <a name="gnutls-x509-cidr-to-rfc5280.parameters"></a><h4>Parameters</h4>
5584 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5585 <colgroup>
5586 <col width="150px" class="parameters_name">
5587 <col class="parameters_description">
5588 <col width="200px" class="parameters_annotations">
5589 </colgroup>
5590 <tbody>
5591 <tr>
5592 <td class="parameter_name"><p>cidr</p></td>
5593 <td class="parameter_description"><p>CIDR in RFC4632 format (IP/prefix), null-terminated</p></td>
5594 <td class="parameter_annotations"> </td>
5595 </tr>
5596 <tr>
5597 <td class="parameter_name"><p>cidr_rfc5280</p></td>
5598 <td class="parameter_description"><p>CIDR range converted to RFC5280 format</p></td>
5599 <td class="parameter_annotations"> </td>
5600 </tr>
5601 </tbody>
5602 </table></div>
5603 </div>
5604 <div class="refsect3">
5605 <a name="gnutls-x509-cidr-to-rfc5280.returns"></a><h4>Returns</h4>
5606 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a negative error value.</p>
5607 </div>
5608 <p class="since">Since: 3.5.4</p>
5609 </div>
5610 <hr>
5611 <div class="refsect2">
5612 <a name="gnutls-x509-crt-get-crl-dist-points"></a><h3>gnutls_x509_crt_get_crl_dist_points ()</h3>
5613 <pre class="programlisting"><span class="returnvalue">int</span>
5614 gnutls_x509_crt_get_crl_dist_points (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
5615 <em class="parameter"><code>unsigned <span class="type">int</span> seq</code></em>,
5616 <em class="parameter"><code><span class="type">void</span> *ret</code></em>,
5617 <em class="parameter"><code><span class="type">size_t</span> *ret_size</code></em>,
5618 <em class="parameter"><code>unsigned <span class="type">int</span> *reason_flags</code></em>,
5619 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
5620 <p>This function retrieves the CRL distribution points (2.5.29.31),
5621 contained in the given certificate in the X509v3 Certificate
5622 Extensions.</p>
5623 <div class="refsect3">
5624 <a name="gnutls-x509-crt-get-crl-dist-points.parameters"></a><h4>Parameters</h4>
5625 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5626 <colgroup>
5627 <col width="150px" class="parameters_name">
5628 <col class="parameters_description">
5629 <col width="200px" class="parameters_annotations">
5630 </colgroup>
5631 <tbody>
5632 <tr>
5633 <td class="parameter_name"><p>cert</p></td>
5634 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
5635 <td class="parameter_annotations"> </td>
5636 </tr>
5637 <tr>
5638 <td class="parameter_name"><p>seq</p></td>
5639 <td class="parameter_description"><p>specifies the sequence number of the distribution point (0 for the first one, 1 for the second etc.)</p></td>
5640 <td class="parameter_annotations"> </td>
5641 </tr>
5642 <tr>
5643 <td class="parameter_name"><p>san</p></td>
5644 <td class="parameter_description"><p>is the place where the distribution point will be copied to</p></td>
5645 <td class="parameter_annotations"> </td>
5646 </tr>
5647 <tr>
5648 <td class="parameter_name"><p>san_size</p></td>
5649 <td class="parameter_description"><p>holds the size of ret.</p></td>
5650 <td class="parameter_annotations"> </td>
5651 </tr>
5652 <tr>
5653 <td class="parameter_name"><p>reason_flags</p></td>
5654 <td class="parameter_description"><p>Revocation reasons. An ORed sequence of flags from <a class="link" href="gnutls-x509.html#gnutls-x509-crl-reason-flags-t" title="enum gnutls_x509_crl_reason_flags_t"><code class="literal">gnutls_x509_crl_reason_flags_t</code></a>.</p></td>
5655 <td class="parameter_annotations"> </td>
5656 </tr>
5657 <tr>
5658 <td class="parameter_name"><p>critical</p></td>
5659 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical (may be null)</p></td>
5660 <td class="parameter_annotations"> </td>
5661 </tr>
5662 </tbody>
5663 </table></div>
5664 </div>
5665 <div class="refsect3">
5666 <a name="gnutls-x509-crt-get-crl-dist-points.returns"></a><h4>Returns</h4>
5667 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> and updates <em class="parameter"><code>ret_size</code></em>
5668 if
5669 <em class="parameter"><code>ret_size</code></em>
5670 is not enough to hold the distribution point, or the
5671 type of the distribution point if everything was ok. The type is
5672 one of the enumerated <a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><code class="literal">gnutls_x509_subject_alt_name_t</code></a>. If the
5673 certificate does not have an Alternative name with the specified
5674 sequence number then <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> is
5675 returned.</p>
5676 </div>
5677 </div>
5678 <hr>
5679 <div class="refsect2">
5680 <a name="gnutls-x509-crt-set-crl-dist-points2"></a><h3>gnutls_x509_crt_set_crl_dist_points2 ()</h3>
5681 <pre class="programlisting"><span class="returnvalue">int</span>
5682 gnutls_x509_crt_set_crl_dist_points2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
5683 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a> type</code></em>,
5684 <em class="parameter"><code>const <span class="type">void</span> *data</code></em>,
5685 <em class="parameter"><code>unsigned <span class="type">int</span> data_size</code></em>,
5686 <em class="parameter"><code>unsigned <span class="type">int</span> reason_flags</code></em>);</pre>
5687 <p>This function will set the CRL distribution points certificate extension.</p>
5688 <div class="refsect3">
5689 <a name="gnutls-x509-crt-set-crl-dist-points2.parameters"></a><h4>Parameters</h4>
5690 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5691 <colgroup>
5692 <col width="150px" class="parameters_name">
5693 <col class="parameters_description">
5694 <col width="200px" class="parameters_annotations">
5695 </colgroup>
5696 <tbody>
5697 <tr>
5698 <td class="parameter_name"><p>crt</p></td>
5699 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
5700 <td class="parameter_annotations"> </td>
5701 </tr>
5702 <tr>
5703 <td class="parameter_name"><p>type</p></td>
5704 <td class="parameter_description"><p>is one of the gnutls_x509_subject_alt_name_t enumerations</p></td>
5705 <td class="parameter_annotations"> </td>
5706 </tr>
5707 <tr>
5708 <td class="parameter_name"><p>data</p></td>
5709 <td class="parameter_description"><p>The data to be set</p></td>
5710 <td class="parameter_annotations"> </td>
5711 </tr>
5712 <tr>
5713 <td class="parameter_name"><p>data_size</p></td>
5714 <td class="parameter_description"><p>The data size</p></td>
5715 <td class="parameter_annotations"> </td>
5716 </tr>
5717 <tr>
5718 <td class="parameter_name"><p>reason_flags</p></td>
5719 <td class="parameter_description"><p>revocation reasons</p></td>
5720 <td class="parameter_annotations"> </td>
5721 </tr>
5722 </tbody>
5723 </table></div>
5724 </div>
5725 <div class="refsect3">
5726 <a name="gnutls-x509-crt-set-crl-dist-points2.returns"></a><h4>Returns</h4>
5727 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
5728 negative error value.</p>
5729 </div>
5730 <p class="since">Since: 2.6.0</p>
5731 </div>
5732 <hr>
5733 <div class="refsect2">
5734 <a name="gnutls-x509-crt-set-crl-dist-points"></a><h3>gnutls_x509_crt_set_crl_dist_points ()</h3>
5735 <pre class="programlisting"><span class="returnvalue">int</span>
5736 gnutls_x509_crt_set_crl_dist_points (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
5737 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a> type</code></em>,
5738 <em class="parameter"><code>const <span class="type">void</span> *data_string</code></em>,
5739 <em class="parameter"><code>unsigned <span class="type">int</span> reason_flags</code></em>);</pre>
5740 <p>This function will set the CRL distribution points certificate extension.</p>
5741 <div class="refsect3">
5742 <a name="gnutls-x509-crt-set-crl-dist-points.parameters"></a><h4>Parameters</h4>
5743 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5744 <colgroup>
5745 <col width="150px" class="parameters_name">
5746 <col class="parameters_description">
5747 <col width="200px" class="parameters_annotations">
5748 </colgroup>
5749 <tbody>
5750 <tr>
5751 <td class="parameter_name"><p>crt</p></td>
5752 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
5753 <td class="parameter_annotations"> </td>
5754 </tr>
5755 <tr>
5756 <td class="parameter_name"><p>type</p></td>
5757 <td class="parameter_description"><p>is one of the gnutls_x509_subject_alt_name_t enumerations</p></td>
5758 <td class="parameter_annotations"> </td>
5759 </tr>
5760 <tr>
5761 <td class="parameter_name"><p>data_string</p></td>
5762 <td class="parameter_description"><p>The data to be set</p></td>
5763 <td class="parameter_annotations"> </td>
5764 </tr>
5765 <tr>
5766 <td class="parameter_name"><p>reason_flags</p></td>
5767 <td class="parameter_description"><p>revocation reasons</p></td>
5768 <td class="parameter_annotations"> </td>
5769 </tr>
5770 </tbody>
5771 </table></div>
5772 </div>
5773 <div class="refsect3">
5774 <a name="gnutls-x509-crt-set-crl-dist-points.returns"></a><h4>Returns</h4>
5775 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
5776 negative error value.</p>
5777 </div>
5778 </div>
5779 <hr>
5780 <div class="refsect2">
5781 <a name="gnutls-x509-crt-cpy-crl-dist-points"></a><h3>gnutls_x509_crt_cpy_crl_dist_points ()</h3>
5782 <pre class="programlisting"><span class="returnvalue">int</span>
5783 gnutls_x509_crt_cpy_crl_dist_points (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> dst</code></em>,
5784 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> src</code></em>);</pre>
5785 <p>This function will copy the CRL distribution points certificate
5786 extension, from the source to the destination certificate.
5787 This may be useful to copy from a CA certificate to issued ones.</p>
5788 <div class="refsect3">
5789 <a name="gnutls-x509-crt-cpy-crl-dist-points.parameters"></a><h4>Parameters</h4>
5790 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5791 <colgroup>
5792 <col width="150px" class="parameters_name">
5793 <col class="parameters_description">
5794 <col width="200px" class="parameters_annotations">
5795 </colgroup>
5796 <tbody>
5797 <tr>
5798 <td class="parameter_name"><p>dst</p></td>
5799 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
5800 <td class="parameter_annotations"> </td>
5801 </tr>
5802 <tr>
5803 <td class="parameter_name"><p>src</p></td>
5804 <td class="parameter_description"><p>the certificate where the dist points will be copied from</p></td>
5805 <td class="parameter_annotations"> </td>
5806 </tr>
5807 </tbody>
5808 </table></div>
5809 </div>
5810 <div class="refsect3">
5811 <a name="gnutls-x509-crt-cpy-crl-dist-points.returns"></a><h4>Returns</h4>
5812 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
5813 negative error value.</p>
5814 </div>
5815 </div>
5816 <hr>
5817 <div class="refsect2">
5818 <a name="gnutls-x509-crl-sign"></a><h3>gnutls_x509_crl_sign ()</h3>
5819 <pre class="programlisting"><span class="returnvalue">int</span>
5820 gnutls_x509_crl_sign (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
5821 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> issuer</code></em>,
5822 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> issuer_key</code></em>);</pre>
5823 <p>This function is the same a <a class="link" href="gnutls-x509.html#gnutls-x509-crl-sign2" title="gnutls_x509_crl_sign2 ()"><code class="function">gnutls_x509_crl_sign2()</code></a> with no flags,
5824 and an appropriate hash algorithm. The hash algorithm used may
5825 vary between versions of GnuTLS, and it is tied to the security
5826 level of the issuer's public key.</p>
5827 <div class="refsect3">
5828 <a name="gnutls-x509-crl-sign.parameters"></a><h4>Parameters</h4>
5829 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5830 <colgroup>
5831 <col width="150px" class="parameters_name">
5832 <col class="parameters_description">
5833 <col width="200px" class="parameters_annotations">
5834 </colgroup>
5835 <tbody>
5836 <tr>
5837 <td class="parameter_name"><p>crl</p></td>
5838 <td class="parameter_description"><p>should contain a gnutls_x509_crl_t type</p></td>
5839 <td class="parameter_annotations"> </td>
5840 </tr>
5841 <tr>
5842 <td class="parameter_name"><p>issuer</p></td>
5843 <td class="parameter_description"><p>is the certificate of the certificate issuer</p></td>
5844 <td class="parameter_annotations"> </td>
5845 </tr>
5846 <tr>
5847 <td class="parameter_name"><p>issuer_key</p></td>
5848 <td class="parameter_description"><p>holds the issuer's private key</p></td>
5849 <td class="parameter_annotations"> </td>
5850 </tr>
5851 </tbody>
5852 </table></div>
5853 </div>
5854 <div class="refsect3">
5855 <a name="gnutls-x509-crl-sign.returns"></a><h4>Returns</h4>
5856 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
5857 negative error value.</p>
5858 </div>
5859 </div>
5860 <hr>
5861 <div class="refsect2">
5862 <a name="gnutls-x509-crl-sign2"></a><h3>gnutls_x509_crl_sign2 ()</h3>
5863 <pre class="programlisting"><span class="returnvalue">int</span>
5864 gnutls_x509_crl_sign2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
5865 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> issuer</code></em>,
5866 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> issuer_key</code></em>,
5867 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> dig</code></em>,
5868 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
5869 <p>This function will sign the CRL with the issuer's private key, and
5870 will copy the issuer's information into the CRL.</p>
5871 <p>This must be the last step in a certificate CRL since all
5872 the previously set parameters are now signed.</p>
5873 <p>A known limitation of this function is, that a newly-signed CRL will not
5874 be fully functional (e.g., for signature verification), until it
5875 is exported an re-imported.</p>
5876 <p>After GnuTLS 3.6.1 the value of <em class="parameter"><code>dig</code></em>
5877 may be <a class="link" href="gnutls-gnutls.html#GNUTLS-DIG-UNKNOWN:CAPS"><code class="literal">GNUTLS_DIG_UNKNOWN</code></a>,
5878 and in that case, a suitable but reasonable for the key algorithm will be selected.</p>
5879 <div class="refsect3">
5880 <a name="gnutls-x509-crl-sign2.parameters"></a><h4>Parameters</h4>
5881 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5882 <colgroup>
5883 <col width="150px" class="parameters_name">
5884 <col class="parameters_description">
5885 <col width="200px" class="parameters_annotations">
5886 </colgroup>
5887 <tbody>
5888 <tr>
5889 <td class="parameter_name"><p>crl</p></td>
5890 <td class="parameter_description"><p>should contain a gnutls_x509_crl_t type</p></td>
5891 <td class="parameter_annotations"> </td>
5892 </tr>
5893 <tr>
5894 <td class="parameter_name"><p>issuer</p></td>
5895 <td class="parameter_description"><p>is the certificate of the certificate issuer</p></td>
5896 <td class="parameter_annotations"> </td>
5897 </tr>
5898 <tr>
5899 <td class="parameter_name"><p>issuer_key</p></td>
5900 <td class="parameter_description"><p>holds the issuer's private key</p></td>
5901 <td class="parameter_annotations"> </td>
5902 </tr>
5903 <tr>
5904 <td class="parameter_name"><p>dig</p></td>
5905 <td class="parameter_description"><p>The message digest to use. GNUTLS_DIG_SHA256 is the safe choice unless you know what you're doing.</p></td>
5906 <td class="parameter_annotations"> </td>
5907 </tr>
5908 <tr>
5909 <td class="parameter_name"><p>flags</p></td>
5910 <td class="parameter_description"><p>must be 0</p></td>
5911 <td class="parameter_annotations"> </td>
5912 </tr>
5913 </tbody>
5914 </table></div>
5915 </div>
5916 <div class="refsect3">
5917 <a name="gnutls-x509-crl-sign2.returns"></a><h4>Returns</h4>
5918 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
5919 negative error value.</p>
5920 </div>
5921 </div>
5922 <hr>
5923 <div class="refsect2">
5924 <a name="gnutls-x509-crt-get-activation-time"></a><h3>gnutls_x509_crt_get_activation_time ()</h3>
5925 <pre class="programlisting"><span class="returnvalue">time_t</span>
5926 gnutls_x509_crt_get_activation_time (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>);</pre>
5927 <p>This function will return the time this Certificate was or will be
5928 activated.</p>
5929 <div class="refsect3">
5930 <a name="gnutls-x509-crt-get-activation-time.parameters"></a><h4>Parameters</h4>
5931 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5932 <colgroup>
5933 <col width="150px" class="parameters_name">
5934 <col class="parameters_description">
5935 <col width="200px" class="parameters_annotations">
5936 </colgroup>
5937 <tbody><tr>
5938 <td class="parameter_name"><p>cert</p></td>
5939 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
5940 <td class="parameter_annotations"> </td>
5941 </tr></tbody>
5942 </table></div>
5943 </div>
5944 <div class="refsect3">
5945 <a name="gnutls-x509-crt-get-activation-time.returns"></a><h4>Returns</h4>
5946 <p> activation time, or (time_t)-1 on error.</p>
5947 </div>
5948 </div>
5949 <hr>
5950 <div class="refsect2">
5951 <a name="gnutls-x509-crt-get-expiration-time"></a><h3>gnutls_x509_crt_get_expiration_time ()</h3>
5952 <pre class="programlisting"><span class="returnvalue">time_t</span>
5953 gnutls_x509_crt_get_expiration_time (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>);</pre>
5954 <p>This function will return the time this certificate was or will be
5955 expired.</p>
5956 <div class="refsect3">
5957 <a name="gnutls-x509-crt-get-expiration-time.parameters"></a><h4>Parameters</h4>
5958 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5959 <colgroup>
5960 <col width="150px" class="parameters_name">
5961 <col class="parameters_description">
5962 <col width="200px" class="parameters_annotations">
5963 </colgroup>
5964 <tbody><tr>
5965 <td class="parameter_name"><p>cert</p></td>
5966 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
5967 <td class="parameter_annotations"> </td>
5968 </tr></tbody>
5969 </table></div>
5970 </div>
5971 <div class="refsect3">
5972 <a name="gnutls-x509-crt-get-expiration-time.returns"></a><h4>Returns</h4>
5973 <p> expiration time, or (time_t)-1 on error.</p>
5974 </div>
5975 </div>
5976 <hr>
5977 <div class="refsect2">
5978 <a name="gnutls-x509-crt-get-serial"></a><h3>gnutls_x509_crt_get_serial ()</h3>
5979 <pre class="programlisting"><span class="returnvalue">int</span>
5980 gnutls_x509_crt_get_serial (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
5981 <em class="parameter"><code><span class="type">void</span> *result</code></em>,
5982 <em class="parameter"><code><span class="type">size_t</span> *result_size</code></em>);</pre>
5983 <p>This function will return the X.509 certificate's serial number.
5984 This is obtained by the X509 Certificate serialNumber field. Serial
5985 is not always a 32 or 64bit number. Some CAs use large serial
5986 numbers, thus it may be wise to handle it as something uint8_t.</p>
5987 <div class="refsect3">
5988 <a name="gnutls-x509-crt-get-serial.parameters"></a><h4>Parameters</h4>
5989 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5990 <colgroup>
5991 <col width="150px" class="parameters_name">
5992 <col class="parameters_description">
5993 <col width="200px" class="parameters_annotations">
5994 </colgroup>
5995 <tbody>
5996 <tr>
5997 <td class="parameter_name"><p>cert</p></td>
5998 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
5999 <td class="parameter_annotations"> </td>
6000 </tr>
6001 <tr>
6002 <td class="parameter_name"><p>result</p></td>
6003 <td class="parameter_description"><p>The place where the serial number will be copied</p></td>
6004 <td class="parameter_annotations"> </td>
6005 </tr>
6006 <tr>
6007 <td class="parameter_name"><p>result_size</p></td>
6008 <td class="parameter_description"><p>Holds the size of the result field.</p></td>
6009 <td class="parameter_annotations"> </td>
6010 </tr>
6011 </tbody>
6012 </table></div>
6013 </div>
6014 <div class="refsect3">
6015 <a name="gnutls-x509-crt-get-serial.returns"></a><h4>Returns</h4>
6016 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
6017 negative error value.</p>
6018 </div>
6019 </div>
6020 <hr>
6021 <div class="refsect2">
6022 <a name="gnutls-x509-spki-init"></a><h3>gnutls_x509_spki_init ()</h3>
6023 <pre class="programlisting"><span class="returnvalue">int</span>
6024 gnutls_x509_spki_init (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a> *spki</code></em>);</pre>
6025 <p>This function will initialize a SubjectPublicKeyInfo structure used
6026 in PKIX. The structure is used to set additional parameters
6027 in the public key information field of a certificate.</p>
6028 <div class="refsect3">
6029 <a name="gnutls-x509-spki-init.parameters"></a><h4>Parameters</h4>
6030 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6031 <colgroup>
6032 <col width="150px" class="parameters_name">
6033 <col class="parameters_description">
6034 <col width="200px" class="parameters_annotations">
6035 </colgroup>
6036 <tbody><tr>
6037 <td class="parameter_name"><p>spki</p></td>
6038 <td class="parameter_description"><p>A pointer to the type to be initialized</p></td>
6039 <td class="parameter_annotations"> </td>
6040 </tr></tbody>
6041 </table></div>
6042 </div>
6043 <div class="refsect3">
6044 <a name="gnutls-x509-spki-init.returns"></a><h4>Returns</h4>
6045 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
6046 negative error value.</p>
6047 </div>
6048 <p class="since">Since: 3.6.0</p>
6049 </div>
6050 <hr>
6051 <div class="refsect2">
6052 <a name="gnutls-x509-spki-deinit"></a><h3>gnutls_x509_spki_deinit ()</h3>
6053 <pre class="programlisting"><span class="returnvalue">void</span>
6054 gnutls_x509_spki_deinit (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a> spki</code></em>);</pre>
6055 <p>This function will deinitialize a SubjectPublicKeyInfo structure.</p>
6056 <div class="refsect3">
6057 <a name="gnutls-x509-spki-deinit.parameters"></a><h4>Parameters</h4>
6058 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6059 <colgroup>
6060 <col width="150px" class="parameters_name">
6061 <col class="parameters_description">
6062 <col width="200px" class="parameters_annotations">
6063 </colgroup>
6064 <tbody><tr>
6065 <td class="parameter_name"><p>spki</p></td>
6066 <td class="parameter_description"><p>the SubjectPublicKeyInfo structure</p></td>
6067 <td class="parameter_annotations"> </td>
6068 </tr></tbody>
6069 </table></div>
6070 </div>
6071 <p class="since">Since: 3.6.0</p>
6072 </div>
6073 <hr>
6074 <div class="refsect2">
6075 <a name="gnutls-x509-spki-get-rsa-pss-params"></a><h3>gnutls_x509_spki_get_rsa_pss_params ()</h3>
6076 <pre class="programlisting"><span class="returnvalue">int</span>
6077 gnutls_x509_spki_get_rsa_pss_params (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a> spki</code></em>,
6078 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> *dig</code></em>,
6079 <em class="parameter"><code>unsigned <span class="type">int</span> *salt_size</code></em>);</pre>
6080 <p>This function will get the public key algorithm parameters
6081 of RSA-PSS type.</p>
6082 <div class="refsect3">
6083 <a name="gnutls-x509-spki-get-rsa-pss-params.parameters"></a><h4>Parameters</h4>
6084 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6085 <colgroup>
6086 <col width="150px" class="parameters_name">
6087 <col class="parameters_description">
6088 <col width="200px" class="parameters_annotations">
6089 </colgroup>
6090 <tbody>
6091 <tr>
6092 <td class="parameter_name"><p>spki</p></td>
6093 <td class="parameter_description"><p>the SubjectPublicKeyInfo structure</p></td>
6094 <td class="parameter_annotations"> </td>
6095 </tr>
6096 <tr>
6097 <td class="parameter_name"><p>dig</p></td>
6098 <td class="parameter_description"><p>if non-NULL, it will hold the digest algorithm</p></td>
6099 <td class="parameter_annotations"> </td>
6100 </tr>
6101 <tr>
6102 <td class="parameter_name"><p>salt_size</p></td>
6103 <td class="parameter_description"><p>if non-NULL, it will hold the salt size</p></td>
6104 <td class="parameter_annotations"> </td>
6105 </tr>
6106 </tbody>
6107 </table></div>
6108 </div>
6109 <div class="refsect3">
6110 <a name="gnutls-x509-spki-get-rsa-pss-params.returns"></a><h4>Returns</h4>
6111 <p> zero if the parameters are present or a negative
6112 value on error.</p>
6113 </div>
6114 <p class="since">Since: 3.6.0</p>
6115 </div>
6116 <hr>
6117 <div class="refsect2">
6118 <a name="gnutls-x509-spki-set-rsa-pss-params"></a><h3>gnutls_x509_spki_set_rsa_pss_params ()</h3>
6119 <pre class="programlisting"><span class="returnvalue">void</span>
6120 gnutls_x509_spki_set_rsa_pss_params (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a> spki</code></em>,
6121 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> dig</code></em>,
6122 <em class="parameter"><code>unsigned <span class="type">int</span> salt_size</code></em>);</pre>
6123 <p>This function will set the public key parameters for
6124 an RSA-PSS algorithm, in the SubjectPublicKeyInfo structure.</p>
6125 <div class="refsect3">
6126 <a name="gnutls-x509-spki-set-rsa-pss-params.parameters"></a><h4>Parameters</h4>
6127 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6128 <colgroup>
6129 <col width="150px" class="parameters_name">
6130 <col class="parameters_description">
6131 <col width="200px" class="parameters_annotations">
6132 </colgroup>
6133 <tbody>
6134 <tr>
6135 <td class="parameter_name"><p>spki</p></td>
6136 <td class="parameter_description"><p>the SubjectPublicKeyInfo structure</p></td>
6137 <td class="parameter_annotations"> </td>
6138 </tr>
6139 <tr>
6140 <td class="parameter_name"><p>dig</p></td>
6141 <td class="parameter_description"><p>a digest algorithm of type <a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a></p></td>
6142 <td class="parameter_annotations"> </td>
6143 </tr>
6144 <tr>
6145 <td class="parameter_name"><p>salt_size</p></td>
6146 <td class="parameter_description"><p>the size of salt string</p></td>
6147 <td class="parameter_annotations"> </td>
6148 </tr>
6149 </tbody>
6150 </table></div>
6151 </div>
6152 <p class="since">Since: 3.6.0</p>
6153 </div>
6154 <hr>
6155 <div class="refsect2">
6156 <a name="gnutls-x509-spki-set-rsa-oaep-params"></a><h3>gnutls_x509_spki_set_rsa_oaep_params ()</h3>
6157 <pre class="programlisting"><span class="returnvalue">int</span>
6158 gnutls_x509_spki_set_rsa_oaep_params (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a> spki</code></em>,
6159 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> dig</code></em>,
6160 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *label</code></em>);</pre>
6161 <p>This function will set the public key parameters for
6162 an RSA-OAEP algorithm, in the SubjectPublicKeyInfo structure.</p>
6163 <div class="refsect3">
6164 <a name="gnutls-x509-spki-set-rsa-oaep-params.parameters"></a><h4>Parameters</h4>
6165 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6166 <colgroup>
6167 <col width="150px" class="parameters_name">
6168 <col class="parameters_description">
6169 <col width="200px" class="parameters_annotations">
6170 </colgroup>
6171 <tbody>
6172 <tr>
6173 <td class="parameter_name"><p>spki</p></td>
6174 <td class="parameter_description"><p>the SubjectPublicKeyInfo structure</p></td>
6175 <td class="parameter_annotations"> </td>
6176 </tr>
6177 <tr>
6178 <td class="parameter_name"><p>dig</p></td>
6179 <td class="parameter_description"><p>a digest algorithm of type <a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a></p></td>
6180 <td class="parameter_annotations"> </td>
6181 </tr>
6182 <tr>
6183 <td class="parameter_name"><p>label</p></td>
6184 <td class="parameter_description"><p>optional label</p></td>
6185 <td class="parameter_annotations"> </td>
6186 </tr>
6187 </tbody>
6188 </table></div>
6189 </div>
6190 <div class="refsect3">
6191 <a name="gnutls-x509-spki-set-rsa-oaep-params.returns"></a><h4>Returns</h4>
6192 <p> zero if the parameters are present or a negative
6193 value on error.</p>
6194 </div>
6195 <p class="since">Since: 3.8.4</p>
6196 </div>
6197 <hr>
6198 <div class="refsect2">
6199 <a name="gnutls-x509-spki-get-rsa-oaep-params"></a><h3>gnutls_x509_spki_get_rsa_oaep_params ()</h3>
6200 <pre class="programlisting"><span class="returnvalue">int</span>
6201 gnutls_x509_spki_get_rsa_oaep_params (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a> spki</code></em>,
6202 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> *dig</code></em>,
6203 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *label</code></em>);</pre>
6204 <p>This function will get the public key algorithm parameters
6205 of RSA-OAEP type.</p>
6206 <div class="refsect3">
6207 <a name="gnutls-x509-spki-get-rsa-oaep-params.parameters"></a><h4>Parameters</h4>
6208 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6209 <colgroup>
6210 <col width="150px" class="parameters_name">
6211 <col class="parameters_description">
6212 <col width="200px" class="parameters_annotations">
6213 </colgroup>
6214 <tbody>
6215 <tr>
6216 <td class="parameter_name"><p>spki</p></td>
6217 <td class="parameter_description"><p>the SubjectPublicKeyInfo structure</p></td>
6218 <td class="parameter_annotations"> </td>
6219 </tr>
6220 <tr>
6221 <td class="parameter_name"><p>dig</p></td>
6222 <td class="parameter_description"><p>if non-NULL, it will hold the digest algorithm</p></td>
6223 <td class="parameter_annotations"> </td>
6224 </tr>
6225 <tr>
6226 <td class="parameter_name"><p>label</p></td>
6227 <td class="parameter_description"><p>if non-NULL, it will hold the pointer to label</p></td>
6228 <td class="parameter_annotations"> </td>
6229 </tr>
6230 </tbody>
6231 </table></div>
6232 </div>
6233 <div class="refsect3">
6234 <a name="gnutls-x509-spki-get-rsa-oaep-params.returns"></a><h4>Returns</h4>
6235 <p> zero if the parameters are present or a negative
6236 value on error.</p>
6237 </div>
6238 <p class="since">Since: 3.8.4</p>
6239 </div>
6240 <hr>
6241 <div class="refsect2">
6242 <a name="gnutls-x509-crt-get-pk-algorithm"></a><h3>gnutls_x509_crt_get_pk_algorithm ()</h3>
6243 <pre class="programlisting"><span class="returnvalue">int</span>
6244 gnutls_x509_crt_get_pk_algorithm (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
6245 <em class="parameter"><code>unsigned <span class="type">int</span> *bits</code></em>);</pre>
6246 <p>This function will return the public key algorithm of an X.509
6247 certificate.</p>
6248 <p>If bits is non null, it should have enough size to hold the parameters
6249 size in bits. For RSA the bits returned is the modulus.
6250 For DSA the bits returned are of the public
6251 exponent.</p>
6252 <p>Unknown/unsupported algorithms are mapped to <a class="link" href="gnutls-gnutls.html#GNUTLS-PK-UNKNOWN:CAPS"><code class="literal">GNUTLS_PK_UNKNOWN</code></a>.</p>
6253 <div class="refsect3">
6254 <a name="gnutls-x509-crt-get-pk-algorithm.parameters"></a><h4>Parameters</h4>
6255 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6256 <colgroup>
6257 <col width="150px" class="parameters_name">
6258 <col class="parameters_description">
6259 <col width="200px" class="parameters_annotations">
6260 </colgroup>
6261 <tbody>
6262 <tr>
6263 <td class="parameter_name"><p>cert</p></td>
6264 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
6265 <td class="parameter_annotations"> </td>
6266 </tr>
6267 <tr>
6268 <td class="parameter_name"><p>bits</p></td>
6269 <td class="parameter_description"><p>if bits is non null it will hold the size of the parameters' in bits</p></td>
6270 <td class="parameter_annotations"> </td>
6271 </tr>
6272 </tbody>
6273 </table></div>
6274 </div>
6275 <div class="refsect3">
6276 <a name="gnutls-x509-crt-get-pk-algorithm.returns"></a><h4>Returns</h4>
6277 <p> a member of the <a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t"><span class="type">gnutls_pk_algorithm_t</span></a> enumeration on
6278 success, or a negative error code on error.</p>
6279 </div>
6280 </div>
6281 <hr>
6282 <div class="refsect2">
6283 <a name="gnutls-x509-crt-set-spki"></a><h3>gnutls_x509_crt_set_spki ()</h3>
6284 <pre class="programlisting"><span class="returnvalue">int</span>
6285 gnutls_x509_crt_set_spki (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
6286 <em class="parameter"><code>const <a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a> spki</code></em>,
6287 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
6288 <p>This function will set the certificate's subject public key
6289 information explicitly. This is intended to be used in the cases
6290 where a single public key (e.g., RSA) can be used for multiple
6291 signature algorithms (RSA PKCS1-1.5, and RSA-PSS).</p>
6292 <p>To export the public key (i.e., the SubjectPublicKeyInfo part), check
6293 <a class="link" href="gnutls-abstract.html#gnutls-pubkey-import-x509" title="gnutls_pubkey_import_x509 ()"><code class="function">gnutls_pubkey_import_x509()</code></a>.</p>
6294 <div class="refsect3">
6295 <a name="gnutls-x509-crt-set-spki.parameters"></a><h4>Parameters</h4>
6296 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6297 <colgroup>
6298 <col width="150px" class="parameters_name">
6299 <col class="parameters_description">
6300 <col width="200px" class="parameters_annotations">
6301 </colgroup>
6302 <tbody>
6303 <tr>
6304 <td class="parameter_name"><p>crt</p></td>
6305 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
6306 <td class="parameter_annotations"> </td>
6307 </tr>
6308 <tr>
6309 <td class="parameter_name"><p>spki</p></td>
6310 <td class="parameter_description"><p>a SubjectPublicKeyInfo structure of type <a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a></p></td>
6311 <td class="parameter_annotations"> </td>
6312 </tr>
6313 <tr>
6314 <td class="parameter_name"><p>flags</p></td>
6315 <td class="parameter_description"><p>must be zero</p></td>
6316 <td class="parameter_annotations"> </td>
6317 </tr>
6318 </tbody>
6319 </table></div>
6320 </div>
6321 <div class="refsect3">
6322 <a name="gnutls-x509-crt-set-spki.returns"></a><h4>Returns</h4>
6323 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
6324 negative error value.</p>
6325 </div>
6326 <p class="since">Since: 3.6.0</p>
6327 </div>
6328 <hr>
6329 <div class="refsect2">
6330 <a name="gnutls-x509-crt-get-spki"></a><h3>gnutls_x509_crt_get_spki ()</h3>
6331 <pre class="programlisting"><span class="returnvalue">int</span>
6332 gnutls_x509_crt_get_spki (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
6333 <em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a> spki</code></em>,
6334 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
6335 <p>This function will return the public key information of an X.509
6336 certificate. The provided <em class="parameter"><code>spki</code></em>
6337 must be initialized.</p>
6338 <div class="refsect3">
6339 <a name="gnutls-x509-crt-get-spki.parameters"></a><h4>Parameters</h4>
6340 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6341 <colgroup>
6342 <col width="150px" class="parameters_name">
6343 <col class="parameters_description">
6344 <col width="200px" class="parameters_annotations">
6345 </colgroup>
6346 <tbody>
6347 <tr>
6348 <td class="parameter_name"><p>cert</p></td>
6349 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
6350 <td class="parameter_annotations"> </td>
6351 </tr>
6352 <tr>
6353 <td class="parameter_name"><p>spki</p></td>
6354 <td class="parameter_description"><p>a SubjectPublicKeyInfo structure of type <a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a></p></td>
6355 <td class="parameter_annotations"> </td>
6356 </tr>
6357 <tr>
6358 <td class="parameter_name"><p>flags</p></td>
6359 <td class="parameter_description"><p>must be zero</p></td>
6360 <td class="parameter_annotations"> </td>
6361 </tr>
6362 </tbody>
6363 </table></div>
6364 </div>
6365 <p class="since">Since: 3.6.0</p>
6366 </div>
6367 <hr>
6368 <div class="refsect2">
6369 <a name="gnutls-x509-crt-get-pk-rsa-raw"></a><h3>gnutls_x509_crt_get_pk_rsa_raw ()</h3>
6370 <pre class="programlisting"><span class="returnvalue">int</span>
6371 gnutls_x509_crt_get_pk_rsa_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
6372 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *m</code></em>,
6373 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *e</code></em>);</pre>
6374 <p>This function will export the RSA public key's parameters found in
6375 the given structure. The new parameters will be allocated using
6376 <code class="function">gnutls_malloc()</code> and will be stored in the appropriate datum.</p>
6377 <div class="refsect3">
6378 <a name="gnutls-x509-crt-get-pk-rsa-raw.parameters"></a><h4>Parameters</h4>
6379 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6380 <colgroup>
6381 <col width="150px" class="parameters_name">
6382 <col class="parameters_description">
6383 <col width="200px" class="parameters_annotations">
6384 </colgroup>
6385 <tbody>
6386 <tr>
6387 <td class="parameter_name"><p>crt</p></td>
6388 <td class="parameter_description"><p>Holds the certificate</p></td>
6389 <td class="parameter_annotations"> </td>
6390 </tr>
6391 <tr>
6392 <td class="parameter_name"><p>m</p></td>
6393 <td class="parameter_description"><p>will hold the modulus</p></td>
6394 <td class="parameter_annotations"> </td>
6395 </tr>
6396 <tr>
6397 <td class="parameter_name"><p>e</p></td>
6398 <td class="parameter_description"><p>will hold the public exponent</p></td>
6399 <td class="parameter_annotations"> </td>
6400 </tr>
6401 </tbody>
6402 </table></div>
6403 </div>
6404 <div class="refsect3">
6405 <a name="gnutls-x509-crt-get-pk-rsa-raw.returns"></a><h4>Returns</h4>
6406 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p>
6407 </div>
6408 </div>
6409 <hr>
6410 <div class="refsect2">
6411 <a name="gnutls-x509-crt-get-pk-dsa-raw"></a><h3>gnutls_x509_crt_get_pk_dsa_raw ()</h3>
6412 <pre class="programlisting"><span class="returnvalue">int</span>
6413 gnutls_x509_crt_get_pk_dsa_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
6414 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *p</code></em>,
6415 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *q</code></em>,
6416 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *g</code></em>,
6417 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *y</code></em>);</pre>
6418 <p>This function will export the DSA public key's parameters found in
6419 the given certificate. The new parameters will be allocated using
6420 <code class="function">gnutls_malloc()</code> and will be stored in the appropriate datum.</p>
6421 <div class="refsect3">
6422 <a name="gnutls-x509-crt-get-pk-dsa-raw.parameters"></a><h4>Parameters</h4>
6423 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6424 <colgroup>
6425 <col width="150px" class="parameters_name">
6426 <col class="parameters_description">
6427 <col width="200px" class="parameters_annotations">
6428 </colgroup>
6429 <tbody>
6430 <tr>
6431 <td class="parameter_name"><p>crt</p></td>
6432 <td class="parameter_description"><p>Holds the certificate</p></td>
6433 <td class="parameter_annotations"> </td>
6434 </tr>
6435 <tr>
6436 <td class="parameter_name"><p>p</p></td>
6437 <td class="parameter_description"><p>will hold the p</p></td>
6438 <td class="parameter_annotations"> </td>
6439 </tr>
6440 <tr>
6441 <td class="parameter_name"><p>q</p></td>
6442 <td class="parameter_description"><p>will hold the q</p></td>
6443 <td class="parameter_annotations"> </td>
6444 </tr>
6445 <tr>
6446 <td class="parameter_name"><p>g</p></td>
6447 <td class="parameter_description"><p>will hold the g</p></td>
6448 <td class="parameter_annotations"> </td>
6449 </tr>
6450 <tr>
6451 <td class="parameter_name"><p>y</p></td>
6452 <td class="parameter_description"><p>will hold the y</p></td>
6453 <td class="parameter_annotations"> </td>
6454 </tr>
6455 </tbody>
6456 </table></div>
6457 </div>
6458 <div class="refsect3">
6459 <a name="gnutls-x509-crt-get-pk-dsa-raw.returns"></a><h4>Returns</h4>
6460 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p>
6461 </div>
6462 </div>
6463 <hr>
6464 <div class="refsect2">
6465 <a name="gnutls-x509-crt-get-pk-ecc-raw"></a><h3>gnutls_x509_crt_get_pk_ecc_raw ()</h3>
6466 <pre class="programlisting"><span class="returnvalue">int</span>
6467 gnutls_x509_crt_get_pk_ecc_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
6468 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ecc-curve-t" title="enum gnutls_ecc_curve_t"><span class="type">gnutls_ecc_curve_t</span></a> *curve</code></em>,
6469 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *x</code></em>,
6470 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *y</code></em>);</pre>
6471 <p>This function will export the ECC public key's parameters found in
6472 the given certificate. The new parameters will be allocated using
6473 <code class="function">gnutls_malloc()</code> and will be stored in the appropriate datum.</p>
6474 <p>In EdDSA curves the <em class="parameter"><code>y</code></em>
6475 parameter will be <code class="literal">NULL</code> and the other parameters
6476 will be in the native format for the curve.</p>
6477 <div class="refsect3">
6478 <a name="gnutls-x509-crt-get-pk-ecc-raw.parameters"></a><h4>Parameters</h4>
6479 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6480 <colgroup>
6481 <col width="150px" class="parameters_name">
6482 <col class="parameters_description">
6483 <col width="200px" class="parameters_annotations">
6484 </colgroup>
6485 <tbody>
6486 <tr>
6487 <td class="parameter_name"><p>crt</p></td>
6488 <td class="parameter_description"><p>Holds the certificate</p></td>
6489 <td class="parameter_annotations"> </td>
6490 </tr>
6491 <tr>
6492 <td class="parameter_name"><p>curve</p></td>
6493 <td class="parameter_description"><p>will hold the curve</p></td>
6494 <td class="parameter_annotations"> </td>
6495 </tr>
6496 <tr>
6497 <td class="parameter_name"><p>x</p></td>
6498 <td class="parameter_description"><p>will hold the x-coordinate</p></td>
6499 <td class="parameter_annotations"> </td>
6500 </tr>
6501 <tr>
6502 <td class="parameter_name"><p>y</p></td>
6503 <td class="parameter_description"><p>will hold the y-coordinate</p></td>
6504 <td class="parameter_annotations"> </td>
6505 </tr>
6506 </tbody>
6507 </table></div>
6508 </div>
6509 <div class="refsect3">
6510 <a name="gnutls-x509-crt-get-pk-ecc-raw.returns"></a><h4>Returns</h4>
6511 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p>
6512 </div>
6513 <p class="since">Since: 3.4.1</p>
6514 </div>
6515 <hr>
6516 <div class="refsect2">
6517 <a name="gnutls-x509-crt-get-pk-gost-raw"></a><h3>gnutls_x509_crt_get_pk_gost_raw ()</h3>
6518 <pre class="programlisting"><span class="returnvalue">int</span>
6519 gnutls_x509_crt_get_pk_gost_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
6520 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ecc-curve-t" title="enum gnutls_ecc_curve_t"><span class="type">gnutls_ecc_curve_t</span></a> *curve</code></em>,
6521 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> *digest</code></em>,
6522 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-gost-paramset-t" title="enum gnutls_gost_paramset_t"><span class="type">gnutls_gost_paramset_t</span></a> *paramset</code></em>,
6523 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *x</code></em>,
6524 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *y</code></em>);</pre>
6525 <p>This function will export the GOST public key's parameters found in
6526 the given certificate. The new parameters will be allocated using
6527 <code class="function">gnutls_malloc()</code> and will be stored in the appropriate datum.</p>
6528 <div class="refsect3">
6529 <a name="gnutls-x509-crt-get-pk-gost-raw.parameters"></a><h4>Parameters</h4>
6530 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6531 <colgroup>
6532 <col width="150px" class="parameters_name">
6533 <col class="parameters_description">
6534 <col width="200px" class="parameters_annotations">
6535 </colgroup>
6536 <tbody>
6537 <tr>
6538 <td class="parameter_name"><p>crt</p></td>
6539 <td class="parameter_description"><p>Holds the certificate</p></td>
6540 <td class="parameter_annotations"> </td>
6541 </tr>
6542 <tr>
6543 <td class="parameter_name"><p>curve</p></td>
6544 <td class="parameter_description"><p>will hold the curve</p></td>
6545 <td class="parameter_annotations"> </td>
6546 </tr>
6547 <tr>
6548 <td class="parameter_name"><p>digest</p></td>
6549 <td class="parameter_description"><p>will hold the digest</p></td>
6550 <td class="parameter_annotations"> </td>
6551 </tr>
6552 <tr>
6553 <td class="parameter_name"><p>paramset</p></td>
6554 <td class="parameter_description"><p>will hold the GOST parameter set ID</p></td>
6555 <td class="parameter_annotations"> </td>
6556 </tr>
6557 <tr>
6558 <td class="parameter_name"><p>x</p></td>
6559 <td class="parameter_description"><p>will hold the x-coordinate</p></td>
6560 <td class="parameter_annotations"> </td>
6561 </tr>
6562 <tr>
6563 <td class="parameter_name"><p>y</p></td>
6564 <td class="parameter_description"><p>will hold the y-coordinate</p></td>
6565 <td class="parameter_annotations"> </td>
6566 </tr>
6567 </tbody>
6568 </table></div>
6569 </div>
6570 <div class="refsect3">
6571 <a name="gnutls-x509-crt-get-pk-gost-raw.returns"></a><h4>Returns</h4>
6572 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p>
6573 </div>
6574 <p class="since">Since: 3.6.3</p>
6575 </div>
6576 <hr>
6577 <div class="refsect2">
6578 <a name="gnutls-x509-crt-get-subject-alt-name"></a><h3>gnutls_x509_crt_get_subject_alt_name ()</h3>
6579 <pre class="programlisting"><span class="returnvalue">int</span>
6580 gnutls_x509_crt_get_subject_alt_name (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
6581 <em class="parameter"><code>unsigned <span class="type">int</span> seq</code></em>,
6582 <em class="parameter"><code><span class="type">void</span> *san</code></em>,
6583 <em class="parameter"><code><span class="type">size_t</span> *san_size</code></em>,
6584 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
6585 <p>This function retrieves the Alternative Name (2.5.29.17), contained
6586 in the given certificate in the X509v3 Certificate Extensions.</p>
6587 <p>When the SAN type is otherName, it will extract the data in the
6588 otherName's value field, and <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME</code></a> is returned.
6589 You may use <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-subject-alt-othername-oid" title="gnutls_x509_crt_get_subject_alt_othername_oid ()"><code class="function">gnutls_x509_crt_get_subject_alt_othername_oid()</code></a> to get
6590 the corresponding OID and the "virtual" SAN types (e.g.,
6591 <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME-XMPP:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME_XMPP</code></a>).</p>
6592 <p>If an otherName OID is known, the data will be decoded. Otherwise
6593 the returned data will be DER encoded, and you will have to decode
6594 it yourself. Currently, only the RFC 3920 id-on-xmppAddr SAN is
6595 recognized.</p>
6596 <div class="refsect3">
6597 <a name="gnutls-x509-crt-get-subject-alt-name.parameters"></a><h4>Parameters</h4>
6598 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6599 <colgroup>
6600 <col width="150px" class="parameters_name">
6601 <col class="parameters_description">
6602 <col width="200px" class="parameters_annotations">
6603 </colgroup>
6604 <tbody>
6605 <tr>
6606 <td class="parameter_name"><p>cert</p></td>
6607 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
6608 <td class="parameter_annotations"> </td>
6609 </tr>
6610 <tr>
6611 <td class="parameter_name"><p>seq</p></td>
6612 <td class="parameter_description"><p>specifies the sequence number of the alt name (0 for the first one, 1 for the second etc.)</p></td>
6613 <td class="parameter_annotations"> </td>
6614 </tr>
6615 <tr>
6616 <td class="parameter_name"><p>san</p></td>
6617 <td class="parameter_description"><p>is the place where the alternative name will be copied to</p></td>
6618 <td class="parameter_annotations"> </td>
6619 </tr>
6620 <tr>
6621 <td class="parameter_name"><p>san_size</p></td>
6622 <td class="parameter_description"><p>holds the size of san.</p></td>
6623 <td class="parameter_annotations"> </td>
6624 </tr>
6625 <tr>
6626 <td class="parameter_name"><p>critical</p></td>
6627 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical (may be null)</p></td>
6628 <td class="parameter_annotations"> </td>
6629 </tr>
6630 </tbody>
6631 </table></div>
6632 </div>
6633 <div class="refsect3">
6634 <a name="gnutls-x509-crt-get-subject-alt-name.returns"></a><h4>Returns</h4>
6635 <p> the alternative subject name type on success, one of the
6636 enumerated <a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a>. It will return
6637 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if <em class="parameter"><code>san_size</code></em>
6638 is not large enough to
6639 hold the value. In that case <em class="parameter"><code>san_size</code></em>
6640 will be updated with the
6641 required size. If the certificate does not have an Alternative
6642 name with the specified sequence number then
6643 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> is returned.</p>
6644 </div>
6645 </div>
6646 <hr>
6647 <div class="refsect2">
6648 <a name="gnutls-x509-crt-get-subject-alt-name2"></a><h3>gnutls_x509_crt_get_subject_alt_name2 ()</h3>
6649 <pre class="programlisting"><span class="returnvalue">int</span>
6650 gnutls_x509_crt_get_subject_alt_name2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
6651 <em class="parameter"><code>unsigned <span class="type">int</span> seq</code></em>,
6652 <em class="parameter"><code><span class="type">void</span> *san</code></em>,
6653 <em class="parameter"><code><span class="type">size_t</span> *san_size</code></em>,
6654 <em class="parameter"><code>unsigned <span class="type">int</span> *san_type</code></em>,
6655 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
6656 <p>This function will return the alternative names, contained in the
6657 given certificate. It is the same as
6658 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-subject-alt-name" title="gnutls_x509_crt_get_subject_alt_name ()"><code class="function">gnutls_x509_crt_get_subject_alt_name()</code></a> except for the fact that it
6659 will return the type of the alternative name in <em class="parameter"><code>san_type</code></em>
6660 even if
6661 the function fails for some reason (i.e. the buffer provided is
6662 not enough).</p>
6663 <div class="refsect3">
6664 <a name="gnutls-x509-crt-get-subject-alt-name2.parameters"></a><h4>Parameters</h4>
6665 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6666 <colgroup>
6667 <col width="150px" class="parameters_name">
6668 <col class="parameters_description">
6669 <col width="200px" class="parameters_annotations">
6670 </colgroup>
6671 <tbody>
6672 <tr>
6673 <td class="parameter_name"><p>cert</p></td>
6674 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
6675 <td class="parameter_annotations"> </td>
6676 </tr>
6677 <tr>
6678 <td class="parameter_name"><p>seq</p></td>
6679 <td class="parameter_description"><p>specifies the sequence number of the alt name (0 for the first one, 1 for the second etc.)</p></td>
6680 <td class="parameter_annotations"> </td>
6681 </tr>
6682 <tr>
6683 <td class="parameter_name"><p>san</p></td>
6684 <td class="parameter_description"><p>is the place where the alternative name will be copied to</p></td>
6685 <td class="parameter_annotations"> </td>
6686 </tr>
6687 <tr>
6688 <td class="parameter_name"><p>san_size</p></td>
6689 <td class="parameter_description"><p>holds the size of ret.</p></td>
6690 <td class="parameter_annotations"> </td>
6691 </tr>
6692 <tr>
6693 <td class="parameter_name"><p>san_type</p></td>
6694 <td class="parameter_description"><p>holds the type of the alternative name (one of gnutls_x509_subject_alt_name_t).</p></td>
6695 <td class="parameter_annotations"> </td>
6696 </tr>
6697 <tr>
6698 <td class="parameter_name"><p>critical</p></td>
6699 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical (may be null)</p></td>
6700 <td class="parameter_annotations"> </td>
6701 </tr>
6702 </tbody>
6703 </table></div>
6704 </div>
6705 <div class="refsect3">
6706 <a name="gnutls-x509-crt-get-subject-alt-name2.returns"></a><h4>Returns</h4>
6707 <p> the alternative subject name type on success, one of the
6708 enumerated <a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a>. It will return
6709 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if <em class="parameter"><code>san_size</code></em>
6710 is not large enough
6711 to hold the value. In that case <em class="parameter"><code>san_size</code></em>
6712 will be updated with
6713 the required size. If the certificate does not have an
6714 Alternative name with the specified sequence number then
6715 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> is returned.</p>
6716 </div>
6717 </div>
6718 <hr>
6719 <div class="refsect2">
6720 <a name="gnutls-x509-crt-get-subject-alt-othername-oid"></a><h3>gnutls_x509_crt_get_subject_alt_othername_oid ()</h3>
6721 <pre class="programlisting"><span class="returnvalue">int</span>
6722 gnutls_x509_crt_get_subject_alt_othername_oid
6723 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
6724 <em class="parameter"><code>unsigned <span class="type">int</span> seq</code></em>,
6725 <em class="parameter"><code><span class="type">void</span> *oid</code></em>,
6726 <em class="parameter"><code><span class="type">size_t</span> *oid_size</code></em>);</pre>
6727 <p>This function will extract the type OID of an otherName Subject
6728 Alternative Name, contained in the given certificate, and return
6729 the type as an enumerated element.</p>
6730 <p>This function is only useful if
6731 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-subject-alt-name" title="gnutls_x509_crt_get_subject_alt_name ()"><code class="function">gnutls_x509_crt_get_subject_alt_name()</code></a> returned
6732 <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME</code></a>.</p>
6733 <p>If <em class="parameter"><code>oid</code></em>
6734 is null then only the size will be filled. The <em class="parameter"><code>oid</code></em>
6735
6736 returned will be null terminated, although <em class="parameter"><code>oid_size</code></em>
6737 will not
6738 account for the trailing null.</p>
6739 <div class="refsect3">
6740 <a name="gnutls-x509-crt-get-subject-alt-othername-oid.parameters"></a><h4>Parameters</h4>
6741 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6742 <colgroup>
6743 <col width="150px" class="parameters_name">
6744 <col class="parameters_description">
6745 <col width="200px" class="parameters_annotations">
6746 </colgroup>
6747 <tbody>
6748 <tr>
6749 <td class="parameter_name"><p>cert</p></td>
6750 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
6751 <td class="parameter_annotations"> </td>
6752 </tr>
6753 <tr>
6754 <td class="parameter_name"><p>seq</p></td>
6755 <td class="parameter_description"><p>specifies the sequence number of the alt name (0 for the first one, 1 for the second etc.)</p></td>
6756 <td class="parameter_annotations"> </td>
6757 </tr>
6758 <tr>
6759 <td class="parameter_name"><p>oid</p></td>
6760 <td class="parameter_description"><p>is the place where the otherName OID will be copied to</p></td>
6761 <td class="parameter_annotations"> </td>
6762 </tr>
6763 <tr>
6764 <td class="parameter_name"><p>oid_size</p></td>
6765 <td class="parameter_description"><p>holds the size of ret.</p></td>
6766 <td class="parameter_annotations"> </td>
6767 </tr>
6768 </tbody>
6769 </table></div>
6770 </div>
6771 <div class="refsect3">
6772 <a name="gnutls-x509-crt-get-subject-alt-othername-oid.returns"></a><h4>Returns</h4>
6773 <p> the alternative subject name type on success, one of the
6774 enumerated gnutls_x509_subject_alt_name_t. For supported OIDs, it
6775 will return one of the virtual (GNUTLS_SAN_OTHERNAME_*) types,
6776 e.g. <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME-XMPP:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME_XMPP</code></a>, and <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME</code></a> for
6777 unknown OIDs. It will return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if
6778 <em class="parameter"><code>ian_size</code></em>
6779 is not large enough to hold the value. In that case
6780 <em class="parameter"><code>ian_size</code></em>
6781 will be updated with the required size. If the
6782 certificate does not have an Alternative name with the specified
6783 sequence number and with the otherName type then
6784 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> is returned.</p>
6785 </div>
6786 </div>
6787 <hr>
6788 <div class="refsect2">
6789 <a name="gnutls-x509-crt-get-issuer-alt-name"></a><h3>gnutls_x509_crt_get_issuer_alt_name ()</h3>
6790 <pre class="programlisting"><span class="returnvalue">int</span>
6791 gnutls_x509_crt_get_issuer_alt_name (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
6792 <em class="parameter"><code>unsigned <span class="type">int</span> seq</code></em>,
6793 <em class="parameter"><code><span class="type">void</span> *ian</code></em>,
6794 <em class="parameter"><code><span class="type">size_t</span> *ian_size</code></em>,
6795 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
6796 <p>This function retrieves the Issuer Alternative Name (2.5.29.18),
6797 contained in the given certificate in the X509v3 Certificate
6798 Extensions.</p>
6799 <p>When the SAN type is otherName, it will extract the data in the
6800 otherName's value field, and <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME</code></a> is returned.
6801 You may use <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-subject-alt-othername-oid" title="gnutls_x509_crt_get_subject_alt_othername_oid ()"><code class="function">gnutls_x509_crt_get_subject_alt_othername_oid()</code></a> to get
6802 the corresponding OID and the "virtual" SAN types (e.g.,
6803 <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME-XMPP:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME_XMPP</code></a>).</p>
6804 <p>If an otherName OID is known, the data will be decoded. Otherwise
6805 the returned data will be DER encoded, and you will have to decode
6806 it yourself. Currently, only the RFC 3920 id-on-xmppAddr Issuer
6807 AltName is recognized.</p>
6808 <div class="refsect3">
6809 <a name="gnutls-x509-crt-get-issuer-alt-name.parameters"></a><h4>Parameters</h4>
6810 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6811 <colgroup>
6812 <col width="150px" class="parameters_name">
6813 <col class="parameters_description">
6814 <col width="200px" class="parameters_annotations">
6815 </colgroup>
6816 <tbody>
6817 <tr>
6818 <td class="parameter_name"><p>cert</p></td>
6819 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
6820 <td class="parameter_annotations"> </td>
6821 </tr>
6822 <tr>
6823 <td class="parameter_name"><p>seq</p></td>
6824 <td class="parameter_description"><p>specifies the sequence number of the alt name (0 for the first one, 1 for the second etc.)</p></td>
6825 <td class="parameter_annotations"> </td>
6826 </tr>
6827 <tr>
6828 <td class="parameter_name"><p>ian</p></td>
6829 <td class="parameter_description"><p>is the place where the alternative name will be copied to</p></td>
6830 <td class="parameter_annotations"> </td>
6831 </tr>
6832 <tr>
6833 <td class="parameter_name"><p>ian_size</p></td>
6834 <td class="parameter_description"><p>holds the size of ian.</p></td>
6835 <td class="parameter_annotations"> </td>
6836 </tr>
6837 <tr>
6838 <td class="parameter_name"><p>critical</p></td>
6839 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical (may be null)</p></td>
6840 <td class="parameter_annotations"> </td>
6841 </tr>
6842 </tbody>
6843 </table></div>
6844 </div>
6845 <div class="refsect3">
6846 <a name="gnutls-x509-crt-get-issuer-alt-name.returns"></a><h4>Returns</h4>
6847 <p> the alternative issuer name type on success, one of the
6848 enumerated <a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a>. It will return
6849 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if <em class="parameter"><code>ian_size</code></em>
6850 is not large enough
6851 to hold the value. In that case <em class="parameter"><code>ian_size</code></em>
6852 will be updated with
6853 the required size. If the certificate does not have an
6854 Alternative name with the specified sequence number then
6855 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> is returned.</p>
6856 </div>
6857 <p class="since">Since: 2.10.0</p>
6858 </div>
6859 <hr>
6860 <div class="refsect2">
6861 <a name="gnutls-x509-crt-get-issuer-alt-name2"></a><h3>gnutls_x509_crt_get_issuer_alt_name2 ()</h3>
6862 <pre class="programlisting"><span class="returnvalue">int</span>
6863 gnutls_x509_crt_get_issuer_alt_name2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
6864 <em class="parameter"><code>unsigned <span class="type">int</span> seq</code></em>,
6865 <em class="parameter"><code><span class="type">void</span> *ian</code></em>,
6866 <em class="parameter"><code><span class="type">size_t</span> *ian_size</code></em>,
6867 <em class="parameter"><code>unsigned <span class="type">int</span> *ian_type</code></em>,
6868 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
6869 <p>This function will return the alternative names, contained in the
6870 given certificate. It is the same as
6871 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-issuer-alt-name" title="gnutls_x509_crt_get_issuer_alt_name ()"><code class="function">gnutls_x509_crt_get_issuer_alt_name()</code></a> except for the fact that it
6872 will return the type of the alternative name in <em class="parameter"><code>ian_type</code></em>
6873 even if
6874 the function fails for some reason (i.e. the buffer provided is
6875 not enough).</p>
6876 <div class="refsect3">
6877 <a name="gnutls-x509-crt-get-issuer-alt-name2.parameters"></a><h4>Parameters</h4>
6878 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6879 <colgroup>
6880 <col width="150px" class="parameters_name">
6881 <col class="parameters_description">
6882 <col width="200px" class="parameters_annotations">
6883 </colgroup>
6884 <tbody>
6885 <tr>
6886 <td class="parameter_name"><p>cert</p></td>
6887 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
6888 <td class="parameter_annotations"> </td>
6889 </tr>
6890 <tr>
6891 <td class="parameter_name"><p>seq</p></td>
6892 <td class="parameter_description"><p>specifies the sequence number of the alt name (0 for the first one, 1 for the second etc.)</p></td>
6893 <td class="parameter_annotations"> </td>
6894 </tr>
6895 <tr>
6896 <td class="parameter_name"><p>ian</p></td>
6897 <td class="parameter_description"><p>is the place where the alternative name will be copied to</p></td>
6898 <td class="parameter_annotations"> </td>
6899 </tr>
6900 <tr>
6901 <td class="parameter_name"><p>ian_size</p></td>
6902 <td class="parameter_description"><p>holds the size of ret.</p></td>
6903 <td class="parameter_annotations"> </td>
6904 </tr>
6905 <tr>
6906 <td class="parameter_name"><p>ian_type</p></td>
6907 <td class="parameter_description"><p>holds the type of the alternative name (one of gnutls_x509_subject_alt_name_t).</p></td>
6908 <td class="parameter_annotations"> </td>
6909 </tr>
6910 <tr>
6911 <td class="parameter_name"><p>critical</p></td>
6912 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical (may be null)</p></td>
6913 <td class="parameter_annotations"> </td>
6914 </tr>
6915 </tbody>
6916 </table></div>
6917 </div>
6918 <div class="refsect3">
6919 <a name="gnutls-x509-crt-get-issuer-alt-name2.returns"></a><h4>Returns</h4>
6920 <p> the alternative issuer name type on success, one of the
6921 enumerated <a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a>. It will return
6922 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if <em class="parameter"><code>ian_size</code></em>
6923 is not large enough
6924 to hold the value. In that case <em class="parameter"><code>ian_size</code></em>
6925 will be updated with
6926 the required size. If the certificate does not have an
6927 Alternative name with the specified sequence number then
6928 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> is returned.</p>
6929 </div>
6930 <p class="since">Since: 2.10.0</p>
6931 </div>
6932 <hr>
6933 <div class="refsect2">
6934 <a name="gnutls-x509-crt-get-issuer-alt-othername-oid"></a><h3>gnutls_x509_crt_get_issuer_alt_othername_oid ()</h3>
6935 <pre class="programlisting"><span class="returnvalue">int</span>
6936 gnutls_x509_crt_get_issuer_alt_othername_oid
6937 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
6938 <em class="parameter"><code>unsigned <span class="type">int</span> seq</code></em>,
6939 <em class="parameter"><code><span class="type">void</span> *ret</code></em>,
6940 <em class="parameter"><code><span class="type">size_t</span> *ret_size</code></em>);</pre>
6941 <p>This function will extract the type OID of an otherName Subject
6942 Alternative Name, contained in the given certificate, and return
6943 the type as an enumerated element.</p>
6944 <p>If <em class="parameter"><code>oid</code></em>
6945 is null then only the size will be filled. The <em class="parameter"><code>oid</code></em>
6946
6947 returned will be null terminated, although <em class="parameter"><code>oid_size</code></em>
6948 will not
6949 account for the trailing null.</p>
6950 <p>This function is only useful if
6951 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-issuer-alt-name" title="gnutls_x509_crt_get_issuer_alt_name ()"><code class="function">gnutls_x509_crt_get_issuer_alt_name()</code></a> returned
6952 <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME</code></a>.</p>
6953 <div class="refsect3">
6954 <a name="gnutls-x509-crt-get-issuer-alt-othername-oid.parameters"></a><h4>Parameters</h4>
6955 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6956 <colgroup>
6957 <col width="150px" class="parameters_name">
6958 <col class="parameters_description">
6959 <col width="200px" class="parameters_annotations">
6960 </colgroup>
6961 <tbody>
6962 <tr>
6963 <td class="parameter_name"><p>cert</p></td>
6964 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
6965 <td class="parameter_annotations"> </td>
6966 </tr>
6967 <tr>
6968 <td class="parameter_name"><p>seq</p></td>
6969 <td class="parameter_description"><p>specifies the sequence number of the alt name (0 for the first one, 1 for the second etc.)</p></td>
6970 <td class="parameter_annotations"> </td>
6971 </tr>
6972 <tr>
6973 <td class="parameter_name"><p>ret</p></td>
6974 <td class="parameter_description"><p>is the place where the otherName OID will be copied to</p></td>
6975 <td class="parameter_annotations"> </td>
6976 </tr>
6977 <tr>
6978 <td class="parameter_name"><p>ret_size</p></td>
6979 <td class="parameter_description"><p>holds the size of ret.</p></td>
6980 <td class="parameter_annotations"> </td>
6981 </tr>
6982 </tbody>
6983 </table></div>
6984 </div>
6985 <div class="refsect3">
6986 <a name="gnutls-x509-crt-get-issuer-alt-othername-oid.returns"></a><h4>Returns</h4>
6987 <p> the alternative issuer name type on success, one of the
6988 enumerated gnutls_x509_subject_alt_name_t. For supported OIDs, it
6989 will return one of the virtual (GNUTLS_SAN_OTHERNAME_*) types,
6990 e.g. <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME-XMPP:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME_XMPP</code></a>, and <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME</code></a> for
6991 unknown OIDs. It will return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if
6992 <em class="parameter"><code>ret_size</code></em>
6993 is not large enough to hold the value. In that case
6994 <em class="parameter"><code>ret_size</code></em>
6995 will be updated with the required size. If the
6996 certificate does not have an Alternative name with the specified
6997 sequence number and with the otherName type then
6998 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> is returned.</p>
6999 </div>
7000 <p class="since">Since: 2.10.0</p>
7001 </div>
7002 <hr>
7003 <div class="refsect2">
7004 <a name="gnutls-x509-crt-get-ca-status"></a><h3>gnutls_x509_crt_get_ca_status ()</h3>
7005 <pre class="programlisting"><span class="returnvalue">int</span>
7006 gnutls_x509_crt_get_ca_status (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
7007 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
7008 <p>This function will return certificates CA status, by reading the
7009 basicConstraints X.509 extension (2.5.29.19). If the certificate is
7010 a CA a positive value will be returned, or (0) if the certificate
7011 does not have CA flag set.</p>
7012 <p>Use <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-basic-constraints" title="gnutls_x509_crt_get_basic_constraints ()"><code class="function">gnutls_x509_crt_get_basic_constraints()</code></a> if you want to read the
7013 pathLenConstraint field too.</p>
7014 <div class="refsect3">
7015 <a name="gnutls-x509-crt-get-ca-status.parameters"></a><h4>Parameters</h4>
7016 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7017 <colgroup>
7018 <col width="150px" class="parameters_name">
7019 <col class="parameters_description">
7020 <col width="200px" class="parameters_annotations">
7021 </colgroup>
7022 <tbody>
7023 <tr>
7024 <td class="parameter_name"><p>cert</p></td>
7025 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
7026 <td class="parameter_annotations"> </td>
7027 </tr>
7028 <tr>
7029 <td class="parameter_name"><p>critical</p></td>
7030 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical</p></td>
7031 <td class="parameter_annotations"> </td>
7032 </tr>
7033 </tbody>
7034 </table></div>
7035 </div>
7036 <div class="refsect3">
7037 <a name="gnutls-x509-crt-get-ca-status.returns"></a><h4>Returns</h4>
7038 <p> If the certificate is a CA a positive value will be
7039 returned, or (0) if the certificate does not have CA flag set. A
7040 negative error code may be returned in case of errors. If the
7041 certificate does not contain the basicConstraints extension
7042 GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned.</p>
7043 </div>
7044 </div>
7045 <hr>
7046 <div class="refsect2">
7047 <a name="gnutls-x509-crt-get-basic-constraints"></a><h3>gnutls_x509_crt_get_basic_constraints ()</h3>
7048 <pre class="programlisting"><span class="returnvalue">int</span>
7049 gnutls_x509_crt_get_basic_constraints (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
7050 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>,
7051 <em class="parameter"><code>unsigned <span class="type">int</span> *ca</code></em>,
7052 <em class="parameter"><code><span class="type">int</span> *pathlen</code></em>);</pre>
7053 <p>This function will read the certificate's basic constraints, and
7054 return the certificates CA status. It reads the basicConstraints
7055 X.509 extension (2.5.29.19).</p>
7056 <div class="refsect3">
7057 <a name="gnutls-x509-crt-get-basic-constraints.parameters"></a><h4>Parameters</h4>
7058 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7059 <colgroup>
7060 <col width="150px" class="parameters_name">
7061 <col class="parameters_description">
7062 <col width="200px" class="parameters_annotations">
7063 </colgroup>
7064 <tbody>
7065 <tr>
7066 <td class="parameter_name"><p>cert</p></td>
7067 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
7068 <td class="parameter_annotations"> </td>
7069 </tr>
7070 <tr>
7071 <td class="parameter_name"><p>critical</p></td>
7072 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical</p></td>
7073 <td class="parameter_annotations"> </td>
7074 </tr>
7075 <tr>
7076 <td class="parameter_name"><p>ca</p></td>
7077 <td class="parameter_description"><p>pointer to output integer indicating CA status, may be NULL,
7078 value is 1 if the certificate CA flag is set, 0 otherwise.</p></td>
7079 <td class="parameter_annotations"> </td>
7080 </tr>
7081 <tr>
7082 <td class="parameter_name"><p>pathlen</p></td>
7083 <td class="parameter_description"><p>pointer to output integer indicating path length (may be
7084 NULL), non-negative error codes indicate a present pathLenConstraint
7085 field and the actual value, -1 indicate that the field is absent.</p></td>
7086 <td class="parameter_annotations"> </td>
7087 </tr>
7088 </tbody>
7089 </table></div>
7090 </div>
7091 <div class="refsect3">
7092 <a name="gnutls-x509-crt-get-basic-constraints.returns"></a><h4>Returns</h4>
7093 <p> If the certificate is a CA a positive value will be
7094 returned, or (0) if the certificate does not have CA flag set. A
7095 negative error code may be returned in case of errors. If the
7096 certificate does not contain the basicConstraints extension
7097 GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned.</p>
7098 </div>
7099 </div>
7100 <hr>
7101 <div class="refsect2">
7102 <a name="gnutls-x509-crt-get-key-usage"></a><h3>gnutls_x509_crt_get_key_usage ()</h3>
7103 <pre class="programlisting"><span class="returnvalue">int</span>
7104 gnutls_x509_crt_get_key_usage (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
7105 <em class="parameter"><code>unsigned <span class="type">int</span> *key_usage</code></em>,
7106 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
7107 <p>This function will return certificate's key usage, by reading the
7108 keyUsage X.509 extension (2.5.29.15). The key usage value will ORed
7109 values of the: <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-DIGITAL-SIGNATURE:CAPS" title="GNUTLS_KEY_DIGITAL_SIGNATURE"><code class="literal">GNUTLS_KEY_DIGITAL_SIGNATURE</code></a>,
7110 <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-NON-REPUDIATION:CAPS" title="GNUTLS_KEY_NON_REPUDIATION"><code class="literal">GNUTLS_KEY_NON_REPUDIATION</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-KEY-ENCIPHERMENT:CAPS" title="GNUTLS_KEY_KEY_ENCIPHERMENT"><code class="literal">GNUTLS_KEY_KEY_ENCIPHERMENT</code></a>,
7111 <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-DATA-ENCIPHERMENT:CAPS" title="GNUTLS_KEY_DATA_ENCIPHERMENT"><code class="literal">GNUTLS_KEY_DATA_ENCIPHERMENT</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-KEY-AGREEMENT:CAPS" title="GNUTLS_KEY_KEY_AGREEMENT"><code class="literal">GNUTLS_KEY_KEY_AGREEMENT</code></a>,
7112 <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-KEY-CERT-SIGN:CAPS" title="GNUTLS_KEY_KEY_CERT_SIGN"><code class="literal">GNUTLS_KEY_KEY_CERT_SIGN</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-CRL-SIGN:CAPS" title="GNUTLS_KEY_CRL_SIGN"><code class="literal">GNUTLS_KEY_CRL_SIGN</code></a>,
7113 <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-ENCIPHER-ONLY:CAPS" title="GNUTLS_KEY_ENCIPHER_ONLY"><code class="literal">GNUTLS_KEY_ENCIPHER_ONLY</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-DECIPHER-ONLY:CAPS" title="GNUTLS_KEY_DECIPHER_ONLY"><code class="literal">GNUTLS_KEY_DECIPHER_ONLY</code></a>.</p>
7114 <div class="refsect3">
7115 <a name="gnutls-x509-crt-get-key-usage.parameters"></a><h4>Parameters</h4>
7116 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7117 <colgroup>
7118 <col width="150px" class="parameters_name">
7119 <col class="parameters_description">
7120 <col width="200px" class="parameters_annotations">
7121 </colgroup>
7122 <tbody>
7123 <tr>
7124 <td class="parameter_name"><p>cert</p></td>
7125 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
7126 <td class="parameter_annotations"> </td>
7127 </tr>
7128 <tr>
7129 <td class="parameter_name"><p>key_usage</p></td>
7130 <td class="parameter_description"><p>where the key usage bits will be stored</p></td>
7131 <td class="parameter_annotations"> </td>
7132 </tr>
7133 <tr>
7134 <td class="parameter_name"><p>critical</p></td>
7135 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical</p></td>
7136 <td class="parameter_annotations"> </td>
7137 </tr>
7138 </tbody>
7139 </table></div>
7140 </div>
7141 <div class="refsect3">
7142 <a name="gnutls-x509-crt-get-key-usage.returns"></a><h4>Returns</h4>
7143 <p> zero on success, or a negative error code in case of
7144 parsing error. If the certificate does not contain the keyUsage
7145 extension <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> will be
7146 returned.</p>
7147 </div>
7148 </div>
7149 <hr>
7150 <div class="refsect2">
7151 <a name="gnutls-x509-crt-set-key-usage"></a><h3>gnutls_x509_crt_set_key_usage ()</h3>
7152 <pre class="programlisting"><span class="returnvalue">int</span>
7153 gnutls_x509_crt_set_key_usage (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
7154 <em class="parameter"><code>unsigned <span class="type">int</span> usage</code></em>);</pre>
7155 <p>This function will set the keyUsage certificate extension.</p>
7156 <div class="refsect3">
7157 <a name="gnutls-x509-crt-set-key-usage.parameters"></a><h4>Parameters</h4>
7158 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7159 <colgroup>
7160 <col width="150px" class="parameters_name">
7161 <col class="parameters_description">
7162 <col width="200px" class="parameters_annotations">
7163 </colgroup>
7164 <tbody>
7165 <tr>
7166 <td class="parameter_name"><p>crt</p></td>
7167 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
7168 <td class="parameter_annotations"> </td>
7169 </tr>
7170 <tr>
7171 <td class="parameter_name"><p>usage</p></td>
7172 <td class="parameter_description"><p>an ORed sequence of the GNUTLS_KEY_* elements.</p></td>
7173 <td class="parameter_annotations"> </td>
7174 </tr>
7175 </tbody>
7176 </table></div>
7177 </div>
7178 <div class="refsect3">
7179 <a name="gnutls-x509-crt-set-key-usage.returns"></a><h4>Returns</h4>
7180 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
7181 negative error value.</p>
7182 </div>
7183 </div>
7184 <hr>
7185 <div class="refsect2">
7186 <a name="gnutls-x509-crt-set-authority-info-access"></a><h3>gnutls_x509_crt_set_authority_info_access ()</h3>
7187 <pre class="programlisting"><span class="returnvalue">int</span>
7188 gnutls_x509_crt_set_authority_info_access
7189 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
7190 <em class="parameter"><code><span class="type">int</span> what</code></em>,
7191 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>);</pre>
7192 <p>This function sets the Authority Information Access (AIA)
7193 extension, see RFC 5280 section 4.2.2.1 for more information. </p>
7194 <p>The type of data stored in <em class="parameter"><code>data</code></em>
7195 is specified via <em class="parameter"><code>what</code></em>
7196 which
7197 should be <a class="link" href="gnutls-x509.html#gnutls-info-access-what-t" title="enum gnutls_info_access_what_t"><span class="type">gnutls_info_access_what_t</span></a> values.</p>
7198 <p>If <em class="parameter"><code>what</code></em>
7199 is <a class="link" href="gnutls-x509.html#GNUTLS-IA-OCSP-URI:CAPS"><code class="literal">GNUTLS_IA_OCSP_URI</code></a>, <em class="parameter"><code>data</code></em>
7200 will hold the OCSP URI.
7201 If <em class="parameter"><code>what</code></em>
7202 is <a class="link" href="gnutls-x509.html#GNUTLS-IA-CAISSUERS-URI:CAPS"><code class="literal">GNUTLS_IA_CAISSUERS_URI</code></a>, <em class="parameter"><code>data</code></em>
7203 will hold the caIssuers
7204 URI.</p>
7205 <div class="refsect3">
7206 <a name="gnutls-x509-crt-set-authority-info-access.parameters"></a><h4>Parameters</h4>
7207 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7208 <colgroup>
7209 <col width="150px" class="parameters_name">
7210 <col class="parameters_description">
7211 <col width="200px" class="parameters_annotations">
7212 </colgroup>
7213 <tbody>
7214 <tr>
7215 <td class="parameter_name"><p>crt</p></td>
7216 <td class="parameter_description"><p>Holds the certificate</p></td>
7217 <td class="parameter_annotations"> </td>
7218 </tr>
7219 <tr>
7220 <td class="parameter_name"><p>what</p></td>
7221 <td class="parameter_description"><p>what data to get, a <a class="link" href="gnutls-x509.html#gnutls-info-access-what-t" title="enum gnutls_info_access_what_t"><span class="type">gnutls_info_access_what_t</span></a> type.</p></td>
7222 <td class="parameter_annotations"> </td>
7223 </tr>
7224 <tr>
7225 <td class="parameter_name"><p>data</p></td>
7226 <td class="parameter_description"><p>output data to be freed with <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p></td>
7227 <td class="parameter_annotations"> </td>
7228 </tr>
7229 </tbody>
7230 </table></div>
7231 </div>
7232 <div class="refsect3">
7233 <a name="gnutls-x509-crt-set-authority-info-access.returns"></a><h4>Returns</h4>
7234 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
7235 negative error value.</p>
7236 </div>
7237 <p class="since">Since: 3.0</p>
7238 </div>
7239 <hr>
7240 <div class="refsect2">
7241 <a name="gnutls-x509-crt-get-inhibit-anypolicy"></a><h3>gnutls_x509_crt_get_inhibit_anypolicy ()</h3>
7242 <pre class="programlisting"><span class="returnvalue">int</span>
7243 gnutls_x509_crt_get_inhibit_anypolicy (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
7244 <em class="parameter"><code>unsigned <span class="type">int</span> *skipcerts</code></em>,
7245 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
7246 <p>This function will return certificate's value of the SkipCerts, i.e.,
7247 the Inhibit anyPolicy X.509 extension (2.5.29.54).</p>
7248 <p>The returned value is the number of additional certificates that
7249 may appear in the path before the anyPolicy is no longer acceptable.</p>
7250 <div class="refsect3">
7251 <a name="gnutls-x509-crt-get-inhibit-anypolicy.parameters"></a><h4>Parameters</h4>
7252 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7253 <colgroup>
7254 <col width="150px" class="parameters_name">
7255 <col class="parameters_description">
7256 <col width="200px" class="parameters_annotations">
7257 </colgroup>
7258 <tbody>
7259 <tr>
7260 <td class="parameter_name"><p>cert</p></td>
7261 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
7262 <td class="parameter_annotations"> </td>
7263 </tr>
7264 <tr>
7265 <td class="parameter_name"><p>skipcerts</p></td>
7266 <td class="parameter_description"><p>will hold the number of certificates after which anypolicy is no longer acceptable.</p></td>
7267 <td class="parameter_annotations"> </td>
7268 </tr>
7269 <tr>
7270 <td class="parameter_name"><p>critical</p></td>
7271 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical</p></td>
7272 <td class="parameter_annotations"> </td>
7273 </tr>
7274 </tbody>
7275 </table></div>
7276 </div>
7277 <div class="refsect3">
7278 <a name="gnutls-x509-crt-get-inhibit-anypolicy.returns"></a><h4>Returns</h4>
7279 <p> zero on success, or a negative error code in case of
7280 parsing error. If the certificate does not contain the Inhibit anyPolicy
7281 extension <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> will be
7282 returned.</p>
7283 </div>
7284 <p class="since">Since: 3.6.0</p>
7285 </div>
7286 <hr>
7287 <div class="refsect2">
7288 <a name="gnutls-x509-crt-set-inhibit-anypolicy"></a><h3>gnutls_x509_crt_set_inhibit_anypolicy ()</h3>
7289 <pre class="programlisting"><span class="returnvalue">int</span>
7290 gnutls_x509_crt_set_inhibit_anypolicy (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
7291 <em class="parameter"><code>unsigned <span class="type">int</span> skipcerts</code></em>);</pre>
7292 <p>This function will set the Inhibit anyPolicy certificate extension.</p>
7293 <div class="refsect3">
7294 <a name="gnutls-x509-crt-set-inhibit-anypolicy.parameters"></a><h4>Parameters</h4>
7295 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7296 <colgroup>
7297 <col width="150px" class="parameters_name">
7298 <col class="parameters_description">
7299 <col width="200px" class="parameters_annotations">
7300 </colgroup>
7301 <tbody>
7302 <tr>
7303 <td class="parameter_name"><p>crt</p></td>
7304 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
7305 <td class="parameter_annotations"> </td>
7306 </tr>
7307 <tr>
7308 <td class="parameter_name"><p>skipcerts</p></td>
7309 <td class="parameter_description"><p>number of certificates after which anypolicy is no longer acceptable.</p></td>
7310 <td class="parameter_annotations"> </td>
7311 </tr>
7312 </tbody>
7313 </table></div>
7314 </div>
7315 <div class="refsect3">
7316 <a name="gnutls-x509-crt-set-inhibit-anypolicy.returns"></a><h4>Returns</h4>
7317 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
7318 negative error value.</p>
7319 </div>
7320 </div>
7321 <hr>
7322 <div class="refsect2">
7323 <a name="gnutls-x509-crt-get-proxy"></a><h3>gnutls_x509_crt_get_proxy ()</h3>
7324 <pre class="programlisting"><span class="returnvalue">int</span>
7325 gnutls_x509_crt_get_proxy (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
7326 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>,
7327 <em class="parameter"><code><span class="type">int</span> *pathlen</code></em>,
7328 <em class="parameter"><code><span class="type">char</span> **policyLanguage</code></em>,
7329 <em class="parameter"><code><span class="type">char</span> **policy</code></em>,
7330 <em class="parameter"><code><span class="type">size_t</span> *sizeof_policy</code></em>);</pre>
7331 <p>This function will get information from a proxy certificate. It
7332 reads the ProxyCertInfo X.509 extension (1.3.6.1.5.5.7.1.14).</p>
7333 <div class="refsect3">
7334 <a name="gnutls-x509-crt-get-proxy.parameters"></a><h4>Parameters</h4>
7335 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7336 <colgroup>
7337 <col width="150px" class="parameters_name">
7338 <col class="parameters_description">
7339 <col width="200px" class="parameters_annotations">
7340 </colgroup>
7341 <tbody>
7342 <tr>
7343 <td class="parameter_name"><p>cert</p></td>
7344 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
7345 <td class="parameter_annotations"> </td>
7346 </tr>
7347 <tr>
7348 <td class="parameter_name"><p>critical</p></td>
7349 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical</p></td>
7350 <td class="parameter_annotations"> </td>
7351 </tr>
7352 <tr>
7353 <td class="parameter_name"><p>pathlen</p></td>
7354 <td class="parameter_description"><p>pointer to output integer indicating path length (may be
7355 NULL), non-negative error codes indicate a present pCPathLenConstraint
7356 field and the actual value, -1 indicate that the field is absent.</p></td>
7357 <td class="parameter_annotations"> </td>
7358 </tr>
7359 <tr>
7360 <td class="parameter_name"><p>policyLanguage</p></td>
7361 <td class="parameter_description"><p>output variable with OID of policy language</p></td>
7362 <td class="parameter_annotations"> </td>
7363 </tr>
7364 <tr>
7365 <td class="parameter_name"><p>policy</p></td>
7366 <td class="parameter_description"><p>output variable with policy data</p></td>
7367 <td class="parameter_annotations"> </td>
7368 </tr>
7369 <tr>
7370 <td class="parameter_name"><p>sizeof_policy</p></td>
7371 <td class="parameter_description"><p>output variable size of policy data</p></td>
7372 <td class="parameter_annotations"> </td>
7373 </tr>
7374 </tbody>
7375 </table></div>
7376 </div>
7377 <div class="refsect3">
7378 <a name="gnutls-x509-crt-get-proxy.returns"></a><h4>Returns</h4>
7379 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned,
7380 otherwise a negative error code is returned.</p>
7381 </div>
7382 </div>
7383 <hr>
7384 <div class="refsect2">
7385 <a name="gnutls-x509-tlsfeatures-init"></a><h3>gnutls_x509_tlsfeatures_init ()</h3>
7386 <pre class="programlisting"><span class="returnvalue">int</span>
7387 gnutls_x509_tlsfeatures_init (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-tlsfeatures-t" title="gnutls_x509_tlsfeatures_t"><span class="type">gnutls_x509_tlsfeatures_t</span></a> *features</code></em>);</pre>
7388 <p>This function will initialize a X.509 TLS features extension structure</p>
7389 <div class="refsect3">
7390 <a name="gnutls-x509-tlsfeatures-init.parameters"></a><h4>Parameters</h4>
7391 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7392 <colgroup>
7393 <col width="150px" class="parameters_name">
7394 <col class="parameters_description">
7395 <col width="200px" class="parameters_annotations">
7396 </colgroup>
7397 <tbody><tr>
7398 <td class="parameter_name"><p>f</p></td>
7399 <td class="parameter_description"><p>The TLS features</p></td>
7400 <td class="parameter_annotations"> </td>
7401 </tr></tbody>
7402 </table></div>
7403 </div>
7404 <div class="refsect3">
7405 <a name="gnutls-x509-tlsfeatures-init.returns"></a><h4>Returns</h4>
7406 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned,
7407 otherwise a negative error value.</p>
7408 </div>
7409 <p class="since">Since: 3.5.1</p>
7410 </div>
7411 <hr>
7412 <div class="refsect2">
7413 <a name="gnutls-x509-tlsfeatures-deinit"></a><h3>gnutls_x509_tlsfeatures_deinit ()</h3>
7414 <pre class="programlisting"><span class="returnvalue">void</span>
7415 gnutls_x509_tlsfeatures_deinit (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-tlsfeatures-t" title="gnutls_x509_tlsfeatures_t"><span class="type">gnutls_x509_tlsfeatures_t</span></a> Param1</code></em>);</pre>
7416 <p>This function will deinitialize a X.509 TLS features extension structure</p>
7417 <div class="refsect3">
7418 <a name="gnutls-x509-tlsfeatures-deinit.parameters"></a><h4>Parameters</h4>
7419 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7420 <colgroup>
7421 <col width="150px" class="parameters_name">
7422 <col class="parameters_description">
7423 <col width="200px" class="parameters_annotations">
7424 </colgroup>
7425 <tbody><tr>
7426 <td class="parameter_name"><p>f</p></td>
7427 <td class="parameter_description"><p>The TLS features</p></td>
7428 <td class="parameter_annotations"> </td>
7429 </tr></tbody>
7430 </table></div>
7431 </div>
7432 <p class="since">Since: 3.5.1</p>
7433 </div>
7434 <hr>
7435 <div class="refsect2">
7436 <a name="gnutls-x509-tlsfeatures-get"></a><h3>gnutls_x509_tlsfeatures_get ()</h3>
7437 <pre class="programlisting"><span class="returnvalue">int</span>
7438 gnutls_x509_tlsfeatures_get (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-tlsfeatures-t" title="gnutls_x509_tlsfeatures_t"><span class="type">gnutls_x509_tlsfeatures_t</span></a> f</code></em>,
7439 <em class="parameter"><code><span class="type">unsigned </span> idx</code></em>,
7440 <em class="parameter"><code>unsigned <span class="type">int</span> *feature</code></em>);</pre>
7441 <p>This function will get a feature from the X.509 TLS features
7442 extension structure.</p>
7443 <div class="refsect3">
7444 <a name="gnutls-x509-tlsfeatures-get.parameters"></a><h4>Parameters</h4>
7445 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7446 <colgroup>
7447 <col width="150px" class="parameters_name">
7448 <col class="parameters_description">
7449 <col width="200px" class="parameters_annotations">
7450 </colgroup>
7451 <tbody>
7452 <tr>
7453 <td class="parameter_name"><p>f</p></td>
7454 <td class="parameter_description"><p>The TLS features</p></td>
7455 <td class="parameter_annotations"> </td>
7456 </tr>
7457 <tr>
7458 <td class="parameter_name"><p>idx</p></td>
7459 <td class="parameter_description"><p>The index of the feature to get</p></td>
7460 <td class="parameter_annotations"> </td>
7461 </tr>
7462 <tr>
7463 <td class="parameter_name"><p>feature</p></td>
7464 <td class="parameter_description"><p>If the function succeeds, the feature will be stored in this variable</p></td>
7465 <td class="parameter_annotations"> </td>
7466 </tr>
7467 </tbody>
7468 </table></div>
7469 </div>
7470 <div class="refsect3">
7471 <a name="gnutls-x509-tlsfeatures-get.returns"></a><h4>Returns</h4>
7472 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned,
7473 otherwise a negative error value.</p>
7474 </div>
7475 <p class="since">Since: 3.5.1</p>
7476 </div>
7477 <hr>
7478 <div class="refsect2">
7479 <a name="gnutls-x509-crt-set-tlsfeatures"></a><h3>gnutls_x509_crt_set_tlsfeatures ()</h3>
7480 <pre class="programlisting"><span class="returnvalue">int</span>
7481 gnutls_x509_crt_set_tlsfeatures (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
7482 <em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-tlsfeatures-t" title="gnutls_x509_tlsfeatures_t"><span class="type">gnutls_x509_tlsfeatures_t</span></a> features</code></em>);</pre>
7483 <p>This function will set the certificates
7484 X.509 TLS extension from the given structure.</p>
7485 <div class="refsect3">
7486 <a name="gnutls-x509-crt-set-tlsfeatures.parameters"></a><h4>Parameters</h4>
7487 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7488 <colgroup>
7489 <col width="150px" class="parameters_name">
7490 <col class="parameters_description">
7491 <col width="200px" class="parameters_annotations">
7492 </colgroup>
7493 <tbody>
7494 <tr>
7495 <td class="parameter_name"><p>crt</p></td>
7496 <td class="parameter_description"><p>A X.509 certificate</p></td>
7497 <td class="parameter_annotations"> </td>
7498 </tr>
7499 <tr>
7500 <td class="parameter_name"><p>features</p></td>
7501 <td class="parameter_description"><p>If the function succeeds, the
7502 features will be added to the certificate.</p></td>
7503 <td class="parameter_annotations"> </td>
7504 </tr>
7505 </tbody>
7506 </table></div>
7507 </div>
7508 <div class="refsect3">
7509 <a name="gnutls-x509-crt-set-tlsfeatures.returns"></a><h4>Returns</h4>
7510 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned,
7511 otherwise a negative error value.</p>
7512 </div>
7513 <p class="since">Since: 3.5.1</p>
7514 </div>
7515 <hr>
7516 <div class="refsect2">
7517 <a name="gnutls-x509-crt-get-tlsfeatures"></a><h3>gnutls_x509_crt_get_tlsfeatures ()</h3>
7518 <pre class="programlisting"><span class="returnvalue">int</span>
7519 gnutls_x509_crt_get_tlsfeatures (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
7520 <em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-tlsfeatures-t" title="gnutls_x509_tlsfeatures_t"><span class="type">gnutls_x509_tlsfeatures_t</span></a> features</code></em>,
7521 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
7522 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
7523 <p>This function will get the X.509 TLS features
7524 extension structure from the certificate. The
7525 returned structure needs to be freed using
7526 <a class="link" href="gnutls-x509.html#gnutls-x509-tlsfeatures-deinit" title="gnutls_x509_tlsfeatures_deinit ()"><code class="function">gnutls_x509_tlsfeatures_deinit()</code></a>.</p>
7527 <p>When the <em class="parameter"><code>flags</code></em>
7528 is set to <a class="link" href="gnutls-x509.html#GNUTLS-EXT-FLAG-APPEND:CAPS" title="GNUTLS_EXT_FLAG_APPEND"><code class="literal">GNUTLS_EXT_FLAG_APPEND</code></a>,
7529 then if the <em class="parameter"><code>features</code></em>
7530 structure is empty this function will behave
7531 identically as if the flag was not set. Otherwise if there are elements
7532 in the <em class="parameter"><code>features</code></em>
7533 structure then they will be merged with.</p>
7534 <p>Note that <em class="parameter"><code>features</code></em>
7535 must be initialized prior to calling this function.</p>
7536 <div class="refsect3">
7537 <a name="gnutls-x509-crt-get-tlsfeatures.parameters"></a><h4>Parameters</h4>
7538 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7539 <colgroup>
7540 <col width="150px" class="parameters_name">
7541 <col class="parameters_description">
7542 <col width="200px" class="parameters_annotations">
7543 </colgroup>
7544 <tbody>
7545 <tr>
7546 <td class="parameter_name"><p>crt</p></td>
7547 <td class="parameter_description"><p>A X.509 certificate</p></td>
7548 <td class="parameter_annotations"> </td>
7549 </tr>
7550 <tr>
7551 <td class="parameter_name"><p>features</p></td>
7552 <td class="parameter_description"><p>If the function succeeds, the
7553 features will be stored in this variable.</p></td>
7554 <td class="parameter_annotations"> </td>
7555 </tr>
7556 <tr>
7557 <td class="parameter_name"><p>flags</p></td>
7558 <td class="parameter_description"><p>zero or <a class="link" href="gnutls-x509.html#GNUTLS-EXT-FLAG-APPEND:CAPS" title="GNUTLS_EXT_FLAG_APPEND"><code class="literal">GNUTLS_EXT_FLAG_APPEND</code></a></p></td>
7559 <td class="parameter_annotations"> </td>
7560 </tr>
7561 <tr>
7562 <td class="parameter_name"><p>critical</p></td>
7563 <td class="parameter_description"><p>the extension status</p></td>
7564 <td class="parameter_annotations"> </td>
7565 </tr>
7566 </tbody>
7567 </table></div>
7568 </div>
7569 <div class="refsect3">
7570 <a name="gnutls-x509-crt-get-tlsfeatures.returns"></a><h4>Returns</h4>
7571 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned,
7572 otherwise a negative error value.</p>
7573 </div>
7574 <p class="since">Since: 3.5.1</p>
7575 </div>
7576 <hr>
7577 <div class="refsect2">
7578 <a name="gnutls-x509-tlsfeatures-check-crt"></a><h3>gnutls_x509_tlsfeatures_check_crt ()</h3>
7579 <pre class="programlisting"><span class="returnvalue">unsigned</span>
7580 gnutls_x509_tlsfeatures_check_crt (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-tlsfeatures-t" title="gnutls_x509_tlsfeatures_t"><span class="type">gnutls_x509_tlsfeatures_t</span></a> feat</code></em>,
7581 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>);</pre>
7582 </div>
7583 <hr>
7584 <div class="refsect2">
7585 <a name="gnutls-x509-policy-release"></a><h3>gnutls_x509_policy_release ()</h3>
7586 <pre class="programlisting"><span class="returnvalue">void</span>
7587 gnutls_x509_policy_release (<em class="parameter"><code><span class="type">struct gnutls_x509_policy_st</span> *policy</code></em>);</pre>
7588 <p>This function will deinitialize all memory associated with the provided
7589 <em class="parameter"><code>policy</code></em>
7590 . The policy is allocated using <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-policy" title="gnutls_x509_crt_get_policy ()"><code class="function">gnutls_x509_crt_get_policy()</code></a>.</p>
7591 <div class="refsect3">
7592 <a name="gnutls-x509-policy-release.parameters"></a><h4>Parameters</h4>
7593 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7594 <colgroup>
7595 <col width="150px" class="parameters_name">
7596 <col class="parameters_description">
7597 <col width="200px" class="parameters_annotations">
7598 </colgroup>
7599 <tbody><tr>
7600 <td class="parameter_name"><p>policy</p></td>
7601 <td class="parameter_description"><p>a certificate policy</p></td>
7602 <td class="parameter_annotations"> </td>
7603 </tr></tbody>
7604 </table></div>
7605 </div>
7606 <p class="since">Since: 3.1.5</p>
7607 </div>
7608 <hr>
7609 <div class="refsect2">
7610 <a name="gnutls-x509-crt-get-policy"></a><h3>gnutls_x509_crt_get_policy ()</h3>
7611 <pre class="programlisting"><span class="returnvalue">int</span>
7612 gnutls_x509_crt_get_policy (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
7613 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
7614 <em class="parameter"><code><span class="type">struct gnutls_x509_policy_st</span> *policy</code></em>,
7615 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
7616 <p>This function will extract the certificate policy (extension 2.5.29.32)
7617 specified by the given index.</p>
7618 <p>The policy returned by this function must be deinitialized by using
7619 <a class="link" href="gnutls-x509.html#gnutls-x509-policy-release" title="gnutls_x509_policy_release ()"><code class="function">gnutls_x509_policy_release()</code></a>.</p>
7620 <div class="refsect3">
7621 <a name="gnutls-x509-crt-get-policy.parameters"></a><h4>Parameters</h4>
7622 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7623 <colgroup>
7624 <col width="150px" class="parameters_name">
7625 <col class="parameters_description">
7626 <col width="200px" class="parameters_annotations">
7627 </colgroup>
7628 <tbody>
7629 <tr>
7630 <td class="parameter_name"><p>crt</p></td>
7631 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
7632 <td class="parameter_annotations"> </td>
7633 </tr>
7634 <tr>
7635 <td class="parameter_name"><p>indx</p></td>
7636 <td class="parameter_description"><p>This specifies which policy to return. Use (0) to get the first one.</p></td>
7637 <td class="parameter_annotations"> </td>
7638 </tr>
7639 <tr>
7640 <td class="parameter_name"><p>policy</p></td>
7641 <td class="parameter_description"><p>A pointer to a policy structure.</p></td>
7642 <td class="parameter_annotations"> </td>
7643 </tr>
7644 <tr>
7645 <td class="parameter_name"><p>critical</p></td>
7646 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical</p></td>
7647 <td class="parameter_annotations"> </td>
7648 </tr>
7649 </tbody>
7650 </table></div>
7651 </div>
7652 <div class="refsect3">
7653 <a name="gnutls-x509-crt-get-policy.returns"></a><h4>Returns</h4>
7654 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
7655 if the extension is not present, otherwise a negative error value.</p>
7656 </div>
7657 <p class="since">Since: 3.1.5</p>
7658 </div>
7659 <hr>
7660 <div class="refsect2">
7661 <a name="gnutls-x509-crt-set-policy"></a><h3>gnutls_x509_crt_set_policy ()</h3>
7662 <pre class="programlisting"><span class="returnvalue">int</span>
7663 gnutls_x509_crt_set_policy (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
7664 <em class="parameter"><code>const <span class="type">struct gnutls_x509_policy_st</span> *policy</code></em>,
7665 <em class="parameter"><code>unsigned <span class="type">int</span> critical</code></em>);</pre>
7666 <p>This function will set the certificate policy extension (2.5.29.32).
7667 Multiple calls to this function append a new policy.</p>
7668 <p>Note the maximum text size for the qualifier <a class="link" href="gnutls-x509.html#GNUTLS-X509-QUALIFIER-NOTICE:CAPS"><code class="literal">GNUTLS_X509_QUALIFIER_NOTICE</code></a>
7669 is 200 characters. This function will fail with <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a>
7670 if this is exceeded.</p>
7671 <div class="refsect3">
7672 <a name="gnutls-x509-crt-set-policy.parameters"></a><h4>Parameters</h4>
7673 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7674 <colgroup>
7675 <col width="150px" class="parameters_name">
7676 <col class="parameters_description">
7677 <col width="200px" class="parameters_annotations">
7678 </colgroup>
7679 <tbody>
7680 <tr>
7681 <td class="parameter_name"><p>crt</p></td>
7682 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
7683 <td class="parameter_annotations"> </td>
7684 </tr>
7685 <tr>
7686 <td class="parameter_name"><p>policy</p></td>
7687 <td class="parameter_description"><p>A pointer to a policy</p></td>
7688 <td class="parameter_annotations"> </td>
7689 </tr>
7690 <tr>
7691 <td class="parameter_name"><p>critical</p></td>
7692 <td class="parameter_description"><p>use non-zero if the extension is marked as critical</p></td>
7693 <td class="parameter_annotations"> </td>
7694 </tr>
7695 </tbody>
7696 </table></div>
7697 </div>
7698 <div class="refsect3">
7699 <a name="gnutls-x509-crt-set-policy.returns"></a><h4>Returns</h4>
7700 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
7701 negative error value.</p>
7702 </div>
7703 <p class="since">Since: 3.1.5</p>
7704 </div>
7705 <hr>
7706 <div class="refsect2">
7707 <a name="gnutls-x509-dn-oid-known"></a><h3>gnutls_x509_dn_oid_known ()</h3>
7708 <pre class="programlisting"><span class="returnvalue">int</span>
7709 gnutls_x509_dn_oid_known (<em class="parameter"><code>const <span class="type">char</span> *oid</code></em>);</pre>
7710 <p>This function will inform about known DN OIDs. This is useful since
7711 functions like <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-dn-by-oid" title="gnutls_x509_crt_set_dn_by_oid ()"><code class="function">gnutls_x509_crt_set_dn_by_oid()</code></a> use the information
7712 on known OIDs to properly encode their input. Object Identifiers
7713 that are not known are not encoded by these functions, and their
7714 input is stored directly into the ASN.1 structure. In that case of
7715 unknown OIDs, you have the responsibility of DER encoding your
7716 data.</p>
7717 <div class="refsect3">
7718 <a name="gnutls-x509-dn-oid-known.parameters"></a><h4>Parameters</h4>
7719 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7720 <colgroup>
7721 <col width="150px" class="parameters_name">
7722 <col class="parameters_description">
7723 <col width="200px" class="parameters_annotations">
7724 </colgroup>
7725 <tbody><tr>
7726 <td class="parameter_name"><p>oid</p></td>
7727 <td class="parameter_description"><p>holds an Object Identifier in a null terminated string</p></td>
7728 <td class="parameter_annotations"> </td>
7729 </tr></tbody>
7730 </table></div>
7731 </div>
7732 <div class="refsect3">
7733 <a name="gnutls-x509-dn-oid-known.returns"></a><h4>Returns</h4>
7734 <p> 1 on known OIDs and 0 otherwise.</p>
7735 </div>
7736 </div>
7737 <hr>
7738 <div class="refsect2">
7739 <a name="gnutls-x509-dn-oid-name"></a><h3>gnutls_x509_dn_oid_name ()</h3>
7740 <pre class="programlisting">const <span class="returnvalue">char</span> *
7741 gnutls_x509_dn_oid_name (<em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
7742 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
7743 <p>This function will return the name of a known DN OID. If
7744 <a class="link" href="gnutls-x509.html#GNUTLS-X509-DN-OID-RETURN-OID:CAPS" title="GNUTLS_X509_DN_OID_RETURN_OID"><code class="literal">GNUTLS_X509_DN_OID_RETURN_OID</code></a> is specified this function
7745 will return the given OID if no descriptive name has been
7746 found.</p>
7747 <div class="refsect3">
7748 <a name="gnutls-x509-dn-oid-name.parameters"></a><h4>Parameters</h4>
7749 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7750 <colgroup>
7751 <col width="150px" class="parameters_name">
7752 <col class="parameters_description">
7753 <col width="200px" class="parameters_annotations">
7754 </colgroup>
7755 <tbody>
7756 <tr>
7757 <td class="parameter_name"><p>oid</p></td>
7758 <td class="parameter_description"><p>holds an Object Identifier in a null terminated string</p></td>
7759 <td class="parameter_annotations"> </td>
7760 </tr>
7761 <tr>
7762 <td class="parameter_name"><p>flags</p></td>
7763 <td class="parameter_description"><p>0 or GNUTLS_X509_DN_OID_*</p></td>
7764 <td class="parameter_annotations"> </td>
7765 </tr>
7766 </tbody>
7767 </table></div>
7768 </div>
7769 <div class="refsect3">
7770 <a name="gnutls-x509-dn-oid-name.returns"></a><h4>Returns</h4>
7771 <p> A null terminated string or NULL otherwise.</p>
7772 </div>
7773 <p class="since">Since: 3.0</p>
7774 </div>
7775 <hr>
7776 <div class="refsect2">
7777 <a name="gnutls-x509-crt-get-extension-oid"></a><h3>gnutls_x509_crt_get_extension_oid ()</h3>
7778 <pre class="programlisting"><span class="returnvalue">int</span>
7779 gnutls_x509_crt_get_extension_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
7780 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
7781 <em class="parameter"><code><span class="type">void</span> *oid</code></em>,
7782 <em class="parameter"><code><span class="type">size_t</span> *oid_size</code></em>);</pre>
7783 <p>This function will return the requested extension OID in the certificate.
7784 The extension OID will be stored as a string in the provided buffer.</p>
7785 <p>The <em class="parameter"><code>oid</code></em>
7786 returned will be null terminated, although <em class="parameter"><code>oid_size</code></em>
7787 will not
7788 account for the trailing null.</p>
7789 <div class="refsect3">
7790 <a name="gnutls-x509-crt-get-extension-oid.parameters"></a><h4>Parameters</h4>
7791 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7792 <colgroup>
7793 <col width="150px" class="parameters_name">
7794 <col class="parameters_description">
7795 <col width="200px" class="parameters_annotations">
7796 </colgroup>
7797 <tbody>
7798 <tr>
7799 <td class="parameter_name"><p>cert</p></td>
7800 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
7801 <td class="parameter_annotations"> </td>
7802 </tr>
7803 <tr>
7804 <td class="parameter_name"><p>indx</p></td>
7805 <td class="parameter_description"><p>Specifies which extension OID to send. Use (0) to get the first one.</p></td>
7806 <td class="parameter_annotations"> </td>
7807 </tr>
7808 <tr>
7809 <td class="parameter_name"><p>oid</p></td>
7810 <td class="parameter_description"><p>a pointer to a structure to hold the OID (may be null)</p></td>
7811 <td class="parameter_annotations"> </td>
7812 </tr>
7813 <tr>
7814 <td class="parameter_name"><p>oid_size</p></td>
7815 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>oid</code></em>
7816 </p></td>
7817 <td class="parameter_annotations"> </td>
7818 </tr>
7819 </tbody>
7820 </table></div>
7821 </div>
7822 <div class="refsect3">
7823 <a name="gnutls-x509-crt-get-extension-oid.returns"></a><h4>Returns</h4>
7824 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned,
7825 otherwise a negative error code is returned. If you have reached the
7826 last extension available <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
7827 will be returned.</p>
7828 </div>
7829 </div>
7830 <hr>
7831 <div class="refsect2">
7832 <a name="gnutls-x509-crt-get-extension-by-oid"></a><h3>gnutls_x509_crt_get_extension_by_oid ()</h3>
7833 <pre class="programlisting"><span class="returnvalue">int</span>
7834 gnutls_x509_crt_get_extension_by_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
7835 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
7836 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
7837 <em class="parameter"><code><span class="type">void</span> *buf</code></em>,
7838 <em class="parameter"><code><span class="type">size_t</span> *buf_size</code></em>,
7839 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
7840 <p>This function will return the extension specified by the OID in the
7841 certificate. The extensions will be returned as binary data DER
7842 encoded, in the provided buffer.</p>
7843 <div class="refsect3">
7844 <a name="gnutls-x509-crt-get-extension-by-oid.parameters"></a><h4>Parameters</h4>
7845 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7846 <colgroup>
7847 <col width="150px" class="parameters_name">
7848 <col class="parameters_description">
7849 <col width="200px" class="parameters_annotations">
7850 </colgroup>
7851 <tbody>
7852 <tr>
7853 <td class="parameter_name"><p>cert</p></td>
7854 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
7855 <td class="parameter_annotations"> </td>
7856 </tr>
7857 <tr>
7858 <td class="parameter_name"><p>oid</p></td>
7859 <td class="parameter_description"><p>holds an Object Identified in null terminated string</p></td>
7860 <td class="parameter_annotations"> </td>
7861 </tr>
7862 <tr>
7863 <td class="parameter_name"><p>indx</p></td>
7864 <td class="parameter_description"><p>In case multiple same OIDs exist in the extensions, this specifies which to send. Use (0) to get the first one.</p></td>
7865 <td class="parameter_annotations"> </td>
7866 </tr>
7867 <tr>
7868 <td class="parameter_name"><p>buf</p></td>
7869 <td class="parameter_description"><p>a pointer to a structure to hold the name (may be null)</p></td>
7870 <td class="parameter_annotations"> </td>
7871 </tr>
7872 <tr>
7873 <td class="parameter_name"><p>buf_size</p></td>
7874 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>buf</code></em>
7875 </p></td>
7876 <td class="parameter_annotations"> </td>
7877 </tr>
7878 <tr>
7879 <td class="parameter_name"><p>critical</p></td>
7880 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical</p></td>
7881 <td class="parameter_annotations"> </td>
7882 </tr>
7883 </tbody>
7884 </table></div>
7885 </div>
7886 <div class="refsect3">
7887 <a name="gnutls-x509-crt-get-extension-by-oid.returns"></a><h4>Returns</h4>
7888 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned,
7889 otherwise a negative error code is returned. If the certificate does not
7890 contain the specified extension
7891 GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned.</p>
7892 </div>
7893 </div>
7894 <hr>
7895 <div class="refsect2">
7896 <a name="gnutls-x509-crq-get-signature-algorithm"></a><h3>gnutls_x509_crq_get_signature_algorithm ()</h3>
7897 <pre class="programlisting"><span class="returnvalue">int</span>
7898 gnutls_x509_crq_get_signature_algorithm
7899 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>);</pre>
7900 <p>This function will return a value of the <a class="link" href="gnutls-gnutls.html#gnutls-sign-algorithm-t" title="enum gnutls_sign_algorithm_t"><span class="type">gnutls_sign_algorithm_t</span></a>
7901 enumeration that is the signature algorithm that has been used to
7902 sign this certificate request.</p>
7903 <p>Since 3.6.0 this function never returns a negative error code.
7904 Error cases and unknown/unsupported signature algorithms are
7905 mapped to <a class="link" href="gnutls-gnutls.html#GNUTLS-SIGN-UNKNOWN:CAPS"><code class="literal">GNUTLS_SIGN_UNKNOWN</code></a>.</p>
7906 <div class="refsect3">
7907 <a name="gnutls-x509-crq-get-signature-algorithm.parameters"></a><h4>Parameters</h4>
7908 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7909 <colgroup>
7910 <col width="150px" class="parameters_name">
7911 <col class="parameters_description">
7912 <col width="200px" class="parameters_annotations">
7913 </colgroup>
7914 <tbody><tr>
7915 <td class="parameter_name"><p>crq</p></td>
7916 <td class="parameter_description"><p>should contain a <span class="type">gnutls_x509_cr_t</span> type</p></td>
7917 <td class="parameter_annotations"> </td>
7918 </tr></tbody>
7919 </table></div>
7920 </div>
7921 <div class="refsect3">
7922 <a name="gnutls-x509-crq-get-signature-algorithm.returns"></a><h4>Returns</h4>
7923 <p> a <a class="link" href="gnutls-gnutls.html#gnutls-sign-algorithm-t" title="enum gnutls_sign_algorithm_t"><span class="type">gnutls_sign_algorithm_t</span></a> value</p>
7924 </div>
7925 <p class="since">Since: 3.4.0</p>
7926 </div>
7927 <hr>
7928 <div class="refsect2">
7929 <a name="gnutls-x509-crq-get-extension-by-oid2"></a><h3>gnutls_x509_crq_get_extension_by_oid2 ()</h3>
7930 <pre class="programlisting"><span class="returnvalue">int</span>
7931 gnutls_x509_crq_get_extension_by_oid2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
7932 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
7933 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
7934 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *output</code></em>,
7935 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
7936 <p>This function will return the extension specified by the OID in
7937 the certificate. The extensions will be returned as binary data
7938 DER encoded, in the provided buffer.</p>
7939 <div class="refsect3">
7940 <a name="gnutls-x509-crq-get-extension-by-oid2.parameters"></a><h4>Parameters</h4>
7941 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7942 <colgroup>
7943 <col width="150px" class="parameters_name">
7944 <col class="parameters_description">
7945 <col width="200px" class="parameters_annotations">
7946 </colgroup>
7947 <tbody>
7948 <tr>
7949 <td class="parameter_name"><p>crq</p></td>
7950 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
7951 <td class="parameter_annotations"> </td>
7952 </tr>
7953 <tr>
7954 <td class="parameter_name"><p>oid</p></td>
7955 <td class="parameter_description"><p>holds an Object Identifier in a null terminated string</p></td>
7956 <td class="parameter_annotations"> </td>
7957 </tr>
7958 <tr>
7959 <td class="parameter_name"><p>indx</p></td>
7960 <td class="parameter_description"><p>In case multiple same OIDs exist in the extensions, this
7961 specifies which to get. Use (0) to get the first one.</p></td>
7962 <td class="parameter_annotations"> </td>
7963 </tr>
7964 <tr>
7965 <td class="parameter_name"><p>output</p></td>
7966 <td class="parameter_description"><p>will hold the allocated extension data</p></td>
7967 <td class="parameter_annotations"> </td>
7968 </tr>
7969 <tr>
7970 <td class="parameter_name"><p>critical</p></td>
7971 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical</p></td>
7972 <td class="parameter_annotations"> </td>
7973 </tr>
7974 </tbody>
7975 </table></div>
7976 </div>
7977 <div class="refsect3">
7978 <a name="gnutls-x509-crq-get-extension-by-oid2.returns"></a><h4>Returns</h4>
7979 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
7980 negative error code in case of an error. If the certificate does not
7981 contain the specified extension
7982 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> will be returned.</p>
7983 </div>
7984 <p class="since">Since: 3.3.8</p>
7985 </div>
7986 <hr>
7987 <div class="refsect2">
7988 <a name="gnutls-x509-crt-get-extension-info"></a><h3>gnutls_x509_crt_get_extension_info ()</h3>
7989 <pre class="programlisting"><span class="returnvalue">int</span>
7990 gnutls_x509_crt_get_extension_info (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
7991 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
7992 <em class="parameter"><code><span class="type">void</span> *oid</code></em>,
7993 <em class="parameter"><code><span class="type">size_t</span> *oid_size</code></em>,
7994 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
7995 <p>This function will return the requested extension OID in the
7996 certificate, and the critical flag for it. The extension OID will
7997 be stored as a string in the provided buffer. Use
7998 <code class="function">gnutls_x509_crt_get_extension()</code> to extract the data.</p>
7999 <p>If the buffer provided is not long enough to hold the output, then
8000 <em class="parameter"><code>oid_size</code></em>
8001 is updated and <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> will be
8002 returned. The <em class="parameter"><code>oid</code></em>
8003 returned will be null terminated, although
8004 <em class="parameter"><code>oid_size</code></em>
8005 will not account for the trailing null (the latter is not
8006 true for GnuTLS prior to 3.6.0).</p>
8007 <div class="refsect3">
8008 <a name="gnutls-x509-crt-get-extension-info.parameters"></a><h4>Parameters</h4>
8009 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8010 <colgroup>
8011 <col width="150px" class="parameters_name">
8012 <col class="parameters_description">
8013 <col width="200px" class="parameters_annotations">
8014 </colgroup>
8015 <tbody>
8016 <tr>
8017 <td class="parameter_name"><p>cert</p></td>
8018 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
8019 <td class="parameter_annotations"> </td>
8020 </tr>
8021 <tr>
8022 <td class="parameter_name"><p>indx</p></td>
8023 <td class="parameter_description"><p>Specifies which extension OID to send. Use (0) to get the first one.</p></td>
8024 <td class="parameter_annotations"> </td>
8025 </tr>
8026 <tr>
8027 <td class="parameter_name"><p>oid</p></td>
8028 <td class="parameter_description"><p>a pointer to a structure to hold the OID</p></td>
8029 <td class="parameter_annotations"> </td>
8030 </tr>
8031 <tr>
8032 <td class="parameter_name"><p>oid_size</p></td>
8033 <td class="parameter_description"><p>initially holds the maximum size of <em class="parameter"><code>oid</code></em>
8034 , on return
8035 holds actual size of <em class="parameter"><code>oid</code></em>
8036 .</p></td>
8037 <td class="parameter_annotations"> </td>
8038 </tr>
8039 <tr>
8040 <td class="parameter_name"><p>critical</p></td>
8041 <td class="parameter_description"><p>output variable with critical flag, may be NULL.</p></td>
8042 <td class="parameter_annotations"> </td>
8043 </tr>
8044 </tbody>
8045 </table></div>
8046 </div>
8047 <div class="refsect3">
8048 <a name="gnutls-x509-crt-get-extension-info.returns"></a><h4>Returns</h4>
8049 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned,
8050 otherwise a negative error code is returned. If you have reached the
8051 last extension available <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
8052 will be returned.</p>
8053 </div>
8054 </div>
8055 <hr>
8056 <div class="refsect2">
8057 <a name="gnutls-x509-crt-get-extension-data"></a><h3>gnutls_x509_crt_get_extension_data ()</h3>
8058 <pre class="programlisting"><span class="returnvalue">int</span>
8059 gnutls_x509_crt_get_extension_data (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
8060 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
8061 <em class="parameter"><code><span class="type">void</span> *data</code></em>,
8062 <em class="parameter"><code><span class="type">size_t</span> *sizeof_data</code></em>);</pre>
8063 <p>This function will return the requested extension data in the
8064 certificate. The extension data will be stored in the
8065 provided buffer.</p>
8066 <p>Use <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-extension-info" title="gnutls_x509_crt_get_extension_info ()"><code class="function">gnutls_x509_crt_get_extension_info()</code></a> to extract the OID and
8067 critical flag. Use <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-extension-by-oid" title="gnutls_x509_crt_get_extension_by_oid ()"><code class="function">gnutls_x509_crt_get_extension_by_oid()</code></a> instead,
8068 if you want to get data indexed by the extension OID rather than
8069 sequence.</p>
8070 <div class="refsect3">
8071 <a name="gnutls-x509-crt-get-extension-data.parameters"></a><h4>Parameters</h4>
8072 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8073 <colgroup>
8074 <col width="150px" class="parameters_name">
8075 <col class="parameters_description">
8076 <col width="200px" class="parameters_annotations">
8077 </colgroup>
8078 <tbody>
8079 <tr>
8080 <td class="parameter_name"><p>cert</p></td>
8081 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
8082 <td class="parameter_annotations"> </td>
8083 </tr>
8084 <tr>
8085 <td class="parameter_name"><p>indx</p></td>
8086 <td class="parameter_description"><p>Specifies which extension OID to send. Use (0) to get the first one.</p></td>
8087 <td class="parameter_annotations"> </td>
8088 </tr>
8089 <tr>
8090 <td class="parameter_name"><p>data</p></td>
8091 <td class="parameter_description"><p>a pointer to a structure to hold the data (may be null)</p></td>
8092 <td class="parameter_annotations"> </td>
8093 </tr>
8094 <tr>
8095 <td class="parameter_name"><p>sizeof_data</p></td>
8096 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>data</code></em>
8097 </p></td>
8098 <td class="parameter_annotations"> </td>
8099 </tr>
8100 </tbody>
8101 </table></div>
8102 </div>
8103 <div class="refsect3">
8104 <a name="gnutls-x509-crt-get-extension-data.returns"></a><h4>Returns</h4>
8105 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned,
8106 otherwise a negative error code is returned. If you have reached the
8107 last extension available <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
8108 will be returned.</p>
8109 </div>
8110 </div>
8111 <hr>
8112 <div class="refsect2">
8113 <a name="gnutls-x509-crt-get-extension-data2"></a><h3>gnutls_x509_crt_get_extension_data2 ()</h3>
8114 <pre class="programlisting"><span class="returnvalue">int</span>
8115 gnutls_x509_crt_get_extension_data2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
8116 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
8117 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>);</pre>
8118 <p>This function will return the requested by the index extension data in the
8119 certificate. The extension data will be allocated using
8120 <code class="function">gnutls_malloc()</code>.</p>
8121 <p>Use <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-extension-info" title="gnutls_x509_crt_get_extension_info ()"><code class="function">gnutls_x509_crt_get_extension_info()</code></a> to extract the OID.</p>
8122 <div class="refsect3">
8123 <a name="gnutls-x509-crt-get-extension-data2.parameters"></a><h4>Parameters</h4>
8124 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8125 <colgroup>
8126 <col width="150px" class="parameters_name">
8127 <col class="parameters_description">
8128 <col width="200px" class="parameters_annotations">
8129 </colgroup>
8130 <tbody>
8131 <tr>
8132 <td class="parameter_name"><p>cert</p></td>
8133 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
8134 <td class="parameter_annotations"> </td>
8135 </tr>
8136 <tr>
8137 <td class="parameter_name"><p>indx</p></td>
8138 <td class="parameter_description"><p>Specifies which extension OID to read. Use (0) to get the first one.</p></td>
8139 <td class="parameter_annotations"> </td>
8140 </tr>
8141 <tr>
8142 <td class="parameter_name"><p>data</p></td>
8143 <td class="parameter_description"><p>will contain the extension DER-encoded data</p></td>
8144 <td class="parameter_annotations"> </td>
8145 </tr>
8146 </tbody>
8147 </table></div>
8148 </div>
8149 <div class="refsect3">
8150 <a name="gnutls-x509-crt-get-extension-data2.returns"></a><h4>Returns</h4>
8151 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned,
8152 otherwise a negative error code is returned. If you have reached the
8153 last extension available <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
8154 will be returned.</p>
8155 </div>
8156 </div>
8157 <hr>
8158 <div class="refsect2">
8159 <a name="gnutls-x509-crt-set-extension-by-oid"></a><h3>gnutls_x509_crt_set_extension_by_oid ()</h3>
8160 <pre class="programlisting"><span class="returnvalue">int</span>
8161 gnutls_x509_crt_set_extension_by_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
8162 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
8163 <em class="parameter"><code>const <span class="type">void</span> *buf</code></em>,
8164 <em class="parameter"><code><span class="type">size_t</span> sizeof_buf</code></em>,
8165 <em class="parameter"><code>unsigned <span class="type">int</span> critical</code></em>);</pre>
8166 <p>This function will set an the extension, by the specified OID, in
8167 the certificate. The extension data should be binary data DER
8168 encoded.</p>
8169 <div class="refsect3">
8170 <a name="gnutls-x509-crt-set-extension-by-oid.parameters"></a><h4>Parameters</h4>
8171 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8172 <colgroup>
8173 <col width="150px" class="parameters_name">
8174 <col class="parameters_description">
8175 <col width="200px" class="parameters_annotations">
8176 </colgroup>
8177 <tbody>
8178 <tr>
8179 <td class="parameter_name"><p>crt</p></td>
8180 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8181 <td class="parameter_annotations"> </td>
8182 </tr>
8183 <tr>
8184 <td class="parameter_name"><p>oid</p></td>
8185 <td class="parameter_description"><p>holds an Object Identifier in null terminated string</p></td>
8186 <td class="parameter_annotations"> </td>
8187 </tr>
8188 <tr>
8189 <td class="parameter_name"><p>buf</p></td>
8190 <td class="parameter_description"><p>a pointer to a DER encoded data</p></td>
8191 <td class="parameter_annotations"> </td>
8192 </tr>
8193 <tr>
8194 <td class="parameter_name"><p>sizeof_buf</p></td>
8195 <td class="parameter_description"><p>holds the size of <em class="parameter"><code>buf</code></em>
8196 </p></td>
8197 <td class="parameter_annotations"> </td>
8198 </tr>
8199 <tr>
8200 <td class="parameter_name"><p>critical</p></td>
8201 <td class="parameter_description"><p>should be non-zero if the extension is to be marked as critical</p></td>
8202 <td class="parameter_annotations"> </td>
8203 </tr>
8204 </tbody>
8205 </table></div>
8206 </div>
8207 <div class="refsect3">
8208 <a name="gnutls-x509-crt-set-extension-by-oid.returns"></a><h4>Returns</h4>
8209 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8210 negative error value.</p>
8211 </div>
8212 </div>
8213 <hr>
8214 <div class="refsect2">
8215 <a name="gnutls-x509-crt-set-dn"></a><h3>gnutls_x509_crt_set_dn ()</h3>
8216 <pre class="programlisting"><span class="returnvalue">int</span>
8217 gnutls_x509_crt_set_dn (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
8218 <em class="parameter"><code>const <span class="type">char</span> *dn</code></em>,
8219 <em class="parameter"><code>const <span class="type">char</span> **err</code></em>);</pre>
8220 <p>This function will set the DN on the provided certificate.
8221 The input string should be plain ASCII or UTF-8 encoded. On
8222 DN parsing error <a class="link" href="gnutls-gnutls.html#GNUTLS-E-PARSING-ERROR:CAPS" title="GNUTLS_E_PARSING_ERROR"><code class="literal">GNUTLS_E_PARSING_ERROR</code></a> is returned.</p>
8223 <p>Note that DNs are not expected to hold DNS information, and thus
8224 no automatic IDNA conversions are attempted when using this function.
8225 If that is required (e.g., store a domain in CN), process the corresponding
8226 input with <a class="link" href="gnutls-gnutls.html#gnutls-idna-map" title="gnutls_idna_map ()"><code class="function">gnutls_idna_map()</code></a>.</p>
8227 <div class="refsect3">
8228 <a name="gnutls-x509-crt-set-dn.parameters"></a><h4>Parameters</h4>
8229 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8230 <colgroup>
8231 <col width="150px" class="parameters_name">
8232 <col class="parameters_description">
8233 <col width="200px" class="parameters_annotations">
8234 </colgroup>
8235 <tbody>
8236 <tr>
8237 <td class="parameter_name"><p>crt</p></td>
8238 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8239 <td class="parameter_annotations"> </td>
8240 </tr>
8241 <tr>
8242 <td class="parameter_name"><p>dn</p></td>
8243 <td class="parameter_description"><p>a comma separated DN string (RFC4514)</p></td>
8244 <td class="parameter_annotations"> </td>
8245 </tr>
8246 <tr>
8247 <td class="parameter_name"><p>err</p></td>
8248 <td class="parameter_description"><p>indicates the error position (if any)</p></td>
8249 <td class="parameter_annotations"> </td>
8250 </tr>
8251 </tbody>
8252 </table></div>
8253 </div>
8254 <div class="refsect3">
8255 <a name="gnutls-x509-crt-set-dn.returns"></a><h4>Returns</h4>
8256 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8257 negative error value.</p>
8258 </div>
8259 </div>
8260 <hr>
8261 <div class="refsect2">
8262 <a name="gnutls-x509-crt-set-dn-by-oid"></a><h3>gnutls_x509_crt_set_dn_by_oid ()</h3>
8263 <pre class="programlisting"><span class="returnvalue">int</span>
8264 gnutls_x509_crt_set_dn_by_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
8265 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
8266 <em class="parameter"><code>unsigned <span class="type">int</span> raw_flag</code></em>,
8267 <em class="parameter"><code>const <span class="type">void</span> *name</code></em>,
8268 <em class="parameter"><code>unsigned <span class="type">int</span> sizeof_name</code></em>);</pre>
8269 <p>This function will set the part of the name of the Certificate
8270 subject, specified by the given OID. The input string should be
8271 ASCII or UTF-8 encoded.</p>
8272 <p>Some helper macros with popular OIDs can be found in gnutls/x509.h
8273 With this function you can only set the known OIDs. You can test
8274 for known OIDs using <a class="link" href="gnutls-x509.html#gnutls-x509-dn-oid-known" title="gnutls_x509_dn_oid_known ()"><code class="function">gnutls_x509_dn_oid_known()</code></a>. For OIDs that are
8275 not known (by gnutls) you should properly DER encode your data,
8276 and call this function with <em class="parameter"><code>raw_flag</code></em>
8277 set.</p>
8278 <div class="refsect3">
8279 <a name="gnutls-x509-crt-set-dn-by-oid.parameters"></a><h4>Parameters</h4>
8280 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8281 <colgroup>
8282 <col width="150px" class="parameters_name">
8283 <col class="parameters_description">
8284 <col width="200px" class="parameters_annotations">
8285 </colgroup>
8286 <tbody>
8287 <tr>
8288 <td class="parameter_name"><p>crt</p></td>
8289 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8290 <td class="parameter_annotations"> </td>
8291 </tr>
8292 <tr>
8293 <td class="parameter_name"><p>oid</p></td>
8294 <td class="parameter_description"><p>holds an Object Identifier in a null terminated string</p></td>
8295 <td class="parameter_annotations"> </td>
8296 </tr>
8297 <tr>
8298 <td class="parameter_name"><p>raw_flag</p></td>
8299 <td class="parameter_description"><p>must be 0, or 1 if the data are DER encoded</p></td>
8300 <td class="parameter_annotations"> </td>
8301 </tr>
8302 <tr>
8303 <td class="parameter_name"><p>name</p></td>
8304 <td class="parameter_description"><p>a pointer to the name</p></td>
8305 <td class="parameter_annotations"> </td>
8306 </tr>
8307 <tr>
8308 <td class="parameter_name"><p>sizeof_name</p></td>
8309 <td class="parameter_description"><p>holds the size of <em class="parameter"><code>name</code></em>
8310 </p></td>
8311 <td class="parameter_annotations"> </td>
8312 </tr>
8313 </tbody>
8314 </table></div>
8315 </div>
8316 <div class="refsect3">
8317 <a name="gnutls-x509-crt-set-dn-by-oid.returns"></a><h4>Returns</h4>
8318 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8319 negative error value.</p>
8320 </div>
8321 </div>
8322 <hr>
8323 <div class="refsect2">
8324 <a name="gnutls-x509-crt-set-issuer-dn-by-oid"></a><h3>gnutls_x509_crt_set_issuer_dn_by_oid ()</h3>
8325 <pre class="programlisting"><span class="returnvalue">int</span>
8326 gnutls_x509_crt_set_issuer_dn_by_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
8327 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
8328 <em class="parameter"><code>unsigned <span class="type">int</span> raw_flag</code></em>,
8329 <em class="parameter"><code>const <span class="type">void</span> *name</code></em>,
8330 <em class="parameter"><code>unsigned <span class="type">int</span> sizeof_name</code></em>);</pre>
8331 <p>This function will set the part of the name of the Certificate
8332 issuer, specified by the given OID. The input string should be
8333 ASCII or UTF-8 encoded.</p>
8334 <p>Some helper macros with popular OIDs can be found in gnutls/x509.h
8335 With this function you can only set the known OIDs. You can test
8336 for known OIDs using <a class="link" href="gnutls-x509.html#gnutls-x509-dn-oid-known" title="gnutls_x509_dn_oid_known ()"><code class="function">gnutls_x509_dn_oid_known()</code></a>. For OIDs that are
8337 not known (by gnutls) you should properly DER encode your data,
8338 and call this function with <em class="parameter"><code>raw_flag</code></em>
8339 set.</p>
8340 <p>Normally you do not need to call this function, since the signing
8341 operation will copy the signer's name as the issuer of the
8342 certificate.</p>
8343 <div class="refsect3">
8344 <a name="gnutls-x509-crt-set-issuer-dn-by-oid.parameters"></a><h4>Parameters</h4>
8345 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8346 <colgroup>
8347 <col width="150px" class="parameters_name">
8348 <col class="parameters_description">
8349 <col width="200px" class="parameters_annotations">
8350 </colgroup>
8351 <tbody>
8352 <tr>
8353 <td class="parameter_name"><p>crt</p></td>
8354 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8355 <td class="parameter_annotations"> </td>
8356 </tr>
8357 <tr>
8358 <td class="parameter_name"><p>oid</p></td>
8359 <td class="parameter_description"><p>holds an Object Identifier in a null terminated string</p></td>
8360 <td class="parameter_annotations"> </td>
8361 </tr>
8362 <tr>
8363 <td class="parameter_name"><p>raw_flag</p></td>
8364 <td class="parameter_description"><p>must be 0, or 1 if the data are DER encoded</p></td>
8365 <td class="parameter_annotations"> </td>
8366 </tr>
8367 <tr>
8368 <td class="parameter_name"><p>name</p></td>
8369 <td class="parameter_description"><p>a pointer to the name</p></td>
8370 <td class="parameter_annotations"> </td>
8371 </tr>
8372 <tr>
8373 <td class="parameter_name"><p>sizeof_name</p></td>
8374 <td class="parameter_description"><p>holds the size of <em class="parameter"><code>name</code></em>
8375 </p></td>
8376 <td class="parameter_annotations"> </td>
8377 </tr>
8378 </tbody>
8379 </table></div>
8380 </div>
8381 <div class="refsect3">
8382 <a name="gnutls-x509-crt-set-issuer-dn-by-oid.returns"></a><h4>Returns</h4>
8383 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8384 negative error value.</p>
8385 </div>
8386 </div>
8387 <hr>
8388 <div class="refsect2">
8389 <a name="gnutls-x509-crt-set-issuer-dn"></a><h3>gnutls_x509_crt_set_issuer_dn ()</h3>
8390 <pre class="programlisting"><span class="returnvalue">int</span>
8391 gnutls_x509_crt_set_issuer_dn (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
8392 <em class="parameter"><code>const <span class="type">char</span> *dn</code></em>,
8393 <em class="parameter"><code>const <span class="type">char</span> **err</code></em>);</pre>
8394 <p>This function will set the DN on the provided certificate.
8395 The input string should be plain ASCII or UTF-8 encoded. On
8396 DN parsing error <a class="link" href="gnutls-gnutls.html#GNUTLS-E-PARSING-ERROR:CAPS" title="GNUTLS_E_PARSING_ERROR"><code class="literal">GNUTLS_E_PARSING_ERROR</code></a> is returned.</p>
8397 <div class="refsect3">
8398 <a name="gnutls-x509-crt-set-issuer-dn.parameters"></a><h4>Parameters</h4>
8399 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8400 <colgroup>
8401 <col width="150px" class="parameters_name">
8402 <col class="parameters_description">
8403 <col width="200px" class="parameters_annotations">
8404 </colgroup>
8405 <tbody>
8406 <tr>
8407 <td class="parameter_name"><p>crt</p></td>
8408 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8409 <td class="parameter_annotations"> </td>
8410 </tr>
8411 <tr>
8412 <td class="parameter_name"><p>dn</p></td>
8413 <td class="parameter_description"><p>a comma separated DN string (RFC4514)</p></td>
8414 <td class="parameter_annotations"> </td>
8415 </tr>
8416 <tr>
8417 <td class="parameter_name"><p>err</p></td>
8418 <td class="parameter_description"><p>indicates the error position (if any)</p></td>
8419 <td class="parameter_annotations"> </td>
8420 </tr>
8421 </tbody>
8422 </table></div>
8423 </div>
8424 <div class="refsect3">
8425 <a name="gnutls-x509-crt-set-issuer-dn.returns"></a><h4>Returns</h4>
8426 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8427 negative error value.</p>
8428 </div>
8429 </div>
8430 <hr>
8431 <div class="refsect2">
8432 <a name="gnutls-x509-crt-set-version"></a><h3>gnutls_x509_crt_set_version ()</h3>
8433 <pre class="programlisting"><span class="returnvalue">int</span>
8434 gnutls_x509_crt_set_version (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
8435 <em class="parameter"><code>unsigned <span class="type">int</span> version</code></em>);</pre>
8436 <p>This function will set the version of the certificate. This must
8437 be one for X.509 version 1, and so on. Plain certificates without
8438 extensions must have version set to one.</p>
8439 <p>To create well-formed certificates, you must specify version 3 if
8440 you use any certificate extensions. Extensions are created by
8441 functions such as <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-subject-alt-name" title="gnutls_x509_crt_set_subject_alt_name ()"><code class="function">gnutls_x509_crt_set_subject_alt_name()</code></a>
8442 or <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-key-usage" title="gnutls_x509_crt_set_key_usage ()"><code class="function">gnutls_x509_crt_set_key_usage()</code></a>.</p>
8443 <div class="refsect3">
8444 <a name="gnutls-x509-crt-set-version.parameters"></a><h4>Parameters</h4>
8445 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8446 <colgroup>
8447 <col width="150px" class="parameters_name">
8448 <col class="parameters_description">
8449 <col width="200px" class="parameters_annotations">
8450 </colgroup>
8451 <tbody>
8452 <tr>
8453 <td class="parameter_name"><p>crt</p></td>
8454 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8455 <td class="parameter_annotations"> </td>
8456 </tr>
8457 <tr>
8458 <td class="parameter_name"><p>version</p></td>
8459 <td class="parameter_description"><p>holds the version number. For X.509v1 certificates must be 1.</p></td>
8460 <td class="parameter_annotations"> </td>
8461 </tr>
8462 </tbody>
8463 </table></div>
8464 </div>
8465 <div class="refsect3">
8466 <a name="gnutls-x509-crt-set-version.returns"></a><h4>Returns</h4>
8467 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8468 negative error value.</p>
8469 </div>
8470 </div>
8471 <hr>
8472 <div class="refsect2">
8473 <a name="gnutls-x509-crt-set-key"></a><h3>gnutls_x509_crt_set_key ()</h3>
8474 <pre class="programlisting"><span class="returnvalue">int</span>
8475 gnutls_x509_crt_set_key (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
8476 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>);</pre>
8477 <p>This function will set the public parameters from the given
8478 private key to the certificate.</p>
8479 <p>To export the public key (i.e., the SubjectPublicKeyInfo part), check
8480 <a class="link" href="gnutls-abstract.html#gnutls-pubkey-import-x509" title="gnutls_pubkey_import_x509 ()"><code class="function">gnutls_pubkey_import_x509()</code></a>.</p>
8481 <div class="refsect3">
8482 <a name="gnutls-x509-crt-set-key.parameters"></a><h4>Parameters</h4>
8483 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8484 <colgroup>
8485 <col width="150px" class="parameters_name">
8486 <col class="parameters_description">
8487 <col width="200px" class="parameters_annotations">
8488 </colgroup>
8489 <tbody>
8490 <tr>
8491 <td class="parameter_name"><p>crt</p></td>
8492 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8493 <td class="parameter_annotations"> </td>
8494 </tr>
8495 <tr>
8496 <td class="parameter_name"><p>key</p></td>
8497 <td class="parameter_description"><p>holds a private key</p></td>
8498 <td class="parameter_annotations"> </td>
8499 </tr>
8500 </tbody>
8501 </table></div>
8502 </div>
8503 <div class="refsect3">
8504 <a name="gnutls-x509-crt-set-key.returns"></a><h4>Returns</h4>
8505 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8506 negative error value.</p>
8507 </div>
8508 </div>
8509 <hr>
8510 <div class="refsect2">
8511 <a name="gnutls-x509-crt-set-ca-status"></a><h3>gnutls_x509_crt_set_ca_status ()</h3>
8512 <pre class="programlisting"><span class="returnvalue">int</span>
8513 gnutls_x509_crt_set_ca_status (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
8514 <em class="parameter"><code>unsigned <span class="type">int</span> ca</code></em>);</pre>
8515 <p>This function will set the basicConstraints certificate extension.
8516 Use <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-basic-constraints" title="gnutls_x509_crt_set_basic_constraints ()"><code class="function">gnutls_x509_crt_set_basic_constraints()</code></a> if you want to control
8517 the pathLenConstraint field too.</p>
8518 <div class="refsect3">
8519 <a name="gnutls-x509-crt-set-ca-status.parameters"></a><h4>Parameters</h4>
8520 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8521 <colgroup>
8522 <col width="150px" class="parameters_name">
8523 <col class="parameters_description">
8524 <col width="200px" class="parameters_annotations">
8525 </colgroup>
8526 <tbody>
8527 <tr>
8528 <td class="parameter_name"><p>crt</p></td>
8529 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8530 <td class="parameter_annotations"> </td>
8531 </tr>
8532 <tr>
8533 <td class="parameter_name"><p>ca</p></td>
8534 <td class="parameter_description"><p>true(1) or false(0). Depending on the Certificate authority status.</p></td>
8535 <td class="parameter_annotations"> </td>
8536 </tr>
8537 </tbody>
8538 </table></div>
8539 </div>
8540 <div class="refsect3">
8541 <a name="gnutls-x509-crt-set-ca-status.returns"></a><h4>Returns</h4>
8542 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8543 negative error value.</p>
8544 </div>
8545 </div>
8546 <hr>
8547 <div class="refsect2">
8548 <a name="gnutls-x509-crt-set-basic-constraints"></a><h3>gnutls_x509_crt_set_basic_constraints ()</h3>
8549 <pre class="programlisting"><span class="returnvalue">int</span>
8550 gnutls_x509_crt_set_basic_constraints (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
8551 <em class="parameter"><code>unsigned <span class="type">int</span> ca</code></em>,
8552 <em class="parameter"><code><span class="type">int</span> pathLenConstraint</code></em>);</pre>
8553 <p>This function will set the basicConstraints certificate extension.</p>
8554 <div class="refsect3">
8555 <a name="gnutls-x509-crt-set-basic-constraints.parameters"></a><h4>Parameters</h4>
8556 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8557 <colgroup>
8558 <col width="150px" class="parameters_name">
8559 <col class="parameters_description">
8560 <col width="200px" class="parameters_annotations">
8561 </colgroup>
8562 <tbody>
8563 <tr>
8564 <td class="parameter_name"><p>crt</p></td>
8565 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8566 <td class="parameter_annotations"> </td>
8567 </tr>
8568 <tr>
8569 <td class="parameter_name"><p>ca</p></td>
8570 <td class="parameter_description"><p>true(1) or false(0). Depending on the Certificate authority status.</p></td>
8571 <td class="parameter_annotations"> </td>
8572 </tr>
8573 <tr>
8574 <td class="parameter_name"><p>pathLenConstraint</p></td>
8575 <td class="parameter_description"><p>non-negative error codes indicate maximum length of path,
8576 and negative error codes indicate that the pathLenConstraints field should
8577 not be present.</p></td>
8578 <td class="parameter_annotations"> </td>
8579 </tr>
8580 </tbody>
8581 </table></div>
8582 </div>
8583 <div class="refsect3">
8584 <a name="gnutls-x509-crt-set-basic-constraints.returns"></a><h4>Returns</h4>
8585 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8586 negative error value.</p>
8587 </div>
8588 </div>
8589 <hr>
8590 <div class="refsect2">
8591 <a name="gnutls-x509-crt-set-subject-unique-id"></a><h3>gnutls_x509_crt_set_subject_unique_id ()</h3>
8592 <pre class="programlisting"><span class="returnvalue">int</span>
8593 gnutls_x509_crt_set_subject_unique_id (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
8594 <em class="parameter"><code>const <span class="type">void</span> *id</code></em>,
8595 <em class="parameter"><code><span class="type">size_t</span> id_size</code></em>);</pre>
8596 <p>This function will set the X.509 certificate's subject unique ID field.</p>
8597 <div class="refsect3">
8598 <a name="gnutls-x509-crt-set-subject-unique-id.parameters"></a><h4>Parameters</h4>
8599 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8600 <colgroup>
8601 <col width="150px" class="parameters_name">
8602 <col class="parameters_description">
8603 <col width="200px" class="parameters_annotations">
8604 </colgroup>
8605 <tbody>
8606 <tr>
8607 <td class="parameter_name"><p>cert</p></td>
8608 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8609 <td class="parameter_annotations"> </td>
8610 </tr>
8611 <tr>
8612 <td class="parameter_name"><p>id</p></td>
8613 <td class="parameter_description"><p>The unique ID</p></td>
8614 <td class="parameter_annotations"> </td>
8615 </tr>
8616 <tr>
8617 <td class="parameter_name"><p>id_size</p></td>
8618 <td class="parameter_description"><p>Holds the size of the unique ID.</p></td>
8619 <td class="parameter_annotations"> </td>
8620 </tr>
8621 </tbody>
8622 </table></div>
8623 </div>
8624 <div class="refsect3">
8625 <a name="gnutls-x509-crt-set-subject-unique-id.returns"></a><h4>Returns</h4>
8626 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8627 negative error value.</p>
8628 </div>
8629 <p class="since">Since: 3.4.7</p>
8630 </div>
8631 <hr>
8632 <div class="refsect2">
8633 <a name="gnutls-x509-crt-set-issuer-unique-id"></a><h3>gnutls_x509_crt_set_issuer_unique_id ()</h3>
8634 <pre class="programlisting"><span class="returnvalue">int</span>
8635 gnutls_x509_crt_set_issuer_unique_id (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
8636 <em class="parameter"><code>const <span class="type">void</span> *id</code></em>,
8637 <em class="parameter"><code><span class="type">size_t</span> id_size</code></em>);</pre>
8638 <p>This function will set the X.509 certificate's issuer unique ID field.</p>
8639 <div class="refsect3">
8640 <a name="gnutls-x509-crt-set-issuer-unique-id.parameters"></a><h4>Parameters</h4>
8641 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8642 <colgroup>
8643 <col width="150px" class="parameters_name">
8644 <col class="parameters_description">
8645 <col width="200px" class="parameters_annotations">
8646 </colgroup>
8647 <tbody>
8648 <tr>
8649 <td class="parameter_name"><p>cert</p></td>
8650 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8651 <td class="parameter_annotations"> </td>
8652 </tr>
8653 <tr>
8654 <td class="parameter_name"><p>id</p></td>
8655 <td class="parameter_description"><p>The unique ID</p></td>
8656 <td class="parameter_annotations"> </td>
8657 </tr>
8658 <tr>
8659 <td class="parameter_name"><p>id_size</p></td>
8660 <td class="parameter_description"><p>Holds the size of the unique ID.</p></td>
8661 <td class="parameter_annotations"> </td>
8662 </tr>
8663 </tbody>
8664 </table></div>
8665 </div>
8666 <div class="refsect3">
8667 <a name="gnutls-x509-crt-set-issuer-unique-id.returns"></a><h4>Returns</h4>
8668 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8669 negative error value.</p>
8670 </div>
8671 <p class="since">Since: 3.4.7</p>
8672 </div>
8673 <hr>
8674 <div class="refsect2">
8675 <a name="gnutls-x509-crt-set-subject-alternative-name"></a><h3>gnutls_x509_crt_set_subject_alternative_name ()</h3>
8676 <pre class="programlisting"><span class="returnvalue">int</span>
8677 gnutls_x509_crt_set_subject_alternative_name
8678 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
8679 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a> type</code></em>,
8680 <em class="parameter"><code>const <span class="type">char</span> *data_string</code></em>);</pre>
8681 <p>This function will set the subject alternative name certificate
8682 extension. This function assumes that data can be expressed as a null
8683 terminated string.</p>
8684 <p>The name of the function is unfortunate since it is inconsistent with
8685 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-subject-alt-name" title="gnutls_x509_crt_get_subject_alt_name ()"><code class="function">gnutls_x509_crt_get_subject_alt_name()</code></a>.</p>
8686 <p>See <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-subject-alt-name" title="gnutls_x509_crt_set_subject_alt_name ()"><code class="function">gnutls_x509_crt_set_subject_alt_name()</code></a> for more information.</p>
8687 <div class="refsect3">
8688 <a name="gnutls-x509-crt-set-subject-alternative-name.parameters"></a><h4>Parameters</h4>
8689 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8690 <colgroup>
8691 <col width="150px" class="parameters_name">
8692 <col class="parameters_description">
8693 <col width="200px" class="parameters_annotations">
8694 </colgroup>
8695 <tbody>
8696 <tr>
8697 <td class="parameter_name"><p>crt</p></td>
8698 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8699 <td class="parameter_annotations"> </td>
8700 </tr>
8701 <tr>
8702 <td class="parameter_name"><p>type</p></td>
8703 <td class="parameter_description"><p>is one of the gnutls_x509_subject_alt_name_t enumerations</p></td>
8704 <td class="parameter_annotations"> </td>
8705 </tr>
8706 <tr>
8707 <td class="parameter_name"><p>data_string</p></td>
8708 <td class="parameter_description"><p>The data to be set, a (0) terminated string</p></td>
8709 <td class="parameter_annotations"> </td>
8710 </tr>
8711 </tbody>
8712 </table></div>
8713 </div>
8714 <div class="refsect3">
8715 <a name="gnutls-x509-crt-set-subject-alternative-name.returns"></a><h4>Returns</h4>
8716 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8717 negative error value.</p>
8718 </div>
8719 </div>
8720 <hr>
8721 <div class="refsect2">
8722 <a name="gnutls-x509-crt-set-subject-alt-name"></a><h3>gnutls_x509_crt_set_subject_alt_name ()</h3>
8723 <pre class="programlisting"><span class="returnvalue">int</span>
8724 gnutls_x509_crt_set_subject_alt_name (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
8725 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a> type</code></em>,
8726 <em class="parameter"><code>const <span class="type">void</span> *data</code></em>,
8727 <em class="parameter"><code>unsigned <span class="type">int</span> data_size</code></em>,
8728 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
8729 <p>This function will set the subject alternative name certificate
8730 extension. It can set the following types: <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-DNSNAME:CAPS"><code class="literal">GNUTLS_SAN_DNSNAME</code></a> as a text string,
8731 <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-RFC822NAME:CAPS"><code class="literal">GNUTLS_SAN_RFC822NAME</code></a> as a text string, <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-URI:CAPS"><code class="literal">GNUTLS_SAN_URI</code></a> as a text string,
8732 <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-IPADDRESS:CAPS"><code class="literal">GNUTLS_SAN_IPADDRESS</code></a> as a binary IP address (4 or 16 bytes),
8733 <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME-XMPP:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME_XMPP</code></a> as a UTF8 string (since 3.5.0).</p>
8734 <p>Since version 3.5.7 the <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-RFC822NAME:CAPS"><code class="literal">GNUTLS_SAN_RFC822NAME</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-DNSNAME:CAPS"><code class="literal">GNUTLS_SAN_DNSNAME</code></a>, and
8735 <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME-XMPP:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME_XMPP</code></a> are converted to ACE format when necessary.</p>
8736 <div class="refsect3">
8737 <a name="gnutls-x509-crt-set-subject-alt-name.parameters"></a><h4>Parameters</h4>
8738 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8739 <colgroup>
8740 <col width="150px" class="parameters_name">
8741 <col class="parameters_description">
8742 <col width="200px" class="parameters_annotations">
8743 </colgroup>
8744 <tbody>
8745 <tr>
8746 <td class="parameter_name"><p>crt</p></td>
8747 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8748 <td class="parameter_annotations"> </td>
8749 </tr>
8750 <tr>
8751 <td class="parameter_name"><p>type</p></td>
8752 <td class="parameter_description"><p>is one of the gnutls_x509_subject_alt_name_t enumerations</p></td>
8753 <td class="parameter_annotations"> </td>
8754 </tr>
8755 <tr>
8756 <td class="parameter_name"><p>data</p></td>
8757 <td class="parameter_description"><p>The data to be set</p></td>
8758 <td class="parameter_annotations"> </td>
8759 </tr>
8760 <tr>
8761 <td class="parameter_name"><p>data_size</p></td>
8762 <td class="parameter_description"><p>The size of data to be set</p></td>
8763 <td class="parameter_annotations"> </td>
8764 </tr>
8765 <tr>
8766 <td class="parameter_name"><p>flags</p></td>
8767 <td class="parameter_description"><p>GNUTLS_FSAN_SET to clear previous data or GNUTLS_FSAN_APPEND to append. </p></td>
8768 <td class="parameter_annotations"> </td>
8769 </tr>
8770 </tbody>
8771 </table></div>
8772 </div>
8773 <div class="refsect3">
8774 <a name="gnutls-x509-crt-set-subject-alt-name.returns"></a><h4>Returns</h4>
8775 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8776 negative error value.</p>
8777 </div>
8778 <p class="since">Since: 2.6.0</p>
8779 </div>
8780 <hr>
8781 <div class="refsect2">
8782 <a name="gnutls-x509-crt-set-subject-alt-othername"></a><h3>gnutls_x509_crt_set_subject_alt_othername ()</h3>
8783 <pre class="programlisting"><span class="returnvalue">int</span>
8784 gnutls_x509_crt_set_subject_alt_othername
8785 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
8786 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
8787 <em class="parameter"><code>const <span class="type">void</span> *data</code></em>,
8788 <em class="parameter"><code>unsigned <span class="type">int</span> data_size</code></em>,
8789 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
8790 <p>This function will set an "othername" to the subject alternative name certificate
8791 extension.</p>
8792 <p>The values set are set as binary values and are expected to have the proper DER encoding.
8793 For convenience the flags <a class="link" href="gnutls-x509.html#GNUTLS-FSAN-ENCODE-OCTET-STRING:CAPS" title="GNUTLS_FSAN_ENCODE_OCTET_STRING"><code class="literal">GNUTLS_FSAN_ENCODE_OCTET_STRING</code></a> and <a class="link" href="gnutls-x509.html#GNUTLS-FSAN-ENCODE-UTF8-STRING:CAPS" title="GNUTLS_FSAN_ENCODE_UTF8_STRING"><code class="literal">GNUTLS_FSAN_ENCODE_UTF8_STRING</code></a>
8794 can be used to encode the provided data.</p>
8795 <div class="refsect3">
8796 <a name="gnutls-x509-crt-set-subject-alt-othername.parameters"></a><h4>Parameters</h4>
8797 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8798 <colgroup>
8799 <col width="150px" class="parameters_name">
8800 <col class="parameters_description">
8801 <col width="200px" class="parameters_annotations">
8802 </colgroup>
8803 <tbody>
8804 <tr>
8805 <td class="parameter_name"><p>crt</p></td>
8806 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8807 <td class="parameter_annotations"> </td>
8808 </tr>
8809 <tr>
8810 <td class="parameter_name"><p>oid</p></td>
8811 <td class="parameter_description"><p>The other name OID</p></td>
8812 <td class="parameter_annotations"> </td>
8813 </tr>
8814 <tr>
8815 <td class="parameter_name"><p>data</p></td>
8816 <td class="parameter_description"><p>The data to be set</p></td>
8817 <td class="parameter_annotations"> </td>
8818 </tr>
8819 <tr>
8820 <td class="parameter_name"><p>data_size</p></td>
8821 <td class="parameter_description"><p>The size of data to be set</p></td>
8822 <td class="parameter_annotations"> </td>
8823 </tr>
8824 <tr>
8825 <td class="parameter_name"><p>flags</p></td>
8826 <td class="parameter_description"><p>GNUTLS_FSAN_SET to clear previous data or GNUTLS_FSAN_APPEND to append. </p></td>
8827 <td class="parameter_annotations"> </td>
8828 </tr>
8829 </tbody>
8830 </table></div>
8831 </div>
8832 <div class="refsect3">
8833 <a name="gnutls-x509-crt-set-subject-alt-othername.returns"></a><h4>Returns</h4>
8834 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8835 negative error value.</p>
8836 </div>
8837 <p class="since">Since: 3.5.0</p>
8838 </div>
8839 <hr>
8840 <div class="refsect2">
8841 <a name="gnutls-x509-crt-set-issuer-alt-name"></a><h3>gnutls_x509_crt_set_issuer_alt_name ()</h3>
8842 <pre class="programlisting"><span class="returnvalue">int</span>
8843 gnutls_x509_crt_set_issuer_alt_name (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
8844 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a> type</code></em>,
8845 <em class="parameter"><code>const <span class="type">void</span> *data</code></em>,
8846 <em class="parameter"><code>unsigned <span class="type">int</span> data_size</code></em>,
8847 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
8848 <p>This function will set the issuer alternative name certificate
8849 extension. It can set the same types as <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-subject-alt-name" title="gnutls_x509_crt_set_subject_alt_name ()"><code class="function">gnutls_x509_crt_set_subject_alt_name()</code></a>.</p>
8850 <p>Since version 3.5.7 the <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-RFC822NAME:CAPS"><code class="literal">GNUTLS_SAN_RFC822NAME</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-DNSNAME:CAPS"><code class="literal">GNUTLS_SAN_DNSNAME</code></a>, and
8851 <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME-XMPP:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME_XMPP</code></a> are converted to ACE format when necessary.</p>
8852 <div class="refsect3">
8853 <a name="gnutls-x509-crt-set-issuer-alt-name.parameters"></a><h4>Parameters</h4>
8854 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8855 <colgroup>
8856 <col width="150px" class="parameters_name">
8857 <col class="parameters_description">
8858 <col width="200px" class="parameters_annotations">
8859 </colgroup>
8860 <tbody>
8861 <tr>
8862 <td class="parameter_name"><p>crt</p></td>
8863 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8864 <td class="parameter_annotations"> </td>
8865 </tr>
8866 <tr>
8867 <td class="parameter_name"><p>type</p></td>
8868 <td class="parameter_description"><p>is one of the gnutls_x509_subject_alt_name_t enumerations</p></td>
8869 <td class="parameter_annotations"> </td>
8870 </tr>
8871 <tr>
8872 <td class="parameter_name"><p>data</p></td>
8873 <td class="parameter_description"><p>The data to be set</p></td>
8874 <td class="parameter_annotations"> </td>
8875 </tr>
8876 <tr>
8877 <td class="parameter_name"><p>data_size</p></td>
8878 <td class="parameter_description"><p>The size of data to be set</p></td>
8879 <td class="parameter_annotations"> </td>
8880 </tr>
8881 <tr>
8882 <td class="parameter_name"><p>flags</p></td>
8883 <td class="parameter_description"><p>GNUTLS_FSAN_SET to clear previous data or GNUTLS_FSAN_APPEND to append. </p></td>
8884 <td class="parameter_annotations"> </td>
8885 </tr>
8886 </tbody>
8887 </table></div>
8888 </div>
8889 <div class="refsect3">
8890 <a name="gnutls-x509-crt-set-issuer-alt-name.returns"></a><h4>Returns</h4>
8891 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8892 negative error value.</p>
8893 </div>
8894 <p class="since">Since: 3.3.0</p>
8895 </div>
8896 <hr>
8897 <div class="refsect2">
8898 <a name="gnutls-x509-crt-set-issuer-alt-othername"></a><h3>gnutls_x509_crt_set_issuer_alt_othername ()</h3>
8899 <pre class="programlisting"><span class="returnvalue">int</span>
8900 gnutls_x509_crt_set_issuer_alt_othername
8901 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
8902 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
8903 <em class="parameter"><code>const <span class="type">void</span> *data</code></em>,
8904 <em class="parameter"><code>unsigned <span class="type">int</span> data_size</code></em>,
8905 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
8906 <p>This function will set an "othername" to the issuer alternative name certificate
8907 extension.</p>
8908 <p>The values set are set as binary values and are expected to have the proper DER encoding.
8909 For convenience the flags <a class="link" href="gnutls-x509.html#GNUTLS-FSAN-ENCODE-OCTET-STRING:CAPS" title="GNUTLS_FSAN_ENCODE_OCTET_STRING"><code class="literal">GNUTLS_FSAN_ENCODE_OCTET_STRING</code></a> and <a class="link" href="gnutls-x509.html#GNUTLS-FSAN-ENCODE-UTF8-STRING:CAPS" title="GNUTLS_FSAN_ENCODE_UTF8_STRING"><code class="literal">GNUTLS_FSAN_ENCODE_UTF8_STRING</code></a>
8910 can be used to encode the provided data.</p>
8911 <div class="refsect3">
8912 <a name="gnutls-x509-crt-set-issuer-alt-othername.parameters"></a><h4>Parameters</h4>
8913 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8914 <colgroup>
8915 <col width="150px" class="parameters_name">
8916 <col class="parameters_description">
8917 <col width="200px" class="parameters_annotations">
8918 </colgroup>
8919 <tbody>
8920 <tr>
8921 <td class="parameter_name"><p>crt</p></td>
8922 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8923 <td class="parameter_annotations"> </td>
8924 </tr>
8925 <tr>
8926 <td class="parameter_name"><p>oid</p></td>
8927 <td class="parameter_description"><p>The other name OID</p></td>
8928 <td class="parameter_annotations"> </td>
8929 </tr>
8930 <tr>
8931 <td class="parameter_name"><p>data</p></td>
8932 <td class="parameter_description"><p>The data to be set</p></td>
8933 <td class="parameter_annotations"> </td>
8934 </tr>
8935 <tr>
8936 <td class="parameter_name"><p>data_size</p></td>
8937 <td class="parameter_description"><p>The size of data to be set</p></td>
8938 <td class="parameter_annotations"> </td>
8939 </tr>
8940 <tr>
8941 <td class="parameter_name"><p>flags</p></td>
8942 <td class="parameter_description"><p>GNUTLS_FSAN_SET to clear previous data or GNUTLS_FSAN_APPEND to append. </p></td>
8943 <td class="parameter_annotations"> </td>
8944 </tr>
8945 </tbody>
8946 </table></div>
8947 </div>
8948 <div class="refsect3">
8949 <a name="gnutls-x509-crt-set-issuer-alt-othername.returns"></a><h4>Returns</h4>
8950 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8951 negative error value.</p>
8952 </div>
8953 <p class="since">Since: 3.5.0</p>
8954 </div>
8955 <hr>
8956 <div class="refsect2">
8957 <a name="gnutls-x509-crt-sign"></a><h3>gnutls_x509_crt_sign ()</h3>
8958 <pre class="programlisting"><span class="returnvalue">int</span>
8959 gnutls_x509_crt_sign (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
8960 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> issuer</code></em>,
8961 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> issuer_key</code></em>);</pre>
8962 <p>This function is the same a <a class="link" href="gnutls-x509.html#gnutls-x509-crt-sign2" title="gnutls_x509_crt_sign2 ()"><code class="function">gnutls_x509_crt_sign2()</code></a> with no flags,
8963 and an appropriate hash algorithm. The hash algorithm used may
8964 vary between versions of GnuTLS, and it is tied to the security
8965 level of the issuer's public key.</p>
8966 <div class="refsect3">
8967 <a name="gnutls-x509-crt-sign.parameters"></a><h4>Parameters</h4>
8968 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8969 <colgroup>
8970 <col width="150px" class="parameters_name">
8971 <col class="parameters_description">
8972 <col width="200px" class="parameters_annotations">
8973 </colgroup>
8974 <tbody>
8975 <tr>
8976 <td class="parameter_name"><p>crt</p></td>
8977 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
8978 <td class="parameter_annotations"> </td>
8979 </tr>
8980 <tr>
8981 <td class="parameter_name"><p>issuer</p></td>
8982 <td class="parameter_description"><p>is the certificate of the certificate issuer</p></td>
8983 <td class="parameter_annotations"> </td>
8984 </tr>
8985 <tr>
8986 <td class="parameter_name"><p>issuer_key</p></td>
8987 <td class="parameter_description"><p>holds the issuer's private key</p></td>
8988 <td class="parameter_annotations"> </td>
8989 </tr>
8990 </tbody>
8991 </table></div>
8992 </div>
8993 <div class="refsect3">
8994 <a name="gnutls-x509-crt-sign.returns"></a><h4>Returns</h4>
8995 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
8996 negative error value.</p>
8997 </div>
8998 </div>
8999 <hr>
9000 <div class="refsect2">
9001 <a name="gnutls-x509-crt-sign2"></a><h3>gnutls_x509_crt_sign2 ()</h3>
9002 <pre class="programlisting"><span class="returnvalue">int</span>
9003 gnutls_x509_crt_sign2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
9004 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> issuer</code></em>,
9005 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> issuer_key</code></em>,
9006 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> dig</code></em>,
9007 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
9008 <p>This function will sign the certificate with the issuer's private key, and
9009 will copy the issuer's information into the certificate.</p>
9010 <p>This must be the last step in a certificate generation since all
9011 the previously set parameters are now signed.</p>
9012 <p>A known limitation of this function is, that a newly-signed certificate will not
9013 be fully functional (e.g., for signature verification), until it
9014 is exported an re-imported.</p>
9015 <p>After GnuTLS 3.6.1 the value of <em class="parameter"><code>dig</code></em>
9016 may be <a class="link" href="gnutls-gnutls.html#GNUTLS-DIG-UNKNOWN:CAPS"><code class="literal">GNUTLS_DIG_UNKNOWN</code></a>,
9017 and in that case, a suitable but reasonable for the key algorithm will be selected.</p>
9018 <div class="refsect3">
9019 <a name="gnutls-x509-crt-sign2.parameters"></a><h4>Parameters</h4>
9020 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9021 <colgroup>
9022 <col width="150px" class="parameters_name">
9023 <col class="parameters_description">
9024 <col width="200px" class="parameters_annotations">
9025 </colgroup>
9026 <tbody>
9027 <tr>
9028 <td class="parameter_name"><p>crt</p></td>
9029 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
9030 <td class="parameter_annotations"> </td>
9031 </tr>
9032 <tr>
9033 <td class="parameter_name"><p>issuer</p></td>
9034 <td class="parameter_description"><p>is the certificate of the certificate issuer</p></td>
9035 <td class="parameter_annotations"> </td>
9036 </tr>
9037 <tr>
9038 <td class="parameter_name"><p>issuer_key</p></td>
9039 <td class="parameter_description"><p>holds the issuer's private key</p></td>
9040 <td class="parameter_annotations"> </td>
9041 </tr>
9042 <tr>
9043 <td class="parameter_name"><p>dig</p></td>
9044 <td class="parameter_description"><p>The message digest to use, <a class="link" href="gnutls-gnutls.html#GNUTLS-DIG-SHA256:CAPS"><code class="literal">GNUTLS_DIG_SHA256</code></a> is a safe choice</p></td>
9045 <td class="parameter_annotations"> </td>
9046 </tr>
9047 <tr>
9048 <td class="parameter_name"><p>flags</p></td>
9049 <td class="parameter_description"><p>must be 0</p></td>
9050 <td class="parameter_annotations"> </td>
9051 </tr>
9052 </tbody>
9053 </table></div>
9054 </div>
9055 <div class="refsect3">
9056 <a name="gnutls-x509-crt-sign2.returns"></a><h4>Returns</h4>
9057 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
9058 negative error value.</p>
9059 </div>
9060 </div>
9061 <hr>
9062 <div class="refsect2">
9063 <a name="gnutls-x509-crt-set-activation-time"></a><h3>gnutls_x509_crt_set_activation_time ()</h3>
9064 <pre class="programlisting"><span class="returnvalue">int</span>
9065 gnutls_x509_crt_set_activation_time (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
9066 <em class="parameter"><code><span class="type">time_t</span> act_time</code></em>);</pre>
9067 <p>This function will set the time this certificate was or will be
9068 activated.</p>
9069 <div class="refsect3">
9070 <a name="gnutls-x509-crt-set-activation-time.parameters"></a><h4>Parameters</h4>
9071 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9072 <colgroup>
9073 <col width="150px" class="parameters_name">
9074 <col class="parameters_description">
9075 <col width="200px" class="parameters_annotations">
9076 </colgroup>
9077 <tbody>
9078 <tr>
9079 <td class="parameter_name"><p>cert</p></td>
9080 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
9081 <td class="parameter_annotations"> </td>
9082 </tr>
9083 <tr>
9084 <td class="parameter_name"><p>act_time</p></td>
9085 <td class="parameter_description"><p>The actual time</p></td>
9086 <td class="parameter_annotations"> </td>
9087 </tr>
9088 </tbody>
9089 </table></div>
9090 </div>
9091 <div class="refsect3">
9092 <a name="gnutls-x509-crt-set-activation-time.returns"></a><h4>Returns</h4>
9093 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
9094 negative error value.</p>
9095 </div>
9096 </div>
9097 <hr>
9098 <div class="refsect2">
9099 <a name="gnutls-x509-crt-set-expiration-time"></a><h3>gnutls_x509_crt_set_expiration_time ()</h3>
9100 <pre class="programlisting"><span class="returnvalue">int</span>
9101 gnutls_x509_crt_set_expiration_time (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
9102 <em class="parameter"><code><span class="type">time_t</span> exp_time</code></em>);</pre>
9103 <p>This function will set the time this Certificate will expire.
9104 Setting an expiration time to (time_t)-1 will set
9105 to the no well-defined expiration date value.</p>
9106 <div class="refsect3">
9107 <a name="gnutls-x509-crt-set-expiration-time.parameters"></a><h4>Parameters</h4>
9108 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9109 <colgroup>
9110 <col width="150px" class="parameters_name">
9111 <col class="parameters_description">
9112 <col width="200px" class="parameters_annotations">
9113 </colgroup>
9114 <tbody>
9115 <tr>
9116 <td class="parameter_name"><p>cert</p></td>
9117 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
9118 <td class="parameter_annotations"> </td>
9119 </tr>
9120 <tr>
9121 <td class="parameter_name"><p>exp_time</p></td>
9122 <td class="parameter_description"><p>The actual time</p></td>
9123 <td class="parameter_annotations"> </td>
9124 </tr>
9125 </tbody>
9126 </table></div>
9127 </div>
9128 <div class="refsect3">
9129 <a name="gnutls-x509-crt-set-expiration-time.returns"></a><h4>Returns</h4>
9130 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
9131 negative error value.</p>
9132 </div>
9133 </div>
9134 <hr>
9135 <div class="refsect2">
9136 <a name="gnutls-x509-crt-set-serial"></a><h3>gnutls_x509_crt_set_serial ()</h3>
9137 <pre class="programlisting"><span class="returnvalue">int</span>
9138 gnutls_x509_crt_set_serial (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
9139 <em class="parameter"><code>const <span class="type">void</span> *serial</code></em>,
9140 <em class="parameter"><code><span class="type">size_t</span> serial_size</code></em>);</pre>
9141 <p>This function will set the X.509 certificate's serial number.
9142 While the serial number is an integer, it is often handled
9143 as an opaque field by several CAs. For this reason this function
9144 accepts any kind of data as a serial number. To be consistent
9145 with the X.509/PKIX specifications the provided <em class="parameter"><code>serial</code></em>
9146 should be
9147 a big-endian positive number (i.e. its leftmost bit should be zero).</p>
9148 <p>The size of the serial is restricted to 20 bytes maximum by RFC5280.
9149 This function allows writing more than 20 bytes but the generated
9150 certificates in that case may be rejected by other implementations.</p>
9151 <div class="refsect3">
9152 <a name="gnutls-x509-crt-set-serial.parameters"></a><h4>Parameters</h4>
9153 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9154 <colgroup>
9155 <col width="150px" class="parameters_name">
9156 <col class="parameters_description">
9157 <col width="200px" class="parameters_annotations">
9158 </colgroup>
9159 <tbody>
9160 <tr>
9161 <td class="parameter_name"><p>cert</p></td>
9162 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
9163 <td class="parameter_annotations"> </td>
9164 </tr>
9165 <tr>
9166 <td class="parameter_name"><p>serial</p></td>
9167 <td class="parameter_description"><p>The serial number</p></td>
9168 <td class="parameter_annotations"> </td>
9169 </tr>
9170 <tr>
9171 <td class="parameter_name"><p>serial_size</p></td>
9172 <td class="parameter_description"><p>Holds the size of the serial field.</p></td>
9173 <td class="parameter_annotations"> </td>
9174 </tr>
9175 </tbody>
9176 </table></div>
9177 </div>
9178 <div class="refsect3">
9179 <a name="gnutls-x509-crt-set-serial.returns"></a><h4>Returns</h4>
9180 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
9181 negative error value.</p>
9182 </div>
9183 </div>
9184 <hr>
9185 <div class="refsect2">
9186 <a name="gnutls-x509-crt-set-subject-key-id"></a><h3>gnutls_x509_crt_set_subject_key_id ()</h3>
9187 <pre class="programlisting"><span class="returnvalue">int</span>
9188 gnutls_x509_crt_set_subject_key_id (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
9189 <em class="parameter"><code>const <span class="type">void</span> *id</code></em>,
9190 <em class="parameter"><code><span class="type">size_t</span> id_size</code></em>);</pre>
9191 <p>This function will set the X.509 certificate's subject key ID
9192 extension.</p>
9193 <div class="refsect3">
9194 <a name="gnutls-x509-crt-set-subject-key-id.parameters"></a><h4>Parameters</h4>
9195 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9196 <colgroup>
9197 <col width="150px" class="parameters_name">
9198 <col class="parameters_description">
9199 <col width="200px" class="parameters_annotations">
9200 </colgroup>
9201 <tbody>
9202 <tr>
9203 <td class="parameter_name"><p>cert</p></td>
9204 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
9205 <td class="parameter_annotations"> </td>
9206 </tr>
9207 <tr>
9208 <td class="parameter_name"><p>id</p></td>
9209 <td class="parameter_description"><p>The key ID</p></td>
9210 <td class="parameter_annotations"> </td>
9211 </tr>
9212 <tr>
9213 <td class="parameter_name"><p>id_size</p></td>
9214 <td class="parameter_description"><p>Holds the size of the subject key ID field.</p></td>
9215 <td class="parameter_annotations"> </td>
9216 </tr>
9217 </tbody>
9218 </table></div>
9219 </div>
9220 <div class="refsect3">
9221 <a name="gnutls-x509-crt-set-subject-key-id.returns"></a><h4>Returns</h4>
9222 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
9223 negative error value.</p>
9224 </div>
9225 </div>
9226 <hr>
9227 <div class="refsect2">
9228 <a name="gnutls-x509-crt-set-proxy-dn"></a><h3>gnutls_x509_crt_set_proxy_dn ()</h3>
9229 <pre class="programlisting"><span class="returnvalue">int</span>
9230 gnutls_x509_crt_set_proxy_dn (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
9231 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> eecrt</code></em>,
9232 <em class="parameter"><code>unsigned <span class="type">int</span> raw_flag</code></em>,
9233 <em class="parameter"><code>const <span class="type">void</span> *name</code></em>,
9234 <em class="parameter"><code>unsigned <span class="type">int</span> sizeof_name</code></em>);</pre>
9235 <p>This function will set the subject in <em class="parameter"><code>crt</code></em>
9236 to the end entity's
9237 <em class="parameter"><code>eecrt</code></em>
9238 subject name, and add a single Common Name component <em class="parameter"><code>name</code></em>
9239
9240 of size <em class="parameter"><code>sizeof_name</code></em>
9241 . This corresponds to the required proxy
9242 certificate naming style. Note that if <em class="parameter"><code>name</code></em>
9243 is <code class="literal">NULL</code>, you MUST
9244 set it later by using <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-dn-by-oid" title="gnutls_x509_crt_set_dn_by_oid ()"><code class="function">gnutls_x509_crt_set_dn_by_oid()</code></a> or similar.</p>
9245 <div class="refsect3">
9246 <a name="gnutls-x509-crt-set-proxy-dn.parameters"></a><h4>Parameters</h4>
9247 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9248 <colgroup>
9249 <col width="150px" class="parameters_name">
9250 <col class="parameters_description">
9251 <col width="200px" class="parameters_annotations">
9252 </colgroup>
9253 <tbody>
9254 <tr>
9255 <td class="parameter_name"><p>crt</p></td>
9256 <td class="parameter_description"><p>a gnutls_x509_crt_t type with the new proxy cert</p></td>
9257 <td class="parameter_annotations"> </td>
9258 </tr>
9259 <tr>
9260 <td class="parameter_name"><p>eecrt</p></td>
9261 <td class="parameter_description"><p>the end entity certificate that will be issuing the proxy</p></td>
9262 <td class="parameter_annotations"> </td>
9263 </tr>
9264 <tr>
9265 <td class="parameter_name"><p>raw_flag</p></td>
9266 <td class="parameter_description"><p>must be 0, or 1 if the CN is DER encoded</p></td>
9267 <td class="parameter_annotations"> </td>
9268 </tr>
9269 <tr>
9270 <td class="parameter_name"><p>name</p></td>
9271 <td class="parameter_description"><p>a pointer to the CN name, may be NULL (but MUST then be added later)</p></td>
9272 <td class="parameter_annotations"> </td>
9273 </tr>
9274 <tr>
9275 <td class="parameter_name"><p>sizeof_name</p></td>
9276 <td class="parameter_description"><p>holds the size of <em class="parameter"><code>name</code></em>
9277 </p></td>
9278 <td class="parameter_annotations"> </td>
9279 </tr>
9280 </tbody>
9281 </table></div>
9282 </div>
9283 <div class="refsect3">
9284 <a name="gnutls-x509-crt-set-proxy-dn.returns"></a><h4>Returns</h4>
9285 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
9286 negative error value.</p>
9287 </div>
9288 </div>
9289 <hr>
9290 <div class="refsect2">
9291 <a name="gnutls-x509-crt-set-proxy"></a><h3>gnutls_x509_crt_set_proxy ()</h3>
9292 <pre class="programlisting"><span class="returnvalue">int</span>
9293 gnutls_x509_crt_set_proxy (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
9294 <em class="parameter"><code><span class="type">int</span> pathLenConstraint</code></em>,
9295 <em class="parameter"><code>const <span class="type">char</span> *policyLanguage</code></em>,
9296 <em class="parameter"><code>const <span class="type">char</span> *policy</code></em>,
9297 <em class="parameter"><code><span class="type">size_t</span> sizeof_policy</code></em>);</pre>
9298 <p>This function will set the proxyCertInfo extension.</p>
9299 <div class="refsect3">
9300 <a name="gnutls-x509-crt-set-proxy.parameters"></a><h4>Parameters</h4>
9301 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9302 <colgroup>
9303 <col width="150px" class="parameters_name">
9304 <col class="parameters_description">
9305 <col width="200px" class="parameters_annotations">
9306 </colgroup>
9307 <tbody>
9308 <tr>
9309 <td class="parameter_name"><p>crt</p></td>
9310 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
9311 <td class="parameter_annotations"> </td>
9312 </tr>
9313 <tr>
9314 <td class="parameter_name"><p>pathLenConstraint</p></td>
9315 <td class="parameter_description"><p>non-negative error codes indicate maximum length of path,
9316 and negative error codes indicate that the pathLenConstraints field should
9317 not be present.</p></td>
9318 <td class="parameter_annotations"> </td>
9319 </tr>
9320 <tr>
9321 <td class="parameter_name"><p>policyLanguage</p></td>
9322 <td class="parameter_description"><p>OID describing the language of <em class="parameter"><code>policy</code></em>
9323 .</p></td>
9324 <td class="parameter_annotations"> </td>
9325 </tr>
9326 <tr>
9327 <td class="parameter_name"><p>policy</p></td>
9328 <td class="parameter_description"><p>uint8_t byte array with policy language, can be <code class="literal">NULL</code></p></td>
9329 <td class="parameter_annotations"> </td>
9330 </tr>
9331 <tr>
9332 <td class="parameter_name"><p>sizeof_policy</p></td>
9333 <td class="parameter_description"><p>size of <em class="parameter"><code>policy</code></em>
9334 .</p></td>
9335 <td class="parameter_annotations"> </td>
9336 </tr>
9337 </tbody>
9338 </table></div>
9339 </div>
9340 <div class="refsect3">
9341 <a name="gnutls-x509-crt-set-proxy.returns"></a><h4>Returns</h4>
9342 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
9343 negative error value.</p>
9344 </div>
9345 </div>
9346 <hr>
9347 <div class="refsect2">
9348 <a name="gnutls-x509-crt-print"></a><h3>gnutls_x509_crt_print ()</h3>
9349 <pre class="programlisting"><span class="returnvalue">int</span>
9350 gnutls_x509_crt_print (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
9351 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-certificate-print-formats-t" title="enum gnutls_certificate_print_formats_t"><span class="type">gnutls_certificate_print_formats_t</span></a> format</code></em>,
9352 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>);</pre>
9353 <p>This function will pretty print a X.509 certificate, suitable for
9354 display to a human.</p>
9355 <p>If the format is <a class="link" href="gnutls-gnutls.html#GNUTLS-CRT-PRINT-FULL:CAPS"><code class="literal">GNUTLS_CRT_PRINT_FULL</code></a> then all fields of the
9356 certificate will be output, on multiple lines. The
9357 <a class="link" href="gnutls-gnutls.html#GNUTLS-CRT-PRINT-ONELINE:CAPS"><code class="literal">GNUTLS_CRT_PRINT_ONELINE</code></a> format will generate one line with some
9358 selected fields, which is useful for logging purposes.</p>
9359 <p>The output <em class="parameter"><code>out</code></em>
9360 needs to be deallocated using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p>
9361 <div class="refsect3">
9362 <a name="gnutls-x509-crt-print.parameters"></a><h4>Parameters</h4>
9363 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9364 <colgroup>
9365 <col width="150px" class="parameters_name">
9366 <col class="parameters_description">
9367 <col width="200px" class="parameters_annotations">
9368 </colgroup>
9369 <tbody>
9370 <tr>
9371 <td class="parameter_name"><p>cert</p></td>
9372 <td class="parameter_description"><p>The data to be printed</p></td>
9373 <td class="parameter_annotations"> </td>
9374 </tr>
9375 <tr>
9376 <td class="parameter_name"><p>format</p></td>
9377 <td class="parameter_description"><p>Indicate the format to use</p></td>
9378 <td class="parameter_annotations"> </td>
9379 </tr>
9380 <tr>
9381 <td class="parameter_name"><p>out</p></td>
9382 <td class="parameter_description"><p>Newly allocated datum with null terminated string.</p></td>
9383 <td class="parameter_annotations"> </td>
9384 </tr>
9385 </tbody>
9386 </table></div>
9387 </div>
9388 <div class="refsect3">
9389 <a name="gnutls-x509-crt-print.returns"></a><h4>Returns</h4>
9390 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
9391 negative error value.</p>
9392 </div>
9393 </div>
9394 <hr>
9395 <div class="refsect2">
9396 <a name="gnutls-x509-crl-print"></a><h3>gnutls_x509_crl_print ()</h3>
9397 <pre class="programlisting"><span class="returnvalue">int</span>
9398 gnutls_x509_crl_print (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
9399 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-certificate-print-formats-t" title="enum gnutls_certificate_print_formats_t"><span class="type">gnutls_certificate_print_formats_t</span></a> format</code></em>,
9400 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>);</pre>
9401 <p>This function will pretty print a X.509 certificate revocation
9402 list, suitable for display to a human.</p>
9403 <p>The output <em class="parameter"><code>out</code></em>
9404 needs to be deallocated using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p>
9405 <div class="refsect3">
9406 <a name="gnutls-x509-crl-print.parameters"></a><h4>Parameters</h4>
9407 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9408 <colgroup>
9409 <col width="150px" class="parameters_name">
9410 <col class="parameters_description">
9411 <col width="200px" class="parameters_annotations">
9412 </colgroup>
9413 <tbody>
9414 <tr>
9415 <td class="parameter_name"><p>crl</p></td>
9416 <td class="parameter_description"><p>The data to be printed</p></td>
9417 <td class="parameter_annotations"> </td>
9418 </tr>
9419 <tr>
9420 <td class="parameter_name"><p>format</p></td>
9421 <td class="parameter_description"><p>Indicate the format to use</p></td>
9422 <td class="parameter_annotations"> </td>
9423 </tr>
9424 <tr>
9425 <td class="parameter_name"><p>out</p></td>
9426 <td class="parameter_description"><p>Newly allocated datum with null terminated string.</p></td>
9427 <td class="parameter_annotations"> </td>
9428 </tr>
9429 </tbody>
9430 </table></div>
9431 </div>
9432 <div class="refsect3">
9433 <a name="gnutls-x509-crl-print.returns"></a><h4>Returns</h4>
9434 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
9435 negative error value.</p>
9436 </div>
9437 </div>
9438 <hr>
9439 <div class="refsect2">
9440 <a name="gnutls-x509-crt-get-raw-issuer-dn"></a><h3>gnutls_x509_crt_get_raw_issuer_dn ()</h3>
9441 <pre class="programlisting"><span class="returnvalue">int</span>
9442 gnutls_x509_crt_get_raw_issuer_dn (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
9443 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *start</code></em>);</pre>
9444 <p>This function will return a pointer to the DER encoded DN structure
9445 and the length. This points to allocated data that must be free'd using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p>
9446 <div class="refsect3">
9447 <a name="gnutls-x509-crt-get-raw-issuer-dn.parameters"></a><h4>Parameters</h4>
9448 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9449 <colgroup>
9450 <col width="150px" class="parameters_name">
9451 <col class="parameters_description">
9452 <col width="200px" class="parameters_annotations">
9453 </colgroup>
9454 <tbody>
9455 <tr>
9456 <td class="parameter_name"><p>cert</p></td>
9457 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
9458 <td class="parameter_annotations"> </td>
9459 </tr>
9460 <tr>
9461 <td class="parameter_name"><p>dn</p></td>
9462 <td class="parameter_description"><p>will hold the starting point of the DN</p></td>
9463 <td class="parameter_annotations"> </td>
9464 </tr>
9465 </tbody>
9466 </table></div>
9467 </div>
9468 <div class="refsect3">
9469 <a name="gnutls-x509-crt-get-raw-issuer-dn.returns"></a><h4>Returns</h4>
9470 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
9471 negative error value.or a negative error code on error.</p>
9472 </div>
9473 </div>
9474 <hr>
9475 <div class="refsect2">
9476 <a name="gnutls-x509-crt-get-raw-dn"></a><h3>gnutls_x509_crt_get_raw_dn ()</h3>
9477 <pre class="programlisting"><span class="returnvalue">int</span>
9478 gnutls_x509_crt_get_raw_dn (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
9479 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *start</code></em>);</pre>
9480 <p>This function will return a pointer to the DER encoded DN structure and
9481 the length. This points to allocated data that must be free'd using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p>
9482 <div class="refsect3">
9483 <a name="gnutls-x509-crt-get-raw-dn.parameters"></a><h4>Parameters</h4>
9484 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9485 <colgroup>
9486 <col width="150px" class="parameters_name">
9487 <col class="parameters_description">
9488 <col width="200px" class="parameters_annotations">
9489 </colgroup>
9490 <tbody>
9491 <tr>
9492 <td class="parameter_name"><p>cert</p></td>
9493 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
9494 <td class="parameter_annotations"> </td>
9495 </tr>
9496 <tr>
9497 <td class="parameter_name"><p>dn</p></td>
9498 <td class="parameter_description"><p>will hold the starting point of the DN</p></td>
9499 <td class="parameter_annotations"> </td>
9500 </tr>
9501 </tbody>
9502 </table></div>
9503 </div>
9504 <div class="refsect3">
9505 <a name="gnutls-x509-crt-get-raw-dn.returns"></a><h4>Returns</h4>
9506 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
9507 negative error value. or a negative error code on error.</p>
9508 </div>
9509 </div>
9510 <hr>
9511 <div class="refsect2">
9512 <a name="gnutls-x509-rdn-get"></a><h3>gnutls_x509_rdn_get ()</h3>
9513 <pre class="programlisting"><span class="returnvalue">int</span>
9514 gnutls_x509_rdn_get (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *idn</code></em>,
9515 <em class="parameter"><code><span class="type">char</span> *buf</code></em>,
9516 <em class="parameter"><code><span class="type">size_t</span> *sizeof_buf</code></em>);</pre>
9517 <p>This function will return the name of the given RDN sequence. The
9518 name will be in the form "C=xxxx,O=yyyy,CN=zzzz" as described in
9519 RFC4514.</p>
9520 <p>This function does not output a fully RFC4514 compliant string, if
9521 that is required see <a class="link" href="gnutls-x509.html#gnutls-x509-rdn-get2" title="gnutls_x509_rdn_get2 ()"><code class="function">gnutls_x509_rdn_get2()</code></a>.</p>
9522 <div class="refsect3">
9523 <a name="gnutls-x509-rdn-get.parameters"></a><h4>Parameters</h4>
9524 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9525 <colgroup>
9526 <col width="150px" class="parameters_name">
9527 <col class="parameters_description">
9528 <col width="200px" class="parameters_annotations">
9529 </colgroup>
9530 <tbody>
9531 <tr>
9532 <td class="parameter_name"><p>idn</p></td>
9533 <td class="parameter_description"><p>should contain a DER encoded RDN sequence</p></td>
9534 <td class="parameter_annotations"> </td>
9535 </tr>
9536 <tr>
9537 <td class="parameter_name"><p>buf</p></td>
9538 <td class="parameter_description"><p>a pointer to a structure to hold the peer's name</p></td>
9539 <td class="parameter_annotations"> </td>
9540 </tr>
9541 <tr>
9542 <td class="parameter_name"><p>buf_size</p></td>
9543 <td class="parameter_description"><p>holds the size of <em class="parameter"><code>buf</code></em>
9544 </p></td>
9545 <td class="parameter_annotations"> </td>
9546 </tr>
9547 </tbody>
9548 </table></div>
9549 </div>
9550 <div class="refsect3">
9551 <a name="gnutls-x509-rdn-get.returns"></a><h4>Returns</h4>
9552 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, or
9553 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> is returned and *<em class="parameter"><code>buf_size</code></em>
9554 is
9555 updated if the provided buffer is not long enough, otherwise a
9556 negative error value.</p>
9557 </div>
9558 </div>
9559 <hr>
9560 <div class="refsect2">
9561 <a name="gnutls-x509-rdn-get2"></a><h3>gnutls_x509_rdn_get2 ()</h3>
9562 <pre class="programlisting"><span class="returnvalue">int</span>
9563 gnutls_x509_rdn_get2 (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *idn</code></em>,
9564 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *str</code></em>,
9565 <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre>
9566 <p>This function will return the name of the given RDN sequence. The
9567 name will be in the form "C=xxxx,O=yyyy,CN=zzzz" as described in
9568 RFC4514.</p>
9569 <p>When the flag <a class="link" href="gnutls-x509.html#GNUTLS-X509-DN-FLAG-COMPAT:CAPS" title="GNUTLS_X509_DN_FLAG_COMPAT"><code class="literal">GNUTLS_X509_DN_FLAG_COMPAT</code></a> is specified, the output
9570 format will match the format output by previous to 3.5.6 versions of GnuTLS
9571 which was not not fully RFC4514-compliant.</p>
9572 <div class="refsect3">
9573 <a name="gnutls-x509-rdn-get2.parameters"></a><h4>Parameters</h4>
9574 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9575 <colgroup>
9576 <col width="150px" class="parameters_name">
9577 <col class="parameters_description">
9578 <col width="200px" class="parameters_annotations">
9579 </colgroup>
9580 <tbody>
9581 <tr>
9582 <td class="parameter_name"><p>idn</p></td>
9583 <td class="parameter_description"><p>should contain a DER encoded RDN sequence</p></td>
9584 <td class="parameter_annotations"> </td>
9585 </tr>
9586 <tr>
9587 <td class="parameter_name"><p>str</p></td>
9588 <td class="parameter_description"><p>a datum that will hold the name</p></td>
9589 <td class="parameter_annotations"> </td>
9590 </tr>
9591 <tr>
9592 <td class="parameter_name"><p>flags</p></td>
9593 <td class="parameter_description"><p>zero of <a class="link" href="gnutls-x509.html#GNUTLS-X509-DN-FLAG-COMPAT:CAPS" title="GNUTLS_X509_DN_FLAG_COMPAT"><code class="literal">GNUTLS_X509_DN_FLAG_COMPAT</code></a></p></td>
9594 <td class="parameter_annotations"> </td>
9595 </tr>
9596 </tbody>
9597 </table></div>
9598 </div>
9599 <div class="refsect3">
9600 <a name="gnutls-x509-rdn-get2.returns"></a><h4>Returns</h4>
9601 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, or
9602 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> is returned and *<em class="parameter"><code>buf_size</code></em>
9603 is
9604 updated if the provided buffer is not long enough, otherwise a
9605 negative error value.</p>
9606 </div>
9607 </div>
9608 <hr>
9609 <div class="refsect2">
9610 <a name="gnutls-x509-rdn-get-oid"></a><h3>gnutls_x509_rdn_get_oid ()</h3>
9611 <pre class="programlisting"><span class="returnvalue">int</span>
9612 gnutls_x509_rdn_get_oid (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *idn</code></em>,
9613 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
9614 <em class="parameter"><code><span class="type">void</span> *buf</code></em>,
9615 <em class="parameter"><code><span class="type">size_t</span> *sizeof_buf</code></em>);</pre>
9616 <p>This function will return the specified Object identifier, of the
9617 RDN sequence.</p>
9618 <div class="refsect3">
9619 <a name="gnutls-x509-rdn-get-oid.parameters"></a><h4>Parameters</h4>
9620 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9621 <colgroup>
9622 <col width="150px" class="parameters_name">
9623 <col class="parameters_description">
9624 <col width="200px" class="parameters_annotations">
9625 </colgroup>
9626 <tbody>
9627 <tr>
9628 <td class="parameter_name"><p>idn</p></td>
9629 <td class="parameter_description"><p>should contain a DER encoded RDN sequence</p></td>
9630 <td class="parameter_annotations"> </td>
9631 </tr>
9632 <tr>
9633 <td class="parameter_name"><p>indx</p></td>
9634 <td class="parameter_description"><p>Indicates which OID to return. Use 0 for the first one.</p></td>
9635 <td class="parameter_annotations"> </td>
9636 </tr>
9637 <tr>
9638 <td class="parameter_name"><p>buf</p></td>
9639 <td class="parameter_description"><p>a pointer to a structure to hold the peer's name OID</p></td>
9640 <td class="parameter_annotations"> </td>
9641 </tr>
9642 <tr>
9643 <td class="parameter_name"><p>buf_size</p></td>
9644 <td class="parameter_description"><p>holds the size of <em class="parameter"><code>buf</code></em>
9645 </p></td>
9646 <td class="parameter_annotations"> </td>
9647 </tr>
9648 </tbody>
9649 </table></div>
9650 </div>
9651 <div class="refsect3">
9652 <a name="gnutls-x509-rdn-get-oid.returns"></a><h4>Returns</h4>
9653 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, or
9654 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> is returned and *<em class="parameter"><code>buf_size</code></em>
9655 is
9656 updated if the provided buffer is not long enough, otherwise a
9657 negative error value.</p>
9658 </div>
9659 <p class="since">Since: 2.4.0</p>
9660 </div>
9661 <hr>
9662 <div class="refsect2">
9663 <a name="gnutls-x509-rdn-get-by-oid"></a><h3>gnutls_x509_rdn_get_by_oid ()</h3>
9664 <pre class="programlisting"><span class="returnvalue">int</span>
9665 gnutls_x509_rdn_get_by_oid (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *idn</code></em>,
9666 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
9667 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
9668 <em class="parameter"><code>unsigned <span class="type">int</span> raw_flag</code></em>,
9669 <em class="parameter"><code><span class="type">void</span> *buf</code></em>,
9670 <em class="parameter"><code><span class="type">size_t</span> *sizeof_buf</code></em>);</pre>
9671 <p>This function will return the name of the given Object identifier,
9672 of the RDN sequence. The name will be encoded using the rules
9673 from RFC4514.</p>
9674 <div class="refsect3">
9675 <a name="gnutls-x509-rdn-get-by-oid.parameters"></a><h4>Parameters</h4>
9676 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9677 <colgroup>
9678 <col width="150px" class="parameters_name">
9679 <col class="parameters_description">
9680 <col width="200px" class="parameters_annotations">
9681 </colgroup>
9682 <tbody>
9683 <tr>
9684 <td class="parameter_name"><p>idn</p></td>
9685 <td class="parameter_description"><p>should contain a DER encoded RDN sequence</p></td>
9686 <td class="parameter_annotations"> </td>
9687 </tr>
9688 <tr>
9689 <td class="parameter_name"><p>oid</p></td>
9690 <td class="parameter_description"><p>an Object Identifier</p></td>
9691 <td class="parameter_annotations"> </td>
9692 </tr>
9693 <tr>
9694 <td class="parameter_name"><p>indx</p></td>
9695 <td class="parameter_description"><p>In case multiple same OIDs exist in the RDN indicates which
9696 to send. Use 0 for the first one.</p></td>
9697 <td class="parameter_annotations"> </td>
9698 </tr>
9699 <tr>
9700 <td class="parameter_name"><p>raw_flag</p></td>
9701 <td class="parameter_description"><p>If non-zero then the raw DER data are returned.</p></td>
9702 <td class="parameter_annotations"> </td>
9703 </tr>
9704 <tr>
9705 <td class="parameter_name"><p>buf</p></td>
9706 <td class="parameter_description"><p>a pointer to a structure to hold the peer's name</p></td>
9707 <td class="parameter_annotations"> </td>
9708 </tr>
9709 <tr>
9710 <td class="parameter_name"><p>buf_size</p></td>
9711 <td class="parameter_description"><p>holds the size of <em class="parameter"><code>buf</code></em>
9712 </p></td>
9713 <td class="parameter_annotations"> </td>
9714 </tr>
9715 </tbody>
9716 </table></div>
9717 </div>
9718 <div class="refsect3">
9719 <a name="gnutls-x509-rdn-get-by-oid.returns"></a><h4>Returns</h4>
9720 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, or
9721 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> is returned and *<em class="parameter"><code>buf_size</code></em>
9722 is
9723 updated if the provided buffer is not long enough, otherwise a
9724 negative error value.</p>
9725 </div>
9726 </div>
9727 <hr>
9728 <div class="refsect2">
9729 <a name="gnutls-x509-crt-get-subject"></a><h3>gnutls_x509_crt_get_subject ()</h3>
9730 <pre class="programlisting"><span class="returnvalue">int</span>
9731 gnutls_x509_crt_get_subject (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
9732 <em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-dn-t" title="gnutls_x509_dn_t"><span class="type">gnutls_x509_dn_t</span></a> *dn</code></em>);</pre>
9733 <p>Return the Certificate's Subject DN as a <a class="link" href="gnutls-x509.html#gnutls-x509-dn-t" title="gnutls_x509_dn_t"><code class="literal">gnutls_x509_dn_t</code></a> data type,
9734 that can be decoded using <a class="link" href="gnutls-x509.html#gnutls-x509-dn-get-rdn-ava" title="gnutls_x509_dn_get_rdn_ava ()"><code class="function">gnutls_x509_dn_get_rdn_ava()</code></a>.</p>
9735 <p>Note that <em class="parameter"><code>dn</code></em>
9736 should be treated as constant. Because it points
9737 into the <em class="parameter"><code>cert</code></em>
9738 object, you should not use <em class="parameter"><code>dn</code></em>
9739 after <em class="parameter"><code>cert</code></em>
9740 is
9741 deallocated.</p>
9742 <div class="refsect3">
9743 <a name="gnutls-x509-crt-get-subject.parameters"></a><h4>Parameters</h4>
9744 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9745 <colgroup>
9746 <col width="150px" class="parameters_name">
9747 <col class="parameters_description">
9748 <col width="200px" class="parameters_annotations">
9749 </colgroup>
9750 <tbody>
9751 <tr>
9752 <td class="parameter_name"><p>cert</p></td>
9753 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
9754 <td class="parameter_annotations"> </td>
9755 </tr>
9756 <tr>
9757 <td class="parameter_name"><p>dn</p></td>
9758 <td class="parameter_description"><p>output variable with pointer to uint8_t DN.</p></td>
9759 <td class="parameter_annotations"> </td>
9760 </tr>
9761 </tbody>
9762 </table></div>
9763 </div>
9764 <div class="refsect3">
9765 <a name="gnutls-x509-crt-get-subject.returns"></a><h4>Returns</h4>
9766 <p> Returns 0 on success, or an error code.</p>
9767 </div>
9768 </div>
9769 <hr>
9770 <div class="refsect2">
9771 <a name="gnutls-x509-crt-get-issuer"></a><h3>gnutls_x509_crt_get_issuer ()</h3>
9772 <pre class="programlisting"><span class="returnvalue">int</span>
9773 gnutls_x509_crt_get_issuer (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
9774 <em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-dn-t" title="gnutls_x509_dn_t"><span class="type">gnutls_x509_dn_t</span></a> *dn</code></em>);</pre>
9775 <p>Return the Certificate's Issuer DN as a <a class="link" href="gnutls-x509.html#gnutls-x509-dn-t" title="gnutls_x509_dn_t"><code class="literal">gnutls_x509_dn_t</code></a> data type,
9776 that can be decoded using <a class="link" href="gnutls-x509.html#gnutls-x509-dn-get-rdn-ava" title="gnutls_x509_dn_get_rdn_ava ()"><code class="function">gnutls_x509_dn_get_rdn_ava()</code></a>.</p>
9777 <p>Note that <em class="parameter"><code>dn</code></em>
9778 should be treated as constant. Because it points
9779 into the <em class="parameter"><code>cert</code></em>
9780 object, you should not use <em class="parameter"><code>dn</code></em>
9781 after <em class="parameter"><code>cert</code></em>
9782 is
9783 deallocated.</p>
9784 <div class="refsect3">
9785 <a name="gnutls-x509-crt-get-issuer.parameters"></a><h4>Parameters</h4>
9786 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9787 <colgroup>
9788 <col width="150px" class="parameters_name">
9789 <col class="parameters_description">
9790 <col width="200px" class="parameters_annotations">
9791 </colgroup>
9792 <tbody>
9793 <tr>
9794 <td class="parameter_name"><p>cert</p></td>
9795 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
9796 <td class="parameter_annotations"> </td>
9797 </tr>
9798 <tr>
9799 <td class="parameter_name"><p>dn</p></td>
9800 <td class="parameter_description"><p>output variable with pointer to uint8_t DN</p></td>
9801 <td class="parameter_annotations"> </td>
9802 </tr>
9803 </tbody>
9804 </table></div>
9805 </div>
9806 <div class="refsect3">
9807 <a name="gnutls-x509-crt-get-issuer.returns"></a><h4>Returns</h4>
9808 <p> Returns 0 on success, or an error code.</p>
9809 </div>
9810 </div>
9811 <hr>
9812 <div class="refsect2">
9813 <a name="gnutls-x509-dn-get-rdn-ava"></a><h3>gnutls_x509_dn_get_rdn_ava ()</h3>
9814 <pre class="programlisting"><span class="returnvalue">int</span>
9815 gnutls_x509_dn_get_rdn_ava (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-dn-t" title="gnutls_x509_dn_t"><span class="type">gnutls_x509_dn_t</span></a> dn</code></em>,
9816 <em class="parameter"><code><span class="type">int</span> irdn</code></em>,
9817 <em class="parameter"><code><span class="type">int</span> iava</code></em>,
9818 <em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-ava-st" title="gnutls_x509_ava_st"><span class="type">gnutls_x509_ava_st</span></a> *ava</code></em>);</pre>
9819 <p>Get pointers to data within the DN. The format of the <em class="parameter"><code>ava</code></em>
9820 structure
9821 is shown below.</p>
9822 <p> struct gnutls_x509_ava_st {
9823 gnutls_datum_t oid;
9824 gnutls_datum_t value;
9825 unsigned long value_tag;
9826 };</p>
9827 <p>The X.509 distinguished name is a sequence of sequences of strings
9828 and this is what the <em class="parameter"><code>irdn</code></em>
9829 and <em class="parameter"><code>iava</code></em>
9830 indexes model.</p>
9831 <p>Note that <em class="parameter"><code>ava</code></em>
9832 will contain pointers into the <em class="parameter"><code>dn</code></em>
9833 structure which
9834 in turns points to the original certificate. Thus you should not
9835 modify any data or deallocate any of those.</p>
9836 <p>This is a low-level function that requires the caller to do the
9837 value conversions when necessary (e.g. from UCS-2).</p>
9838 <div class="refsect3">
9839 <a name="gnutls-x509-dn-get-rdn-ava.parameters"></a><h4>Parameters</h4>
9840 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9841 <colgroup>
9842 <col width="150px" class="parameters_name">
9843 <col class="parameters_description">
9844 <col width="200px" class="parameters_annotations">
9845 </colgroup>
9846 <tbody>
9847 <tr>
9848 <td class="parameter_name"><p>dn</p></td>
9849 <td class="parameter_description"><p>a pointer to DN</p></td>
9850 <td class="parameter_annotations"> </td>
9851 </tr>
9852 <tr>
9853 <td class="parameter_name"><p>irdn</p></td>
9854 <td class="parameter_description"><p>index of RDN</p></td>
9855 <td class="parameter_annotations"> </td>
9856 </tr>
9857 <tr>
9858 <td class="parameter_name"><p>iava</p></td>
9859 <td class="parameter_description"><p>index of AVA.</p></td>
9860 <td class="parameter_annotations"> </td>
9861 </tr>
9862 <tr>
9863 <td class="parameter_name"><p>ava</p></td>
9864 <td class="parameter_description"><p>Pointer to structure which will hold output information.</p></td>
9865 <td class="parameter_annotations"> </td>
9866 </tr>
9867 </tbody>
9868 </table></div>
9869 </div>
9870 <div class="refsect3">
9871 <a name="gnutls-x509-dn-get-rdn-ava.returns"></a><h4>Returns</h4>
9872 <p> Returns 0 on success, or an error code.</p>
9873 </div>
9874 </div>
9875 <hr>
9876 <div class="refsect2">
9877 <a name="gnutls-x509-dn-get-str"></a><h3>gnutls_x509_dn_get_str ()</h3>
9878 <pre class="programlisting"><span class="returnvalue">int</span>
9879 gnutls_x509_dn_get_str (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-dn-t" title="gnutls_x509_dn_t"><span class="type">gnutls_x509_dn_t</span></a> dn</code></em>,
9880 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *str</code></em>);</pre>
9881 <p>This function will allocate buffer and copy the name in the provided DN.
9882 The name will be in the form "C=xxxx,O=yyyy,CN=zzzz" as
9883 described in RFC4514. The output string will be ASCII or UTF-8
9884 encoded, depending on the certificate data.</p>
9885 <p>When the flag <a class="link" href="gnutls-x509.html#GNUTLS-X509-DN-FLAG-COMPAT:CAPS" title="GNUTLS_X509_DN_FLAG_COMPAT"><code class="literal">GNUTLS_X509_DN_FLAG_COMPAT</code></a> is specified, the output
9886 format will match the format output by previous to 3.5.6 versions of GnuTLS
9887 which was not not fully RFC4514-compliant.</p>
9888 <div class="refsect3">
9889 <a name="gnutls-x509-dn-get-str.parameters"></a><h4>Parameters</h4>
9890 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9891 <colgroup>
9892 <col width="150px" class="parameters_name">
9893 <col class="parameters_description">
9894 <col width="200px" class="parameters_annotations">
9895 </colgroup>
9896 <tbody>
9897 <tr>
9898 <td class="parameter_name"><p>dn</p></td>
9899 <td class="parameter_description"><p>a pointer to DN</p></td>
9900 <td class="parameter_annotations"> </td>
9901 </tr>
9902 <tr>
9903 <td class="parameter_name"><p>str</p></td>
9904 <td class="parameter_description"><p>a datum that will hold the name</p></td>
9905 <td class="parameter_annotations"> </td>
9906 </tr>
9907 <tr>
9908 <td class="parameter_name"><p>flags</p></td>
9909 <td class="parameter_description"><p>zero or <a class="link" href="gnutls-x509.html#GNUTLS-X509-DN-FLAG-COMPAT:CAPS" title="GNUTLS_X509_DN_FLAG_COMPAT"><code class="literal">GNUTLS_X509_DN_FLAG_COMPAT</code></a></p></td>
9910 <td class="parameter_annotations"> </td>
9911 </tr>
9912 </tbody>
9913 </table></div>
9914 </div>
9915 <div class="refsect3">
9916 <a name="gnutls-x509-dn-get-str.returns"></a><h4>Returns</h4>
9917 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
9918 negative error value.</p>
9919 </div>
9920 <p class="since">Since: 3.5.7</p>
9921 </div>
9922 <hr>
9923 <div class="refsect2">
9924 <a name="gnutls-x509-dn-get-str2"></a><h3>gnutls_x509_dn_get_str2 ()</h3>
9925 <pre class="programlisting"><span class="returnvalue">int</span>
9926 gnutls_x509_dn_get_str2 (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-dn-t" title="gnutls_x509_dn_t"><span class="type">gnutls_x509_dn_t</span></a> dn</code></em>,
9927 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *str</code></em>,
9928 <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre>
9929 </div>
9930 <hr>
9931 <div class="refsect2">
9932 <a name="gnutls-x509-dn-set-str"></a><h3>gnutls_x509_dn_set_str ()</h3>
9933 <pre class="programlisting"><span class="returnvalue">int</span>
9934 gnutls_x509_dn_set_str (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-dn-t" title="gnutls_x509_dn_t"><span class="type">gnutls_x509_dn_t</span></a> dn</code></em>,
9935 <em class="parameter"><code>const <span class="type">char</span> *str</code></em>,
9936 <em class="parameter"><code>const <span class="type">char</span> **err</code></em>);</pre>
9937 <p>This function will set the DN on the provided DN structure.
9938 The input string should be plain ASCII or UTF-8 encoded. On
9939 DN parsing error <a class="link" href="gnutls-gnutls.html#GNUTLS-E-PARSING-ERROR:CAPS" title="GNUTLS_E_PARSING_ERROR"><code class="literal">GNUTLS_E_PARSING_ERROR</code></a> is returned.</p>
9940 <div class="refsect3">
9941 <a name="gnutls-x509-dn-set-str.parameters"></a><h4>Parameters</h4>
9942 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9943 <colgroup>
9944 <col width="150px" class="parameters_name">
9945 <col class="parameters_description">
9946 <col width="200px" class="parameters_annotations">
9947 </colgroup>
9948 <tbody>
9949 <tr>
9950 <td class="parameter_name"><p>dn</p></td>
9951 <td class="parameter_description"><p>a pointer to DN</p></td>
9952 <td class="parameter_annotations"> </td>
9953 </tr>
9954 <tr>
9955 <td class="parameter_name"><p>str</p></td>
9956 <td class="parameter_description"><p>a comma separated DN string (RFC4514)</p></td>
9957 <td class="parameter_annotations"> </td>
9958 </tr>
9959 <tr>
9960 <td class="parameter_name"><p>err</p></td>
9961 <td class="parameter_description"><p>indicates the error position (if any)</p></td>
9962 <td class="parameter_annotations"> </td>
9963 </tr>
9964 </tbody>
9965 </table></div>
9966 </div>
9967 <div class="refsect3">
9968 <a name="gnutls-x509-dn-set-str.returns"></a><h4>Returns</h4>
9969 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
9970 negative error value.</p>
9971 </div>
9972 <p class="since">Since: 3.5.3</p>
9973 </div>
9974 <hr>
9975 <div class="refsect2">
9976 <a name="gnutls-x509-dn-init"></a><h3>gnutls_x509_dn_init ()</h3>
9977 <pre class="programlisting"><span class="returnvalue">int</span>
9978 gnutls_x509_dn_init (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-dn-t" title="gnutls_x509_dn_t"><span class="type">gnutls_x509_dn_t</span></a> *dn</code></em>);</pre>
9979 <p>This function initializes a <a class="link" href="gnutls-x509.html#gnutls-x509-dn-t" title="gnutls_x509_dn_t"><span class="type">gnutls_x509_dn_t</span></a> type.</p>
9980 <p>The object returned must be deallocated using
9981 <a class="link" href="gnutls-x509.html#gnutls-x509-dn-deinit" title="gnutls_x509_dn_deinit ()"><code class="function">gnutls_x509_dn_deinit()</code></a>.</p>
9982 <div class="refsect3">
9983 <a name="gnutls-x509-dn-init.parameters"></a><h4>Parameters</h4>
9984 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9985 <colgroup>
9986 <col width="150px" class="parameters_name">
9987 <col class="parameters_description">
9988 <col width="200px" class="parameters_annotations">
9989 </colgroup>
9990 <tbody><tr>
9991 <td class="parameter_name"><p>dn</p></td>
9992 <td class="parameter_description"><p>the object to be initialized</p></td>
9993 <td class="parameter_annotations"> </td>
9994 </tr></tbody>
9995 </table></div>
9996 </div>
9997 <div class="refsect3">
9998 <a name="gnutls-x509-dn-init.returns"></a><h4>Returns</h4>
9999 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
10000 negative error value.</p>
10001 </div>
10002 <p class="since">Since: 2.4.0</p>
10003 </div>
10004 <hr>
10005 <div class="refsect2">
10006 <a name="gnutls-x509-dn-import"></a><h3>gnutls_x509_dn_import ()</h3>
10007 <pre class="programlisting"><span class="returnvalue">int</span>
10008 gnutls_x509_dn_import (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-dn-t" title="gnutls_x509_dn_t"><span class="type">gnutls_x509_dn_t</span></a> dn</code></em>,
10009 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>);</pre>
10010 <p>This function parses an RDN sequence and stores the result to a
10011 <a class="link" href="gnutls-x509.html#gnutls-x509-dn-t" title="gnutls_x509_dn_t"><span class="type">gnutls_x509_dn_t</span></a> type. The data must have been initialized
10012 with <a class="link" href="gnutls-x509.html#gnutls-x509-dn-init" title="gnutls_x509_dn_init ()"><code class="function">gnutls_x509_dn_init()</code></a>. You may use <a class="link" href="gnutls-x509.html#gnutls-x509-dn-get-rdn-ava" title="gnutls_x509_dn_get_rdn_ava ()"><code class="function">gnutls_x509_dn_get_rdn_ava()</code></a> to
10013 decode the DN.</p>
10014 <div class="refsect3">
10015 <a name="gnutls-x509-dn-import.parameters"></a><h4>Parameters</h4>
10016 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10017 <colgroup>
10018 <col width="150px" class="parameters_name">
10019 <col class="parameters_description">
10020 <col width="200px" class="parameters_annotations">
10021 </colgroup>
10022 <tbody>
10023 <tr>
10024 <td class="parameter_name"><p>dn</p></td>
10025 <td class="parameter_description"><p>the structure that will hold the imported DN</p></td>
10026 <td class="parameter_annotations"> </td>
10027 </tr>
10028 <tr>
10029 <td class="parameter_name"><p>data</p></td>
10030 <td class="parameter_description"><p>should contain a DER encoded RDN sequence</p></td>
10031 <td class="parameter_annotations"> </td>
10032 </tr>
10033 </tbody>
10034 </table></div>
10035 </div>
10036 <div class="refsect3">
10037 <a name="gnutls-x509-dn-import.returns"></a><h4>Returns</h4>
10038 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
10039 negative error value.</p>
10040 </div>
10041 <p class="since">Since: 2.4.0</p>
10042 </div>
10043 <hr>
10044 <div class="refsect2">
10045 <a name="gnutls-x509-dn-export"></a><h3>gnutls_x509_dn_export ()</h3>
10046 <pre class="programlisting"><span class="returnvalue">int</span>
10047 gnutls_x509_dn_export (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-dn-t" title="gnutls_x509_dn_t"><span class="type">gnutls_x509_dn_t</span></a> dn</code></em>,
10048 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
10049 <em class="parameter"><code><span class="type">void</span> *output_data</code></em>,
10050 <em class="parameter"><code><span class="type">size_t</span> *output_data_size</code></em>);</pre>
10051 <p>This function will export the DN to DER or PEM format.</p>
10052 <p>If the buffer provided is not long enough to hold the output, then
10053 *<em class="parameter"><code>output_data_size</code></em>
10054 is updated and <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a>
10055 will be returned.</p>
10056 <p>If the structure is PEM encoded, it will have a header
10057 of "BEGIN NAME".</p>
10058 <div class="refsect3">
10059 <a name="gnutls-x509-dn-export.parameters"></a><h4>Parameters</h4>
10060 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10061 <colgroup>
10062 <col width="150px" class="parameters_name">
10063 <col class="parameters_description">
10064 <col width="200px" class="parameters_annotations">
10065 </colgroup>
10066 <tbody>
10067 <tr>
10068 <td class="parameter_name"><p>dn</p></td>
10069 <td class="parameter_description"><p>Holds the uint8_t DN object</p></td>
10070 <td class="parameter_annotations"> </td>
10071 </tr>
10072 <tr>
10073 <td class="parameter_name"><p>format</p></td>
10074 <td class="parameter_description"><p>the format of output params. One of PEM or DER.</p></td>
10075 <td class="parameter_annotations"> </td>
10076 </tr>
10077 <tr>
10078 <td class="parameter_name"><p>output_data</p></td>
10079 <td class="parameter_description"><p>will contain a DN PEM or DER encoded</p></td>
10080 <td class="parameter_annotations"> </td>
10081 </tr>
10082 <tr>
10083 <td class="parameter_name"><p>output_data_size</p></td>
10084 <td class="parameter_description"><p>holds the size of output_data (and will be
10085 replaced by the actual size of parameters)</p></td>
10086 <td class="parameter_annotations"> </td>
10087 </tr>
10088 </tbody>
10089 </table></div>
10090 </div>
10091 <div class="refsect3">
10092 <a name="gnutls-x509-dn-export.returns"></a><h4>Returns</h4>
10093 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
10094 negative error value.</p>
10095 </div>
10096 </div>
10097 <hr>
10098 <div class="refsect2">
10099 <a name="gnutls-x509-dn-export2"></a><h3>gnutls_x509_dn_export2 ()</h3>
10100 <pre class="programlisting"><span class="returnvalue">int</span>
10101 gnutls_x509_dn_export2 (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-dn-t" title="gnutls_x509_dn_t"><span class="type">gnutls_x509_dn_t</span></a> dn</code></em>,
10102 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
10103 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>);</pre>
10104 <p>This function will export the DN to DER or PEM format.</p>
10105 <p>The output buffer is allocated using <code class="function">gnutls_malloc()</code>.</p>
10106 <p>If the structure is PEM encoded, it will have a header
10107 of "BEGIN NAME".</p>
10108 <div class="refsect3">
10109 <a name="gnutls-x509-dn-export2.parameters"></a><h4>Parameters</h4>
10110 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10111 <colgroup>
10112 <col width="150px" class="parameters_name">
10113 <col class="parameters_description">
10114 <col width="200px" class="parameters_annotations">
10115 </colgroup>
10116 <tbody>
10117 <tr>
10118 <td class="parameter_name"><p>dn</p></td>
10119 <td class="parameter_description"><p>Holds the uint8_t DN object</p></td>
10120 <td class="parameter_annotations"> </td>
10121 </tr>
10122 <tr>
10123 <td class="parameter_name"><p>format</p></td>
10124 <td class="parameter_description"><p>the format of output params. One of PEM or DER.</p></td>
10125 <td class="parameter_annotations"> </td>
10126 </tr>
10127 <tr>
10128 <td class="parameter_name"><p>out</p></td>
10129 <td class="parameter_description"><p>will contain a DN PEM or DER encoded</p></td>
10130 <td class="parameter_annotations"> </td>
10131 </tr>
10132 </tbody>
10133 </table></div>
10134 </div>
10135 <div class="refsect3">
10136 <a name="gnutls-x509-dn-export2.returns"></a><h4>Returns</h4>
10137 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
10138 negative error value.</p>
10139 </div>
10140 <p class="since">Since: 3.1.3</p>
10141 </div>
10142 <hr>
10143 <div class="refsect2">
10144 <a name="gnutls-x509-dn-deinit"></a><h3>gnutls_x509_dn_deinit ()</h3>
10145 <pre class="programlisting"><span class="returnvalue">void</span>
10146 gnutls_x509_dn_deinit (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-dn-t" title="gnutls_x509_dn_t"><span class="type">gnutls_x509_dn_t</span></a> dn</code></em>);</pre>
10147 <p>This function deallocates the DN object as returned by
10148 <a class="link" href="gnutls-x509.html#gnutls-x509-dn-import" title="gnutls_x509_dn_import ()"><code class="function">gnutls_x509_dn_import()</code></a>.</p>
10149 <div class="refsect3">
10150 <a name="gnutls-x509-dn-deinit.parameters"></a><h4>Parameters</h4>
10151 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10152 <colgroup>
10153 <col width="150px" class="parameters_name">
10154 <col class="parameters_description">
10155 <col width="200px" class="parameters_annotations">
10156 </colgroup>
10157 <tbody><tr>
10158 <td class="parameter_name"><p>dn</p></td>
10159 <td class="parameter_description"><p>a DN uint8_t object pointer.</p></td>
10160 <td class="parameter_annotations"> </td>
10161 </tr></tbody>
10162 </table></div>
10163 </div>
10164 <p class="since">Since: 2.4.0</p>
10165 </div>
10166 <hr>
10167 <div class="refsect2">
10168 <a name="gnutls-x509-crl-init"></a><h3>gnutls_x509_crl_init ()</h3>
10169 <pre class="programlisting"><span class="returnvalue">int</span>
10170 gnutls_x509_crl_init (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> *crl</code></em>);</pre>
10171 <p>This function will initialize a CRL structure. CRL stands for
10172 Certificate Revocation List. A revocation list usually contains
10173 lists of certificate serial numbers that have been revoked by an
10174 Authority. The revocation lists are always signed with the
10175 authority's private key.</p>
10176 <div class="refsect3">
10177 <a name="gnutls-x509-crl-init.parameters"></a><h4>Parameters</h4>
10178 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10179 <colgroup>
10180 <col width="150px" class="parameters_name">
10181 <col class="parameters_description">
10182 <col width="200px" class="parameters_annotations">
10183 </colgroup>
10184 <tbody><tr>
10185 <td class="parameter_name"><p>crl</p></td>
10186 <td class="parameter_description"><p>A pointer to the type to be initialized</p></td>
10187 <td class="parameter_annotations"> </td>
10188 </tr></tbody>
10189 </table></div>
10190 </div>
10191 <div class="refsect3">
10192 <a name="gnutls-x509-crl-init.returns"></a><h4>Returns</h4>
10193 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
10194 negative error value.</p>
10195 </div>
10196 </div>
10197 <hr>
10198 <div class="refsect2">
10199 <a name="gnutls-x509-crl-deinit"></a><h3>gnutls_x509_crl_deinit ()</h3>
10200 <pre class="programlisting"><span class="returnvalue">void</span>
10201 gnutls_x509_crl_deinit (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>);</pre>
10202 <p>This function will deinitialize a CRL structure.</p>
10203 <div class="refsect3">
10204 <a name="gnutls-x509-crl-deinit.parameters"></a><h4>Parameters</h4>
10205 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10206 <colgroup>
10207 <col width="150px" class="parameters_name">
10208 <col class="parameters_description">
10209 <col width="200px" class="parameters_annotations">
10210 </colgroup>
10211 <tbody><tr>
10212 <td class="parameter_name"><p>crl</p></td>
10213 <td class="parameter_description"><p>The data to be deinitialized</p></td>
10214 <td class="parameter_annotations"> </td>
10215 </tr></tbody>
10216 </table></div>
10217 </div>
10218 </div>
10219 <hr>
10220 <div class="refsect2">
10221 <a name="gnutls-x509-crl-import"></a><h3>gnutls_x509_crl_import ()</h3>
10222 <pre class="programlisting"><span class="returnvalue">int</span>
10223 gnutls_x509_crl_import (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
10224 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>,
10225 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>);</pre>
10226 <p>This function will convert the given DER or PEM encoded CRL
10227 to the native <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> format. The output will be stored in 'crl'.</p>
10228 <p>If the CRL is PEM encoded it should have a header of "X509 CRL".</p>
10229 <div class="refsect3">
10230 <a name="gnutls-x509-crl-import.parameters"></a><h4>Parameters</h4>
10231 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10232 <colgroup>
10233 <col width="150px" class="parameters_name">
10234 <col class="parameters_description">
10235 <col width="200px" class="parameters_annotations">
10236 </colgroup>
10237 <tbody>
10238 <tr>
10239 <td class="parameter_name"><p>crl</p></td>
10240 <td class="parameter_description"><p>The data to store the parsed CRL.</p></td>
10241 <td class="parameter_annotations"> </td>
10242 </tr>
10243 <tr>
10244 <td class="parameter_name"><p>data</p></td>
10245 <td class="parameter_description"><p>The DER or PEM encoded CRL.</p></td>
10246 <td class="parameter_annotations"> </td>
10247 </tr>
10248 <tr>
10249 <td class="parameter_name"><p>format</p></td>
10250 <td class="parameter_description"><p>One of DER or PEM</p></td>
10251 <td class="parameter_annotations"> </td>
10252 </tr>
10253 </tbody>
10254 </table></div>
10255 </div>
10256 <div class="refsect3">
10257 <a name="gnutls-x509-crl-import.returns"></a><h4>Returns</h4>
10258 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
10259 negative error value.</p>
10260 </div>
10261 </div>
10262 <hr>
10263 <div class="refsect2">
10264 <a name="gnutls-x509-crl-export"></a><h3>gnutls_x509_crl_export ()</h3>
10265 <pre class="programlisting"><span class="returnvalue">int</span>
10266 gnutls_x509_crl_export (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
10267 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
10268 <em class="parameter"><code><span class="type">void</span> *output_data</code></em>,
10269 <em class="parameter"><code><span class="type">size_t</span> *output_data_size</code></em>);</pre>
10270 <p>This function will export the revocation list to DER or PEM format.</p>
10271 <p>If the buffer provided is not long enough to hold the output, then
10272 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> will be returned.</p>
10273 <p>If the structure is PEM encoded, it will have a header
10274 of "BEGIN X509 CRL".</p>
10275 <div class="refsect3">
10276 <a name="gnutls-x509-crl-export.parameters"></a><h4>Parameters</h4>
10277 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10278 <colgroup>
10279 <col width="150px" class="parameters_name">
10280 <col class="parameters_description">
10281 <col width="200px" class="parameters_annotations">
10282 </colgroup>
10283 <tbody>
10284 <tr>
10285 <td class="parameter_name"><p>crl</p></td>
10286 <td class="parameter_description"><p>Holds the revocation list</p></td>
10287 <td class="parameter_annotations"> </td>
10288 </tr>
10289 <tr>
10290 <td class="parameter_name"><p>format</p></td>
10291 <td class="parameter_description"><p>the format of output params. One of PEM or DER.</p></td>
10292 <td class="parameter_annotations"> </td>
10293 </tr>
10294 <tr>
10295 <td class="parameter_name"><p>output_data</p></td>
10296 <td class="parameter_description"><p>will contain a private key PEM or DER encoded</p></td>
10297 <td class="parameter_annotations"> </td>
10298 </tr>
10299 <tr>
10300 <td class="parameter_name"><p>output_data_size</p></td>
10301 <td class="parameter_description"><p>holds the size of output_data (and will
10302 be replaced by the actual size of parameters)</p></td>
10303 <td class="parameter_annotations"> </td>
10304 </tr>
10305 </tbody>
10306 </table></div>
10307 </div>
10308 <div class="refsect3">
10309 <a name="gnutls-x509-crl-export.returns"></a><h4>Returns</h4>
10310 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
10311 negative error value.</p>
10312 </div>
10313 </div>
10314 <hr>
10315 <div class="refsect2">
10316 <a name="gnutls-x509-crl-export2"></a><h3>gnutls_x509_crl_export2 ()</h3>
10317 <pre class="programlisting"><span class="returnvalue">int</span>
10318 gnutls_x509_crl_export2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
10319 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
10320 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>);</pre>
10321 <p>This function will export the revocation list to DER or PEM format.</p>
10322 <p>The output buffer is allocated using <code class="function">gnutls_malloc()</code>.</p>
10323 <p>If the structure is PEM encoded, it will have a header
10324 of "BEGIN X509 CRL".</p>
10325 <div class="refsect3">
10326 <a name="gnutls-x509-crl-export2.parameters"></a><h4>Parameters</h4>
10327 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10328 <colgroup>
10329 <col width="150px" class="parameters_name">
10330 <col class="parameters_description">
10331 <col width="200px" class="parameters_annotations">
10332 </colgroup>
10333 <tbody>
10334 <tr>
10335 <td class="parameter_name"><p>crl</p></td>
10336 <td class="parameter_description"><p>Holds the revocation list</p></td>
10337 <td class="parameter_annotations"> </td>
10338 </tr>
10339 <tr>
10340 <td class="parameter_name"><p>format</p></td>
10341 <td class="parameter_description"><p>the format of output params. One of PEM or DER.</p></td>
10342 <td class="parameter_annotations"> </td>
10343 </tr>
10344 <tr>
10345 <td class="parameter_name"><p>out</p></td>
10346 <td class="parameter_description"><p>will contain a private key PEM or DER encoded</p></td>
10347 <td class="parameter_annotations"> </td>
10348 </tr>
10349 </tbody>
10350 </table></div>
10351 </div>
10352 <div class="refsect3">
10353 <a name="gnutls-x509-crl-export2.returns"></a><h4>Returns</h4>
10354 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
10355 negative error value.</p>
10356 <p>Since 3.1.3</p>
10357 </div>
10358 </div>
10359 <hr>
10360 <div class="refsect2">
10361 <a name="gnutls-x509-crl-get-raw-issuer-dn"></a><h3>gnutls_x509_crl_get_raw_issuer_dn ()</h3>
10362 <pre class="programlisting"><span class="returnvalue">int</span>
10363 gnutls_x509_crl_get_raw_issuer_dn (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
10364 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *dn</code></em>);</pre>
10365 <p>This function will return a pointer to the DER encoded DN structure
10366 and the length.</p>
10367 <div class="refsect3">
10368 <a name="gnutls-x509-crl-get-raw-issuer-dn.parameters"></a><h4>Parameters</h4>
10369 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10370 <colgroup>
10371 <col width="150px" class="parameters_name">
10372 <col class="parameters_description">
10373 <col width="200px" class="parameters_annotations">
10374 </colgroup>
10375 <tbody>
10376 <tr>
10377 <td class="parameter_name"><p>crl</p></td>
10378 <td class="parameter_description"><p>should contain a gnutls_x509_crl_t type</p></td>
10379 <td class="parameter_annotations"> </td>
10380 </tr>
10381 <tr>
10382 <td class="parameter_name"><p>dn</p></td>
10383 <td class="parameter_description"><p>will hold the starting point of the DN</p></td>
10384 <td class="parameter_annotations"> </td>
10385 </tr>
10386 </tbody>
10387 </table></div>
10388 </div>
10389 <div class="refsect3">
10390 <a name="gnutls-x509-crl-get-raw-issuer-dn.returns"></a><h4>Returns</h4>
10391 <p> a negative error code on error, and (0) on success.</p>
10392 </div>
10393 <p class="since">Since: 2.12.0</p>
10394 </div>
10395 <hr>
10396 <div class="refsect2">
10397 <a name="gnutls-x509-crl-get-issuer-dn"></a><h3>gnutls_x509_crl_get_issuer_dn ()</h3>
10398 <pre class="programlisting"><span class="returnvalue">int</span>
10399 gnutls_x509_crl_get_issuer_dn (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
10400 <em class="parameter"><code><span class="type">char</span> *buf</code></em>,
10401 <em class="parameter"><code><span class="type">size_t</span> *sizeof_buf</code></em>);</pre>
10402 <p>This function will copy the name of the CRL issuer in the provided
10403 buffer. The name will be in the form "C=xxxx,O=yyyy,CN=zzzz" as
10404 described in RFC4514. The output string will be ASCII or UTF-8
10405 encoded, depending on the certificate data.</p>
10406 <p>If buf is <code class="literal">NULL</code> then only the size will be filled.</p>
10407 <p>This function does not output a fully RFC4514 compliant string, if
10408 that is required see <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-issuer-dn3" title="gnutls_x509_crl_get_issuer_dn3 ()"><code class="function">gnutls_x509_crl_get_issuer_dn3()</code></a>.</p>
10409 <div class="refsect3">
10410 <a name="gnutls-x509-crl-get-issuer-dn.parameters"></a><h4>Parameters</h4>
10411 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10412 <colgroup>
10413 <col width="150px" class="parameters_name">
10414 <col class="parameters_description">
10415 <col width="200px" class="parameters_annotations">
10416 </colgroup>
10417 <tbody>
10418 <tr>
10419 <td class="parameter_name"><p>crl</p></td>
10420 <td class="parameter_description"><p>should contain a gnutls_x509_crl_t type</p></td>
10421 <td class="parameter_annotations"> </td>
10422 </tr>
10423 <tr>
10424 <td class="parameter_name"><p>buf</p></td>
10425 <td class="parameter_description"><p>a pointer to a structure to hold the peer's name (may be null)</p></td>
10426 <td class="parameter_annotations"> </td>
10427 </tr>
10428 <tr>
10429 <td class="parameter_name"><p>sizeof_buf</p></td>
10430 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>buf</code></em>
10431 </p></td>
10432 <td class="parameter_annotations"> </td>
10433 </tr>
10434 </tbody>
10435 </table></div>
10436 </div>
10437 <div class="refsect3">
10438 <a name="gnutls-x509-crl-get-issuer-dn.returns"></a><h4>Returns</h4>
10439 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the provided buffer is
10440 not long enough, and in that case the sizeof_buf will be updated
10441 with the required size, and 0 on success.</p>
10442 </div>
10443 </div>
10444 <hr>
10445 <div class="refsect2">
10446 <a name="gnutls-x509-crl-get-issuer-dn2"></a><h3>gnutls_x509_crl_get_issuer_dn2 ()</h3>
10447 <pre class="programlisting"><span class="returnvalue">int</span>
10448 gnutls_x509_crl_get_issuer_dn2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
10449 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *dn</code></em>);</pre>
10450 <p>This function will allocate buffer and copy the name of the CRL issuer.
10451 The name will be in the form "C=xxxx,O=yyyy,CN=zzzz" as
10452 described in RFC4514. The output string will be ASCII or UTF-8
10453 encoded, depending on the certificate data.</p>
10454 <p>This function does not output a fully RFC4514 compliant string, if
10455 that is required see <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-issuer-dn3" title="gnutls_x509_crl_get_issuer_dn3 ()"><code class="function">gnutls_x509_crl_get_issuer_dn3()</code></a>.</p>
10456 <div class="refsect3">
10457 <a name="gnutls-x509-crl-get-issuer-dn2.parameters"></a><h4>Parameters</h4>
10458 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10459 <colgroup>
10460 <col width="150px" class="parameters_name">
10461 <col class="parameters_description">
10462 <col width="200px" class="parameters_annotations">
10463 </colgroup>
10464 <tbody>
10465 <tr>
10466 <td class="parameter_name"><p>crl</p></td>
10467 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
10468 <td class="parameter_annotations"> </td>
10469 </tr>
10470 <tr>
10471 <td class="parameter_name"><p>dn</p></td>
10472 <td class="parameter_description"><p>a pointer to a structure to hold the name; must be freed using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a></p></td>
10473 <td class="parameter_annotations"> </td>
10474 </tr>
10475 </tbody>
10476 </table></div>
10477 </div>
10478 <div class="refsect3">
10479 <a name="gnutls-x509-crl-get-issuer-dn2.returns"></a><h4>Returns</h4>
10480 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
10481 negative error value.</p>
10482 </div>
10483 <p class="since">Since: 3.1.10</p>
10484 </div>
10485 <hr>
10486 <div class="refsect2">
10487 <a name="gnutls-x509-crl-get-issuer-dn3"></a><h3>gnutls_x509_crl_get_issuer_dn3 ()</h3>
10488 <pre class="programlisting"><span class="returnvalue">int</span>
10489 gnutls_x509_crl_get_issuer_dn3 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
10490 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *dn</code></em>,
10491 <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre>
10492 <p>This function will allocate buffer and copy the name of the CRL issuer.
10493 The name will be in the form "C=xxxx,O=yyyy,CN=zzzz" as
10494 described in RFC4514. The output string will be ASCII or UTF-8
10495 encoded, depending on the certificate data.</p>
10496 <p>When the flag <a class="link" href="gnutls-x509.html#GNUTLS-X509-DN-FLAG-COMPAT:CAPS" title="GNUTLS_X509_DN_FLAG_COMPAT"><code class="literal">GNUTLS_X509_DN_FLAG_COMPAT</code></a> is specified, the output
10497 format will match the format output by previous to 3.5.6 versions of GnuTLS
10498 which was not not fully RFC4514-compliant.</p>
10499 <div class="refsect3">
10500 <a name="gnutls-x509-crl-get-issuer-dn3.parameters"></a><h4>Parameters</h4>
10501 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10502 <colgroup>
10503 <col width="150px" class="parameters_name">
10504 <col class="parameters_description">
10505 <col width="200px" class="parameters_annotations">
10506 </colgroup>
10507 <tbody>
10508 <tr>
10509 <td class="parameter_name"><p>crl</p></td>
10510 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
10511 <td class="parameter_annotations"> </td>
10512 </tr>
10513 <tr>
10514 <td class="parameter_name"><p>dn</p></td>
10515 <td class="parameter_description"><p>a pointer to a structure to hold the name; must be freed using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a></p></td>
10516 <td class="parameter_annotations"> </td>
10517 </tr>
10518 <tr>
10519 <td class="parameter_name"><p>flags</p></td>
10520 <td class="parameter_description"><p>zero or <a class="link" href="gnutls-x509.html#GNUTLS-X509-DN-FLAG-COMPAT:CAPS" title="GNUTLS_X509_DN_FLAG_COMPAT"><code class="literal">GNUTLS_X509_DN_FLAG_COMPAT</code></a></p></td>
10521 <td class="parameter_annotations"> </td>
10522 </tr>
10523 </tbody>
10524 </table></div>
10525 </div>
10526 <div class="refsect3">
10527 <a name="gnutls-x509-crl-get-issuer-dn3.returns"></a><h4>Returns</h4>
10528 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
10529 negative error value.</p>
10530 </div>
10531 <p class="since">Since: 3.5.7</p>
10532 </div>
10533 <hr>
10534 <div class="refsect2">
10535 <a name="gnutls-x509-crl-get-issuer-dn-by-oid"></a><h3>gnutls_x509_crl_get_issuer_dn_by_oid ()</h3>
10536 <pre class="programlisting"><span class="returnvalue">int</span>
10537 gnutls_x509_crl_get_issuer_dn_by_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
10538 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
10539 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
10540 <em class="parameter"><code>unsigned <span class="type">int</span> raw_flag</code></em>,
10541 <em class="parameter"><code><span class="type">void</span> *buf</code></em>,
10542 <em class="parameter"><code><span class="type">size_t</span> *sizeof_buf</code></em>);</pre>
10543 <p>This function will extract the part of the name of the CRL issuer
10544 specified by the given OID. The output will be encoded as described
10545 in RFC4514. The output string will be ASCII or UTF-8 encoded,
10546 depending on the certificate data.</p>
10547 <p>Some helper macros with popular OIDs can be found in gnutls/x509.h
10548 If raw flag is (0), this function will only return known OIDs as
10549 text. Other OIDs will be DER encoded, as described in RFC4514 -- in
10550 hex format with a '#' prefix. You can check about known OIDs
10551 using <a class="link" href="gnutls-x509.html#gnutls-x509-dn-oid-known" title="gnutls_x509_dn_oid_known ()"><code class="function">gnutls_x509_dn_oid_known()</code></a>.</p>
10552 <p>If buf is null then only the size will be filled.</p>
10553 <div class="refsect3">
10554 <a name="gnutls-x509-crl-get-issuer-dn-by-oid.parameters"></a><h4>Parameters</h4>
10555 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10556 <colgroup>
10557 <col width="150px" class="parameters_name">
10558 <col class="parameters_description">
10559 <col width="200px" class="parameters_annotations">
10560 </colgroup>
10561 <tbody>
10562 <tr>
10563 <td class="parameter_name"><p>crl</p></td>
10564 <td class="parameter_description"><p>should contain a gnutls_x509_crl_t type</p></td>
10565 <td class="parameter_annotations"> </td>
10566 </tr>
10567 <tr>
10568 <td class="parameter_name"><p>oid</p></td>
10569 <td class="parameter_description"><p>holds an Object Identified in null terminated string</p></td>
10570 <td class="parameter_annotations"> </td>
10571 </tr>
10572 <tr>
10573 <td class="parameter_name"><p>indx</p></td>
10574 <td class="parameter_description"><p>In case multiple same OIDs exist in the RDN, this specifies which to send. Use (0) to get the first one.</p></td>
10575 <td class="parameter_annotations"> </td>
10576 </tr>
10577 <tr>
10578 <td class="parameter_name"><p>raw_flag</p></td>
10579 <td class="parameter_description"><p>If non-zero returns the raw DER data of the DN part.</p></td>
10580 <td class="parameter_annotations"> </td>
10581 </tr>
10582 <tr>
10583 <td class="parameter_name"><p>buf</p></td>
10584 <td class="parameter_description"><p>a pointer to a structure to hold the peer's name (may be null)</p></td>
10585 <td class="parameter_annotations"> </td>
10586 </tr>
10587 <tr>
10588 <td class="parameter_name"><p>sizeof_buf</p></td>
10589 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>buf</code></em>
10590 </p></td>
10591 <td class="parameter_annotations"> </td>
10592 </tr>
10593 </tbody>
10594 </table></div>
10595 </div>
10596 <div class="refsect3">
10597 <a name="gnutls-x509-crl-get-issuer-dn-by-oid.returns"></a><h4>Returns</h4>
10598 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the provided buffer is
10599 not long enough, and in that case the sizeof_buf will be updated
10600 with the required size, and 0 on success.</p>
10601 </div>
10602 </div>
10603 <hr>
10604 <div class="refsect2">
10605 <a name="gnutls-x509-crl-get-dn-oid"></a><h3>gnutls_x509_crl_get_dn_oid ()</h3>
10606 <pre class="programlisting"><span class="returnvalue">int</span>
10607 gnutls_x509_crl_get_dn_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
10608 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
10609 <em class="parameter"><code><span class="type">void</span> *oid</code></em>,
10610 <em class="parameter"><code><span class="type">size_t</span> *sizeof_oid</code></em>);</pre>
10611 <p>This function will extract the requested OID of the name of the CRL
10612 issuer, specified by the given index.</p>
10613 <p>If oid is null then only the size will be filled.</p>
10614 <div class="refsect3">
10615 <a name="gnutls-x509-crl-get-dn-oid.parameters"></a><h4>Parameters</h4>
10616 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10617 <colgroup>
10618 <col width="150px" class="parameters_name">
10619 <col class="parameters_description">
10620 <col width="200px" class="parameters_annotations">
10621 </colgroup>
10622 <tbody>
10623 <tr>
10624 <td class="parameter_name"><p>crl</p></td>
10625 <td class="parameter_description"><p>should contain a gnutls_x509_crl_t type</p></td>
10626 <td class="parameter_annotations"> </td>
10627 </tr>
10628 <tr>
10629 <td class="parameter_name"><p>indx</p></td>
10630 <td class="parameter_description"><p>Specifies which DN OID to send. Use (0) to get the first one.</p></td>
10631 <td class="parameter_annotations"> </td>
10632 </tr>
10633 <tr>
10634 <td class="parameter_name"><p>oid</p></td>
10635 <td class="parameter_description"><p>a pointer to store the OID (may be null)</p></td>
10636 <td class="parameter_annotations"> </td>
10637 </tr>
10638 <tr>
10639 <td class="parameter_name"><p>sizeof_oid</p></td>
10640 <td class="parameter_description"><p>initially holds the size of 'oid'</p></td>
10641 <td class="parameter_annotations"> </td>
10642 </tr>
10643 </tbody>
10644 </table></div>
10645 </div>
10646 <div class="refsect3">
10647 <a name="gnutls-x509-crl-get-dn-oid.returns"></a><h4>Returns</h4>
10648 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the provided buffer is
10649 not long enough, and in that case the sizeof_oid will be updated
10650 with the required size. On success 0 is returned.</p>
10651 </div>
10652 </div>
10653 <hr>
10654 <div class="refsect2">
10655 <a name="gnutls-x509-crl-get-signature-algorithm"></a><h3>gnutls_x509_crl_get_signature_algorithm ()</h3>
10656 <pre class="programlisting"><span class="returnvalue">int</span>
10657 gnutls_x509_crl_get_signature_algorithm
10658 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>);</pre>
10659 <p>This function will return a value of the <a class="link" href="gnutls-gnutls.html#gnutls-sign-algorithm-t" title="enum gnutls_sign_algorithm_t"><span class="type">gnutls_sign_algorithm_t</span></a>
10660 enumeration that is the signature algorithm.</p>
10661 <p>Since 3.6.0 this function never returns a negative error code.
10662 Error cases and unknown/unsupported signature algorithms are
10663 mapped to <a class="link" href="gnutls-gnutls.html#GNUTLS-SIGN-UNKNOWN:CAPS"><code class="literal">GNUTLS_SIGN_UNKNOWN</code></a>.</p>
10664 <div class="refsect3">
10665 <a name="gnutls-x509-crl-get-signature-algorithm.parameters"></a><h4>Parameters</h4>
10666 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10667 <colgroup>
10668 <col width="150px" class="parameters_name">
10669 <col class="parameters_description">
10670 <col width="200px" class="parameters_annotations">
10671 </colgroup>
10672 <tbody><tr>
10673 <td class="parameter_name"><p>crl</p></td>
10674 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
10675 <td class="parameter_annotations"> </td>
10676 </tr></tbody>
10677 </table></div>
10678 </div>
10679 <div class="refsect3">
10680 <a name="gnutls-x509-crl-get-signature-algorithm.returns"></a><h4>Returns</h4>
10681 <p> a <a class="link" href="gnutls-gnutls.html#gnutls-sign-algorithm-t" title="enum gnutls_sign_algorithm_t"><span class="type">gnutls_sign_algorithm_t</span></a> value</p>
10682 </div>
10683 </div>
10684 <hr>
10685 <div class="refsect2">
10686 <a name="gnutls-x509-crl-get-signature"></a><h3>gnutls_x509_crl_get_signature ()</h3>
10687 <pre class="programlisting"><span class="returnvalue">int</span>
10688 gnutls_x509_crl_get_signature (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
10689 <em class="parameter"><code><span class="type">char</span> *sig</code></em>,
10690 <em class="parameter"><code><span class="type">size_t</span> *sizeof_sig</code></em>);</pre>
10691 <p>This function will extract the signature field of a CRL.</p>
10692 <div class="refsect3">
10693 <a name="gnutls-x509-crl-get-signature.parameters"></a><h4>Parameters</h4>
10694 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10695 <colgroup>
10696 <col width="150px" class="parameters_name">
10697 <col class="parameters_description">
10698 <col width="200px" class="parameters_annotations">
10699 </colgroup>
10700 <tbody>
10701 <tr>
10702 <td class="parameter_name"><p>crl</p></td>
10703 <td class="parameter_description"><p>should contain a gnutls_x509_crl_t type</p></td>
10704 <td class="parameter_annotations"> </td>
10705 </tr>
10706 <tr>
10707 <td class="parameter_name"><p>sig</p></td>
10708 <td class="parameter_description"><p>a pointer where the signature part will be copied (may be null).</p></td>
10709 <td class="parameter_annotations"> </td>
10710 </tr>
10711 <tr>
10712 <td class="parameter_name"><p>sizeof_sig</p></td>
10713 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>sig</code></em>
10714 </p></td>
10715 <td class="parameter_annotations"> </td>
10716 </tr>
10717 </tbody>
10718 </table></div>
10719 </div>
10720 <div class="refsect3">
10721 <a name="gnutls-x509-crl-get-signature.returns"></a><h4>Returns</h4>
10722 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
10723 negative error value. </p>
10724 </div>
10725 </div>
10726 <hr>
10727 <div class="refsect2">
10728 <a name="gnutls-x509-crl-get-version"></a><h3>gnutls_x509_crl_get_version ()</h3>
10729 <pre class="programlisting"><span class="returnvalue">int</span>
10730 gnutls_x509_crl_get_version (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>);</pre>
10731 <p>This function will return the version of the specified CRL.</p>
10732 <div class="refsect3">
10733 <a name="gnutls-x509-crl-get-version.parameters"></a><h4>Parameters</h4>
10734 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10735 <colgroup>
10736 <col width="150px" class="parameters_name">
10737 <col class="parameters_description">
10738 <col width="200px" class="parameters_annotations">
10739 </colgroup>
10740 <tbody><tr>
10741 <td class="parameter_name"><p>crl</p></td>
10742 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
10743 <td class="parameter_annotations"> </td>
10744 </tr></tbody>
10745 </table></div>
10746 </div>
10747 <div class="refsect3">
10748 <a name="gnutls-x509-crl-get-version.returns"></a><h4>Returns</h4>
10749 <p> The version number, or a negative error code on error.</p>
10750 </div>
10751 </div>
10752 <hr>
10753 <div class="refsect2">
10754 <a name="gnutls-x509-crl-get-signature-oid"></a><h3>gnutls_x509_crl_get_signature_oid ()</h3>
10755 <pre class="programlisting"><span class="returnvalue">int</span>
10756 gnutls_x509_crl_get_signature_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
10757 <em class="parameter"><code><span class="type">char</span> *oid</code></em>,
10758 <em class="parameter"><code><span class="type">size_t</span> *oid_size</code></em>);</pre>
10759 <p>This function will return the OID of the signature algorithm
10760 that has been used to sign this CRL. This is function
10761 is useful in the case <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-signature-algorithm" title="gnutls_x509_crl_get_signature_algorithm ()"><code class="function">gnutls_x509_crl_get_signature_algorithm()</code></a>
10762 returned <a class="link" href="gnutls-gnutls.html#GNUTLS-SIGN-UNKNOWN:CAPS"><code class="literal">GNUTLS_SIGN_UNKNOWN</code></a>.</p>
10763 <div class="refsect3">
10764 <a name="gnutls-x509-crl-get-signature-oid.parameters"></a><h4>Parameters</h4>
10765 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10766 <colgroup>
10767 <col width="150px" class="parameters_name">
10768 <col class="parameters_description">
10769 <col width="200px" class="parameters_annotations">
10770 </colgroup>
10771 <tbody>
10772 <tr>
10773 <td class="parameter_name"><p>crl</p></td>
10774 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
10775 <td class="parameter_annotations"> </td>
10776 </tr>
10777 <tr>
10778 <td class="parameter_name"><p>oid</p></td>
10779 <td class="parameter_description"><p>a pointer to a buffer to hold the OID (may be null)</p></td>
10780 <td class="parameter_annotations"> </td>
10781 </tr>
10782 <tr>
10783 <td class="parameter_name"><p>oid_size</p></td>
10784 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>oid</code></em>
10785 </p></td>
10786 <td class="parameter_annotations"> </td>
10787 </tr>
10788 </tbody>
10789 </table></div>
10790 </div>
10791 <div class="refsect3">
10792 <a name="gnutls-x509-crl-get-signature-oid.returns"></a><h4>Returns</h4>
10793 <p> zero or a negative error code on error.</p>
10794 </div>
10795 <p class="since">Since: 3.5.0</p>
10796 </div>
10797 <hr>
10798 <div class="refsect2">
10799 <a name="gnutls-x509-crl-get-this-update"></a><h3>gnutls_x509_crl_get_this_update ()</h3>
10800 <pre class="programlisting"><span class="returnvalue">time_t</span>
10801 gnutls_x509_crl_get_this_update (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>);</pre>
10802 <p>This function will return the time this CRL was issued.</p>
10803 <div class="refsect3">
10804 <a name="gnutls-x509-crl-get-this-update.parameters"></a><h4>Parameters</h4>
10805 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10806 <colgroup>
10807 <col width="150px" class="parameters_name">
10808 <col class="parameters_description">
10809 <col width="200px" class="parameters_annotations">
10810 </colgroup>
10811 <tbody><tr>
10812 <td class="parameter_name"><p>crl</p></td>
10813 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
10814 <td class="parameter_annotations"> </td>
10815 </tr></tbody>
10816 </table></div>
10817 </div>
10818 <div class="refsect3">
10819 <a name="gnutls-x509-crl-get-this-update.returns"></a><h4>Returns</h4>
10820 <p> when the CRL was issued, or (time_t)-1 on error.</p>
10821 </div>
10822 </div>
10823 <hr>
10824 <div class="refsect2">
10825 <a name="gnutls-x509-crl-get-next-update"></a><h3>gnutls_x509_crl_get_next_update ()</h3>
10826 <pre class="programlisting"><span class="returnvalue">time_t</span>
10827 gnutls_x509_crl_get_next_update (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>);</pre>
10828 <p>This function will return the time the next CRL will be issued.
10829 This field is optional in a CRL so it might be normal to get an
10830 error instead.</p>
10831 <div class="refsect3">
10832 <a name="gnutls-x509-crl-get-next-update.parameters"></a><h4>Parameters</h4>
10833 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10834 <colgroup>
10835 <col width="150px" class="parameters_name">
10836 <col class="parameters_description">
10837 <col width="200px" class="parameters_annotations">
10838 </colgroup>
10839 <tbody><tr>
10840 <td class="parameter_name"><p>crl</p></td>
10841 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
10842 <td class="parameter_annotations"> </td>
10843 </tr></tbody>
10844 </table></div>
10845 </div>
10846 <div class="refsect3">
10847 <a name="gnutls-x509-crl-get-next-update.returns"></a><h4>Returns</h4>
10848 <p> when the next CRL will be issued, or (time_t)-1 on error.</p>
10849 </div>
10850 </div>
10851 <hr>
10852 <div class="refsect2">
10853 <a name="gnutls-x509-crl-get-crt-count"></a><h3>gnutls_x509_crl_get_crt_count ()</h3>
10854 <pre class="programlisting"><span class="returnvalue">int</span>
10855 gnutls_x509_crl_get_crt_count (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>);</pre>
10856 <p>This function will return the number of revoked certificates in the
10857 given CRL.</p>
10858 <div class="refsect3">
10859 <a name="gnutls-x509-crl-get-crt-count.parameters"></a><h4>Parameters</h4>
10860 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10861 <colgroup>
10862 <col width="150px" class="parameters_name">
10863 <col class="parameters_description">
10864 <col width="200px" class="parameters_annotations">
10865 </colgroup>
10866 <tbody><tr>
10867 <td class="parameter_name"><p>crl</p></td>
10868 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
10869 <td class="parameter_annotations"> </td>
10870 </tr></tbody>
10871 </table></div>
10872 </div>
10873 <div class="refsect3">
10874 <a name="gnutls-x509-crl-get-crt-count.returns"></a><h4>Returns</h4>
10875 <p> number of certificates, a negative error code on failure.</p>
10876 </div>
10877 </div>
10878 <hr>
10879 <div class="refsect2">
10880 <a name="gnutls-x509-crl-get-crt-serial"></a><h3>gnutls_x509_crl_get_crt_serial ()</h3>
10881 <pre class="programlisting"><span class="returnvalue">int</span>
10882 gnutls_x509_crl_get_crt_serial (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
10883 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
10884 <em class="parameter"><code>unsigned <span class="type">char</span> *serial</code></em>,
10885 <em class="parameter"><code><span class="type">size_t</span> *serial_size</code></em>,
10886 <em class="parameter"><code><span class="type">time_t</span> *t</code></em>);</pre>
10887 <p>This function will retrieve the serial number of the specified, by
10888 the index, revoked certificate.</p>
10889 <p>Note that this function will have performance issues in large sequences
10890 of revoked certificates. In that case use <a class="link" href="gnutls-x509.html#gnutls-x509-crl-iter-crt-serial" title="gnutls_x509_crl_iter_crt_serial ()"><code class="function">gnutls_x509_crl_iter_crt_serial()</code></a>.</p>
10891 <div class="refsect3">
10892 <a name="gnutls-x509-crl-get-crt-serial.parameters"></a><h4>Parameters</h4>
10893 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10894 <colgroup>
10895 <col width="150px" class="parameters_name">
10896 <col class="parameters_description">
10897 <col width="200px" class="parameters_annotations">
10898 </colgroup>
10899 <tbody>
10900 <tr>
10901 <td class="parameter_name"><p>crl</p></td>
10902 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
10903 <td class="parameter_annotations"> </td>
10904 </tr>
10905 <tr>
10906 <td class="parameter_name"><p>indx</p></td>
10907 <td class="parameter_description"><p>the index of the certificate to extract (starting from 0)</p></td>
10908 <td class="parameter_annotations"> </td>
10909 </tr>
10910 <tr>
10911 <td class="parameter_name"><p>serial</p></td>
10912 <td class="parameter_description"><p>where the serial number will be copied</p></td>
10913 <td class="parameter_annotations"> </td>
10914 </tr>
10915 <tr>
10916 <td class="parameter_name"><p>serial_size</p></td>
10917 <td class="parameter_description"><p>initially holds the size of serial</p></td>
10918 <td class="parameter_annotations"> </td>
10919 </tr>
10920 <tr>
10921 <td class="parameter_name"><p>t</p></td>
10922 <td class="parameter_description"><p>if non null, will hold the time this certificate was revoked</p></td>
10923 <td class="parameter_annotations"> </td>
10924 </tr>
10925 </tbody>
10926 </table></div>
10927 </div>
10928 <div class="refsect3">
10929 <a name="gnutls-x509-crl-get-crt-serial.returns"></a><h4>Returns</h4>
10930 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
10931 negative error value.</p>
10932 </div>
10933 </div>
10934 <hr>
10935 <div class="refsect2">
10936 <a name="gnutls-x509-crl-iter-crt-serial"></a><h3>gnutls_x509_crl_iter_crt_serial ()</h3>
10937 <pre class="programlisting"><span class="returnvalue">int</span>
10938 gnutls_x509_crl_iter_crt_serial (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
10939 <em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-crl-iter-t" title="gnutls_x509_crl_iter_t"><span class="type">gnutls_x509_crl_iter_t</span></a> *Param2</code></em>,
10940 <em class="parameter"><code>unsigned <span class="type">char</span> *serial</code></em>,
10941 <em class="parameter"><code><span class="type">size_t</span> *serial_size</code></em>,
10942 <em class="parameter"><code><span class="type">time_t</span> *t</code></em>);</pre>
10943 <p>This function performs the same as <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-crt-serial" title="gnutls_x509_crl_get_crt_serial ()"><code class="function">gnutls_x509_crl_get_crt_serial()</code></a>,
10944 but reads sequentially and keeps state in the iterator
10945 between calls. That allows it to provide better performance in sequences
10946 with many elements (50000+).</p>
10947 <p>When past the last element is accessed <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
10948 is returned and the iterator is reset.</p>
10949 <p>After use, the iterator must be deinitialized using <a class="link" href="gnutls-x509.html#gnutls-x509-crl-iter-deinit" title="gnutls_x509_crl_iter_deinit ()"><code class="function">gnutls_x509_crl_iter_deinit()</code></a>.</p>
10950 <div class="refsect3">
10951 <a name="gnutls-x509-crl-iter-crt-serial.parameters"></a><h4>Parameters</h4>
10952 <div class="informaltable"><table class="informaltable" width="100%" border="0">
10953 <colgroup>
10954 <col width="150px" class="parameters_name">
10955 <col class="parameters_description">
10956 <col width="200px" class="parameters_annotations">
10957 </colgroup>
10958 <tbody>
10959 <tr>
10960 <td class="parameter_name"><p>crl</p></td>
10961 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
10962 <td class="parameter_annotations"> </td>
10963 </tr>
10964 <tr>
10965 <td class="parameter_name"><p>iter</p></td>
10966 <td class="parameter_description"><p>A pointer to an iterator (initially the iterator should be <code class="literal">NULL</code>)</p></td>
10967 <td class="parameter_annotations"> </td>
10968 </tr>
10969 <tr>
10970 <td class="parameter_name"><p>serial</p></td>
10971 <td class="parameter_description"><p>where the serial number will be copied</p></td>
10972 <td class="parameter_annotations"> </td>
10973 </tr>
10974 <tr>
10975 <td class="parameter_name"><p>serial_size</p></td>
10976 <td class="parameter_description"><p>initially holds the size of serial</p></td>
10977 <td class="parameter_annotations"> </td>
10978 </tr>
10979 <tr>
10980 <td class="parameter_name"><p>t</p></td>
10981 <td class="parameter_description"><p>if non null, will hold the time this certificate was revoked</p></td>
10982 <td class="parameter_annotations"> </td>
10983 </tr>
10984 </tbody>
10985 </table></div>
10986 </div>
10987 <div class="refsect3">
10988 <a name="gnutls-x509-crl-iter-crt-serial.returns"></a><h4>Returns</h4>
10989 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
10990 negative error value.</p>
10991 </div>
10992 </div>
10993 <hr>
10994 <div class="refsect2">
10995 <a name="gnutls-x509-crl-iter-deinit"></a><h3>gnutls_x509_crl_iter_deinit ()</h3>
10996 <pre class="programlisting"><span class="returnvalue">void</span>
10997 gnutls_x509_crl_iter_deinit (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-crl-iter-t" title="gnutls_x509_crl_iter_t"><span class="type">gnutls_x509_crl_iter_t</span></a> Param1</code></em>);</pre>
10998 <p>This function will deinitialize an iterator type.</p>
10999 <div class="refsect3">
11000 <a name="gnutls-x509-crl-iter-deinit.parameters"></a><h4>Parameters</h4>
11001 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11002 <colgroup>
11003 <col width="150px" class="parameters_name">
11004 <col class="parameters_description">
11005 <col width="200px" class="parameters_annotations">
11006 </colgroup>
11007 <tbody><tr>
11008 <td class="parameter_name"><p>iter</p></td>
11009 <td class="parameter_description"><p>The iterator to be deinitialized</p></td>
11010 <td class="parameter_annotations"> </td>
11011 </tr></tbody>
11012 </table></div>
11013 </div>
11014 </div>
11015 <hr>
11016 <div class="refsect2">
11017 <a name="gnutls-x509-crl-check-issuer"></a><h3>gnutls_x509_crl_check_issuer ()</h3>
11018 <pre class="programlisting"><span class="returnvalue">unsigned</span>
11019 gnutls_x509_crl_check_issuer (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
11020 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> issuer</code></em>);</pre>
11021 <p>This function will check if the given CRL was issued by the given
11022 issuer certificate.</p>
11023 <div class="refsect3">
11024 <a name="gnutls-x509-crl-check-issuer.parameters"></a><h4>Parameters</h4>
11025 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11026 <colgroup>
11027 <col width="150px" class="parameters_name">
11028 <col class="parameters_description">
11029 <col width="200px" class="parameters_annotations">
11030 </colgroup>
11031 <tbody>
11032 <tr>
11033 <td class="parameter_name"><p>crl</p></td>
11034 <td class="parameter_description"><p>is the CRL to be checked</p></td>
11035 <td class="parameter_annotations"> </td>
11036 </tr>
11037 <tr>
11038 <td class="parameter_name"><p>issuer</p></td>
11039 <td class="parameter_description"><p>is the certificate of a possible issuer</p></td>
11040 <td class="parameter_annotations"> </td>
11041 </tr>
11042 </tbody>
11043 </table></div>
11044 </div>
11045 <div class="refsect3">
11046 <a name="gnutls-x509-crl-check-issuer.returns"></a><h4>Returns</h4>
11047 <p> true (1) if the given CRL was issued by the given issuer,
11048 and false (0) if not.</p>
11049 </div>
11050 </div>
11051 <hr>
11052 <div class="refsect2">
11053 <a name="gnutls-x509-crl-list-import2"></a><h3>gnutls_x509_crl_list_import2 ()</h3>
11054 <pre class="programlisting"><span class="returnvalue">int</span>
11055 gnutls_x509_crl_list_import2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> **crls</code></em>,
11056 <em class="parameter"><code>unsigned <span class="type">int</span> *size</code></em>,
11057 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>,
11058 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
11059 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
11060 <p>This function will convert the given CRL list
11061 to the native gnutls_x509_crl_t format. The output will be stored
11062 in <em class="parameter"><code>crls</code></em>
11063 . They will be automatically initialized.</p>
11064 <p>If the Certificate is PEM encoded it should have a header of "X509
11065 CRL".</p>
11066 <div class="refsect3">
11067 <a name="gnutls-x509-crl-list-import2.parameters"></a><h4>Parameters</h4>
11068 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11069 <colgroup>
11070 <col width="150px" class="parameters_name">
11071 <col class="parameters_description">
11072 <col width="200px" class="parameters_annotations">
11073 </colgroup>
11074 <tbody>
11075 <tr>
11076 <td class="parameter_name"><p>crls</p></td>
11077 <td class="parameter_description"><p>Will contain the parsed crl list.</p></td>
11078 <td class="parameter_annotations"> </td>
11079 </tr>
11080 <tr>
11081 <td class="parameter_name"><p>size</p></td>
11082 <td class="parameter_description"><p>It will contain the size of the list.</p></td>
11083 <td class="parameter_annotations"> </td>
11084 </tr>
11085 <tr>
11086 <td class="parameter_name"><p>data</p></td>
11087 <td class="parameter_description"><p>The CRL data.</p></td>
11088 <td class="parameter_annotations"> </td>
11089 </tr>
11090 <tr>
11091 <td class="parameter_name"><p>format</p></td>
11092 <td class="parameter_description"><p>One of DER or PEM.</p></td>
11093 <td class="parameter_annotations"> </td>
11094 </tr>
11095 <tr>
11096 <td class="parameter_name"><p>flags</p></td>
11097 <td class="parameter_description"><p>must be (0) or an OR'd sequence of gnutls_certificate_import_flags.</p></td>
11098 <td class="parameter_annotations"> </td>
11099 </tr>
11100 </tbody>
11101 </table></div>
11102 </div>
11103 <div class="refsect3">
11104 <a name="gnutls-x509-crl-list-import2.returns"></a><h4>Returns</h4>
11105 <p> the number of certificates read or a negative error value.</p>
11106 </div>
11107 <p class="since">Since: 3.0</p>
11108 </div>
11109 <hr>
11110 <div class="refsect2">
11111 <a name="gnutls-x509-crl-list-import"></a><h3>gnutls_x509_crl_list_import ()</h3>
11112 <pre class="programlisting"><span class="returnvalue">int</span>
11113 gnutls_x509_crl_list_import (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> *crls</code></em>,
11114 <em class="parameter"><code>unsigned <span class="type">int</span> *crl_max</code></em>,
11115 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>,
11116 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
11117 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
11118 <p>This function will convert the given CRL list
11119 to the native gnutls_x509_crl_t format. The output will be stored
11120 in <em class="parameter"><code>crls</code></em>
11121 . They will be automatically initialized.</p>
11122 <p>If the Certificate is PEM encoded it should have a header of "X509 CRL".</p>
11123 <div class="refsect3">
11124 <a name="gnutls-x509-crl-list-import.parameters"></a><h4>Parameters</h4>
11125 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11126 <colgroup>
11127 <col width="150px" class="parameters_name">
11128 <col class="parameters_description">
11129 <col width="200px" class="parameters_annotations">
11130 </colgroup>
11131 <tbody>
11132 <tr>
11133 <td class="parameter_name"><p>crls</p></td>
11134 <td class="parameter_description"><p>Indicates where the parsed CRLs will be copied to. Must not be initialized.</p></td>
11135 <td class="parameter_annotations"> </td>
11136 </tr>
11137 <tr>
11138 <td class="parameter_name"><p>crl_max</p></td>
11139 <td class="parameter_description"><p>Initially must hold the maximum number of crls. It will be updated with the number of crls available.</p></td>
11140 <td class="parameter_annotations"> </td>
11141 </tr>
11142 <tr>
11143 <td class="parameter_name"><p>data</p></td>
11144 <td class="parameter_description"><p>The CRL data</p></td>
11145 <td class="parameter_annotations"> </td>
11146 </tr>
11147 <tr>
11148 <td class="parameter_name"><p>format</p></td>
11149 <td class="parameter_description"><p>One of DER or PEM.</p></td>
11150 <td class="parameter_annotations"> </td>
11151 </tr>
11152 <tr>
11153 <td class="parameter_name"><p>flags</p></td>
11154 <td class="parameter_description"><p>must be (0) or an OR'd sequence of gnutls_certificate_import_flags.</p></td>
11155 <td class="parameter_annotations"> </td>
11156 </tr>
11157 </tbody>
11158 </table></div>
11159 </div>
11160 <div class="refsect3">
11161 <a name="gnutls-x509-crl-list-import.returns"></a><h4>Returns</h4>
11162 <p> the number of certificates read or a negative error value.</p>
11163 </div>
11164 <p class="since">Since: 3.0</p>
11165 </div>
11166 <hr>
11167 <div class="refsect2">
11168 <a name="gnutls-x509-crl-set-version"></a><h3>gnutls_x509_crl_set_version ()</h3>
11169 <pre class="programlisting"><span class="returnvalue">int</span>
11170 gnutls_x509_crl_set_version (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
11171 <em class="parameter"><code>unsigned <span class="type">int</span> version</code></em>);</pre>
11172 <p>This function will set the version of the CRL. This
11173 must be one for CRL version 1, and so on. The CRLs generated
11174 by gnutls should have a version number of 2.</p>
11175 <div class="refsect3">
11176 <a name="gnutls-x509-crl-set-version.parameters"></a><h4>Parameters</h4>
11177 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11178 <colgroup>
11179 <col width="150px" class="parameters_name">
11180 <col class="parameters_description">
11181 <col width="200px" class="parameters_annotations">
11182 </colgroup>
11183 <tbody>
11184 <tr>
11185 <td class="parameter_name"><p>crl</p></td>
11186 <td class="parameter_description"><p>should contain a gnutls_x509_crl_t type</p></td>
11187 <td class="parameter_annotations"> </td>
11188 </tr>
11189 <tr>
11190 <td class="parameter_name"><p>version</p></td>
11191 <td class="parameter_description"><p>holds the version number. For CRLv1 crls must be 1.</p></td>
11192 <td class="parameter_annotations"> </td>
11193 </tr>
11194 </tbody>
11195 </table></div>
11196 </div>
11197 <div class="refsect3">
11198 <a name="gnutls-x509-crl-set-version.returns"></a><h4>Returns</h4>
11199 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
11200 negative error value.</p>
11201 </div>
11202 </div>
11203 <hr>
11204 <div class="refsect2">
11205 <a name="gnutls-x509-crl-set-this-update"></a><h3>gnutls_x509_crl_set_this_update ()</h3>
11206 <pre class="programlisting"><span class="returnvalue">int</span>
11207 gnutls_x509_crl_set_this_update (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
11208 <em class="parameter"><code><span class="type">time_t</span> act_time</code></em>);</pre>
11209 <p>This function will set the time this CRL was issued.</p>
11210 <div class="refsect3">
11211 <a name="gnutls-x509-crl-set-this-update.parameters"></a><h4>Parameters</h4>
11212 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11213 <colgroup>
11214 <col width="150px" class="parameters_name">
11215 <col class="parameters_description">
11216 <col width="200px" class="parameters_annotations">
11217 </colgroup>
11218 <tbody>
11219 <tr>
11220 <td class="parameter_name"><p>crl</p></td>
11221 <td class="parameter_description"><p>should contain a gnutls_x509_crl_t type</p></td>
11222 <td class="parameter_annotations"> </td>
11223 </tr>
11224 <tr>
11225 <td class="parameter_name"><p>act_time</p></td>
11226 <td class="parameter_description"><p>The actual time</p></td>
11227 <td class="parameter_annotations"> </td>
11228 </tr>
11229 </tbody>
11230 </table></div>
11231 </div>
11232 <div class="refsect3">
11233 <a name="gnutls-x509-crl-set-this-update.returns"></a><h4>Returns</h4>
11234 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
11235 negative error value.</p>
11236 </div>
11237 </div>
11238 <hr>
11239 <div class="refsect2">
11240 <a name="gnutls-x509-crl-set-next-update"></a><h3>gnutls_x509_crl_set_next_update ()</h3>
11241 <pre class="programlisting"><span class="returnvalue">int</span>
11242 gnutls_x509_crl_set_next_update (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
11243 <em class="parameter"><code><span class="type">time_t</span> exp_time</code></em>);</pre>
11244 <p>This function will set the time this CRL will be updated.
11245 This is an optional value to be set on a CRL and this call
11246 can be omitted when generating a CRL.</p>
11247 <p>Prior to GnuTLS 3.5.7, setting a nextUpdate field was required
11248 in order to generate a CRL.</p>
11249 <div class="refsect3">
11250 <a name="gnutls-x509-crl-set-next-update.parameters"></a><h4>Parameters</h4>
11251 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11252 <colgroup>
11253 <col width="150px" class="parameters_name">
11254 <col class="parameters_description">
11255 <col width="200px" class="parameters_annotations">
11256 </colgroup>
11257 <tbody>
11258 <tr>
11259 <td class="parameter_name"><p>crl</p></td>
11260 <td class="parameter_description"><p>should contain a gnutls_x509_crl_t type</p></td>
11261 <td class="parameter_annotations"> </td>
11262 </tr>
11263 <tr>
11264 <td class="parameter_name"><p>exp_time</p></td>
11265 <td class="parameter_description"><p>The actual time</p></td>
11266 <td class="parameter_annotations"> </td>
11267 </tr>
11268 </tbody>
11269 </table></div>
11270 </div>
11271 <div class="refsect3">
11272 <a name="gnutls-x509-crl-set-next-update.returns"></a><h4>Returns</h4>
11273 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
11274 negative error value.</p>
11275 </div>
11276 </div>
11277 <hr>
11278 <div class="refsect2">
11279 <a name="gnutls-x509-crl-set-crt-serial"></a><h3>gnutls_x509_crl_set_crt_serial ()</h3>
11280 <pre class="programlisting"><span class="returnvalue">int</span>
11281 gnutls_x509_crl_set_crt_serial (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
11282 <em class="parameter"><code>const <span class="type">void</span> *serial</code></em>,
11283 <em class="parameter"><code><span class="type">size_t</span> serial_size</code></em>,
11284 <em class="parameter"><code><span class="type">time_t</span> revocation_time</code></em>);</pre>
11285 <p>This function will set a revoked certificate's serial number to the CRL.</p>
11286 <div class="refsect3">
11287 <a name="gnutls-x509-crl-set-crt-serial.parameters"></a><h4>Parameters</h4>
11288 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11289 <colgroup>
11290 <col width="150px" class="parameters_name">
11291 <col class="parameters_description">
11292 <col width="200px" class="parameters_annotations">
11293 </colgroup>
11294 <tbody>
11295 <tr>
11296 <td class="parameter_name"><p>crl</p></td>
11297 <td class="parameter_description"><p>should contain a gnutls_x509_crl_t type</p></td>
11298 <td class="parameter_annotations"> </td>
11299 </tr>
11300 <tr>
11301 <td class="parameter_name"><p>serial</p></td>
11302 <td class="parameter_description"><p>The revoked certificate's serial number</p></td>
11303 <td class="parameter_annotations"> </td>
11304 </tr>
11305 <tr>
11306 <td class="parameter_name"><p>serial_size</p></td>
11307 <td class="parameter_description"><p>Holds the size of the serial field.</p></td>
11308 <td class="parameter_annotations"> </td>
11309 </tr>
11310 <tr>
11311 <td class="parameter_name"><p>revocation_time</p></td>
11312 <td class="parameter_description"><p>The time this certificate was revoked</p></td>
11313 <td class="parameter_annotations"> </td>
11314 </tr>
11315 </tbody>
11316 </table></div>
11317 </div>
11318 <div class="refsect3">
11319 <a name="gnutls-x509-crl-set-crt-serial.returns"></a><h4>Returns</h4>
11320 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
11321 negative error value.</p>
11322 </div>
11323 </div>
11324 <hr>
11325 <div class="refsect2">
11326 <a name="gnutls-x509-crl-set-crt"></a><h3>gnutls_x509_crl_set_crt ()</h3>
11327 <pre class="programlisting"><span class="returnvalue">int</span>
11328 gnutls_x509_crl_set_crt (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
11329 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
11330 <em class="parameter"><code><span class="type">time_t</span> revocation_time</code></em>);</pre>
11331 <p>This function will set a revoked certificate's serial number to the CRL.</p>
11332 <div class="refsect3">
11333 <a name="gnutls-x509-crl-set-crt.parameters"></a><h4>Parameters</h4>
11334 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11335 <colgroup>
11336 <col width="150px" class="parameters_name">
11337 <col class="parameters_description">
11338 <col width="200px" class="parameters_annotations">
11339 </colgroup>
11340 <tbody>
11341 <tr>
11342 <td class="parameter_name"><p>crl</p></td>
11343 <td class="parameter_description"><p>should contain a gnutls_x509_crl_t type</p></td>
11344 <td class="parameter_annotations"> </td>
11345 </tr>
11346 <tr>
11347 <td class="parameter_name"><p>crt</p></td>
11348 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> with the revoked certificate</p></td>
11349 <td class="parameter_annotations"> </td>
11350 </tr>
11351 <tr>
11352 <td class="parameter_name"><p>revocation_time</p></td>
11353 <td class="parameter_description"><p>The time this certificate was revoked</p></td>
11354 <td class="parameter_annotations"> </td>
11355 </tr>
11356 </tbody>
11357 </table></div>
11358 </div>
11359 <div class="refsect3">
11360 <a name="gnutls-x509-crl-set-crt.returns"></a><h4>Returns</h4>
11361 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
11362 negative error value.</p>
11363 </div>
11364 </div>
11365 <hr>
11366 <div class="refsect2">
11367 <a name="gnutls-x509-crl-get-authority-key-id"></a><h3>gnutls_x509_crl_get_authority_key_id ()</h3>
11368 <pre class="programlisting"><span class="returnvalue">int</span>
11369 gnutls_x509_crl_get_authority_key_id (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
11370 <em class="parameter"><code><span class="type">void</span> *id</code></em>,
11371 <em class="parameter"><code><span class="type">size_t</span> *id_size</code></em>,
11372 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
11373 <p>This function will return the CRL authority's key identifier. This
11374 is obtained by the X.509 Authority Key identifier extension field
11375 (2.5.29.35). Note that this function
11376 only returns the keyIdentifier field of the extension and
11377 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-X509-UNSUPPORTED-EXTENSION:CAPS" title="GNUTLS_E_X509_UNSUPPORTED_EXTENSION"><code class="literal">GNUTLS_E_X509_UNSUPPORTED_EXTENSION</code></a>, if the extension contains
11378 the name and serial number of the certificate. In that case
11379 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-authority-key-gn-serial" title="gnutls_x509_crl_get_authority_key_gn_serial ()"><code class="function">gnutls_x509_crl_get_authority_key_gn_serial()</code></a> may be used.</p>
11380 <div class="refsect3">
11381 <a name="gnutls-x509-crl-get-authority-key-id.parameters"></a><h4>Parameters</h4>
11382 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11383 <colgroup>
11384 <col width="150px" class="parameters_name">
11385 <col class="parameters_description">
11386 <col width="200px" class="parameters_annotations">
11387 </colgroup>
11388 <tbody>
11389 <tr>
11390 <td class="parameter_name"><p>crl</p></td>
11391 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
11392 <td class="parameter_annotations"> </td>
11393 </tr>
11394 <tr>
11395 <td class="parameter_name"><p>id</p></td>
11396 <td class="parameter_description"><p>The place where the identifier will be copied</p></td>
11397 <td class="parameter_annotations"> </td>
11398 </tr>
11399 <tr>
11400 <td class="parameter_name"><p>id_size</p></td>
11401 <td class="parameter_description"><p>Holds the size of the result field.</p></td>
11402 <td class="parameter_annotations"> </td>
11403 </tr>
11404 <tr>
11405 <td class="parameter_name"><p>critical</p></td>
11406 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical
11407 (may be null)</p></td>
11408 <td class="parameter_annotations"> </td>
11409 </tr>
11410 </tbody>
11411 </table></div>
11412 </div>
11413 <div class="refsect3">
11414 <a name="gnutls-x509-crl-get-authority-key-id.returns"></a><h4>Returns</h4>
11415 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
11416 negative error code in case of an error.</p>
11417 </div>
11418 <p class="since">Since: 2.8.0</p>
11419 </div>
11420 <hr>
11421 <div class="refsect2">
11422 <a name="gnutls-x509-crl-get-authority-key-gn-serial"></a><h3>gnutls_x509_crl_get_authority_key_gn_serial ()</h3>
11423 <pre class="programlisting"><span class="returnvalue">int</span>
11424 gnutls_x509_crl_get_authority_key_gn_serial
11425 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
11426 <em class="parameter"><code>unsigned <span class="type">int</span> seq</code></em>,
11427 <em class="parameter"><code><span class="type">void</span> *alt</code></em>,
11428 <em class="parameter"><code><span class="type">size_t</span> *alt_size</code></em>,
11429 <em class="parameter"><code>unsigned <span class="type">int</span> *alt_type</code></em>,
11430 <em class="parameter"><code><span class="type">void</span> *serial</code></em>,
11431 <em class="parameter"><code><span class="type">size_t</span> *serial_size</code></em>,
11432 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
11433 <p>This function will return the X.509 authority key
11434 identifier when stored as a general name (authorityCertIssuer)
11435 and serial number.</p>
11436 <p>Because more than one general names might be stored
11437 <em class="parameter"><code>seq</code></em>
11438 can be used as a counter to request them all until
11439 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> is returned.</p>
11440 <div class="refsect3">
11441 <a name="gnutls-x509-crl-get-authority-key-gn-serial.parameters"></a><h4>Parameters</h4>
11442 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11443 <colgroup>
11444 <col width="150px" class="parameters_name">
11445 <col class="parameters_description">
11446 <col width="200px" class="parameters_annotations">
11447 </colgroup>
11448 <tbody>
11449 <tr>
11450 <td class="parameter_name"><p>crl</p></td>
11451 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
11452 <td class="parameter_annotations"> </td>
11453 </tr>
11454 <tr>
11455 <td class="parameter_name"><p>seq</p></td>
11456 <td class="parameter_description"><p>specifies the sequence number of the alt name (0 for the first one, 1 for the second etc.)</p></td>
11457 <td class="parameter_annotations"> </td>
11458 </tr>
11459 <tr>
11460 <td class="parameter_name"><p>alt</p></td>
11461 <td class="parameter_description"><p>is the place where the alternative name will be copied to</p></td>
11462 <td class="parameter_annotations"> </td>
11463 </tr>
11464 <tr>
11465 <td class="parameter_name"><p>alt_size</p></td>
11466 <td class="parameter_description"><p>holds the size of alt.</p></td>
11467 <td class="parameter_annotations"> </td>
11468 </tr>
11469 <tr>
11470 <td class="parameter_name"><p>alt_type</p></td>
11471 <td class="parameter_description"><p>holds the type of the alternative name (one of gnutls_x509_subject_alt_name_t).</p></td>
11472 <td class="parameter_annotations"> </td>
11473 </tr>
11474 <tr>
11475 <td class="parameter_name"><p>serial</p></td>
11476 <td class="parameter_description"><p>buffer to store the serial number (may be null)</p></td>
11477 <td class="parameter_annotations"> </td>
11478 </tr>
11479 <tr>
11480 <td class="parameter_name"><p>serial_size</p></td>
11481 <td class="parameter_description"><p>Holds the size of the serial field (may be null)</p></td>
11482 <td class="parameter_annotations"> </td>
11483 </tr>
11484 <tr>
11485 <td class="parameter_name"><p>critical</p></td>
11486 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical (may be null)</p></td>
11487 <td class="parameter_annotations"> </td>
11488 </tr>
11489 </tbody>
11490 </table></div>
11491 </div>
11492 <div class="refsect3">
11493 <a name="gnutls-x509-crl-get-authority-key-gn-serial.returns"></a><h4>Returns</h4>
11494 <p> Returns 0 on success, or an error code.</p>
11495 </div>
11496 <p class="since">Since: 3.0</p>
11497 </div>
11498 <hr>
11499 <div class="refsect2">
11500 <a name="gnutls-x509-crl-get-number"></a><h3>gnutls_x509_crl_get_number ()</h3>
11501 <pre class="programlisting"><span class="returnvalue">int</span>
11502 gnutls_x509_crl_get_number (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
11503 <em class="parameter"><code><span class="type">void</span> *ret</code></em>,
11504 <em class="parameter"><code><span class="type">size_t</span> *ret_size</code></em>,
11505 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
11506 <p>This function will return the CRL number extension. This is
11507 obtained by the CRL Number extension field (2.5.29.20).</p>
11508 <div class="refsect3">
11509 <a name="gnutls-x509-crl-get-number.parameters"></a><h4>Parameters</h4>
11510 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11511 <colgroup>
11512 <col width="150px" class="parameters_name">
11513 <col class="parameters_description">
11514 <col width="200px" class="parameters_annotations">
11515 </colgroup>
11516 <tbody>
11517 <tr>
11518 <td class="parameter_name"><p>crl</p></td>
11519 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
11520 <td class="parameter_annotations"> </td>
11521 </tr>
11522 <tr>
11523 <td class="parameter_name"><p>ret</p></td>
11524 <td class="parameter_description"><p>The place where the number will be copied</p></td>
11525 <td class="parameter_annotations"> </td>
11526 </tr>
11527 <tr>
11528 <td class="parameter_name"><p>ret_size</p></td>
11529 <td class="parameter_description"><p>Holds the size of the result field.</p></td>
11530 <td class="parameter_annotations"> </td>
11531 </tr>
11532 <tr>
11533 <td class="parameter_name"><p>critical</p></td>
11534 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical
11535 (may be null)</p></td>
11536 <td class="parameter_annotations"> </td>
11537 </tr>
11538 </tbody>
11539 </table></div>
11540 </div>
11541 <div class="refsect3">
11542 <a name="gnutls-x509-crl-get-number.returns"></a><h4>Returns</h4>
11543 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
11544 negative error code in case of an error.</p>
11545 </div>
11546 <p class="since">Since: 2.8.0</p>
11547 </div>
11548 <hr>
11549 <div class="refsect2">
11550 <a name="gnutls-x509-crl-get-extension-oid"></a><h3>gnutls_x509_crl_get_extension_oid ()</h3>
11551 <pre class="programlisting"><span class="returnvalue">int</span>
11552 gnutls_x509_crl_get_extension_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
11553 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
11554 <em class="parameter"><code><span class="type">void</span> *oid</code></em>,
11555 <em class="parameter"><code><span class="type">size_t</span> *sizeof_oid</code></em>);</pre>
11556 <p>This function will return the requested extension OID in the CRL.
11557 The extension OID will be stored as a string in the provided
11558 buffer.</p>
11559 <div class="refsect3">
11560 <a name="gnutls-x509-crl-get-extension-oid.parameters"></a><h4>Parameters</h4>
11561 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11562 <colgroup>
11563 <col width="150px" class="parameters_name">
11564 <col class="parameters_description">
11565 <col width="200px" class="parameters_annotations">
11566 </colgroup>
11567 <tbody>
11568 <tr>
11569 <td class="parameter_name"><p>crl</p></td>
11570 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
11571 <td class="parameter_annotations"> </td>
11572 </tr>
11573 <tr>
11574 <td class="parameter_name"><p>indx</p></td>
11575 <td class="parameter_description"><p>Specifies which extension OID to send, use (0) to get the first one.</p></td>
11576 <td class="parameter_annotations"> </td>
11577 </tr>
11578 <tr>
11579 <td class="parameter_name"><p>oid</p></td>
11580 <td class="parameter_description"><p>a pointer to store the OID (may be null)</p></td>
11581 <td class="parameter_annotations"> </td>
11582 </tr>
11583 <tr>
11584 <td class="parameter_name"><p>sizeof_oid</p></td>
11585 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>oid</code></em>
11586 </p></td>
11587 <td class="parameter_annotations"> </td>
11588 </tr>
11589 </tbody>
11590 </table></div>
11591 </div>
11592 <div class="refsect3">
11593 <a name="gnutls-x509-crl-get-extension-oid.returns"></a><h4>Returns</h4>
11594 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
11595 negative error code in case of an error. If your have reached the
11596 last extension available <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
11597 will be returned.</p>
11598 </div>
11599 <p class="since">Since: 2.8.0</p>
11600 </div>
11601 <hr>
11602 <div class="refsect2">
11603 <a name="gnutls-x509-crl-get-extension-info"></a><h3>gnutls_x509_crl_get_extension_info ()</h3>
11604 <pre class="programlisting"><span class="returnvalue">int</span>
11605 gnutls_x509_crl_get_extension_info (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
11606 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
11607 <em class="parameter"><code><span class="type">void</span> *oid</code></em>,
11608 <em class="parameter"><code><span class="type">size_t</span> *sizeof_oid</code></em>,
11609 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
11610 <p>This function will return the requested extension OID in the CRL,
11611 and the critical flag for it. The extension OID will be stored as
11612 a string in the provided buffer. Use
11613 <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-extension-data" title="gnutls_x509_crl_get_extension_data ()"><code class="function">gnutls_x509_crl_get_extension_data()</code></a> to extract the data.</p>
11614 <p>If the buffer provided is not long enough to hold the output, then
11615 *<em class="parameter"><code>sizeof_oid</code></em>
11616 is updated and <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> will be
11617 returned.</p>
11618 <div class="refsect3">
11619 <a name="gnutls-x509-crl-get-extension-info.parameters"></a><h4>Parameters</h4>
11620 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11621 <colgroup>
11622 <col width="150px" class="parameters_name">
11623 <col class="parameters_description">
11624 <col width="200px" class="parameters_annotations">
11625 </colgroup>
11626 <tbody>
11627 <tr>
11628 <td class="parameter_name"><p>crl</p></td>
11629 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
11630 <td class="parameter_annotations"> </td>
11631 </tr>
11632 <tr>
11633 <td class="parameter_name"><p>indx</p></td>
11634 <td class="parameter_description"><p>Specifies which extension OID to send, use (0) to get the first one.</p></td>
11635 <td class="parameter_annotations"> </td>
11636 </tr>
11637 <tr>
11638 <td class="parameter_name"><p>oid</p></td>
11639 <td class="parameter_description"><p>a pointer to store the OID</p></td>
11640 <td class="parameter_annotations"> </td>
11641 </tr>
11642 <tr>
11643 <td class="parameter_name"><p>sizeof_oid</p></td>
11644 <td class="parameter_description"><p>initially holds the maximum size of <em class="parameter"><code>oid</code></em>
11645 , on return
11646 holds actual size of <em class="parameter"><code>oid</code></em>
11647 .</p></td>
11648 <td class="parameter_annotations"> </td>
11649 </tr>
11650 <tr>
11651 <td class="parameter_name"><p>critical</p></td>
11652 <td class="parameter_description"><p>output variable with critical flag, may be NULL.</p></td>
11653 <td class="parameter_annotations"> </td>
11654 </tr>
11655 </tbody>
11656 </table></div>
11657 </div>
11658 <div class="refsect3">
11659 <a name="gnutls-x509-crl-get-extension-info.returns"></a><h4>Returns</h4>
11660 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
11661 negative error code in case of an error. If your have reached the
11662 last extension available <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
11663 will be returned.</p>
11664 </div>
11665 <p class="since">Since: 2.8.0</p>
11666 </div>
11667 <hr>
11668 <div class="refsect2">
11669 <a name="gnutls-x509-crl-get-extension-data"></a><h3>gnutls_x509_crl_get_extension_data ()</h3>
11670 <pre class="programlisting"><span class="returnvalue">int</span>
11671 gnutls_x509_crl_get_extension_data (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
11672 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
11673 <em class="parameter"><code><span class="type">void</span> *data</code></em>,
11674 <em class="parameter"><code><span class="type">size_t</span> *sizeof_data</code></em>);</pre>
11675 <p>This function will return the requested extension data in the CRL.
11676 The extension data will be stored as a string in the provided
11677 buffer.</p>
11678 <p>Use <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-extension-info" title="gnutls_x509_crl_get_extension_info ()"><code class="function">gnutls_x509_crl_get_extension_info()</code></a> to extract the OID and
11679 critical flag. Use <a class="link" href="gnutls-x509.html#gnutls-x509-crl-get-extension-info" title="gnutls_x509_crl_get_extension_info ()"><code class="function">gnutls_x509_crl_get_extension_info()</code></a> instead,
11680 if you want to get data indexed by the extension OID rather than
11681 sequence.</p>
11682 <div class="refsect3">
11683 <a name="gnutls-x509-crl-get-extension-data.parameters"></a><h4>Parameters</h4>
11684 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11685 <colgroup>
11686 <col width="150px" class="parameters_name">
11687 <col class="parameters_description">
11688 <col width="200px" class="parameters_annotations">
11689 </colgroup>
11690 <tbody>
11691 <tr>
11692 <td class="parameter_name"><p>crl</p></td>
11693 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
11694 <td class="parameter_annotations"> </td>
11695 </tr>
11696 <tr>
11697 <td class="parameter_name"><p>indx</p></td>
11698 <td class="parameter_description"><p>Specifies which extension OID to send. Use (0) to get the first one.</p></td>
11699 <td class="parameter_annotations"> </td>
11700 </tr>
11701 <tr>
11702 <td class="parameter_name"><p>data</p></td>
11703 <td class="parameter_description"><p>a pointer to a structure to hold the data (may be null)</p></td>
11704 <td class="parameter_annotations"> </td>
11705 </tr>
11706 <tr>
11707 <td class="parameter_name"><p>sizeof_data</p></td>
11708 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>oid</code></em>
11709 </p></td>
11710 <td class="parameter_annotations"> </td>
11711 </tr>
11712 </tbody>
11713 </table></div>
11714 </div>
11715 <div class="refsect3">
11716 <a name="gnutls-x509-crl-get-extension-data.returns"></a><h4>Returns</h4>
11717 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
11718 negative error code in case of an error. If your have reached the
11719 last extension available <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
11720 will be returned.</p>
11721 </div>
11722 <p class="since">Since: 2.8.0</p>
11723 </div>
11724 <hr>
11725 <div class="refsect2">
11726 <a name="gnutls-x509-crl-get-extension-data2"></a><h3>gnutls_x509_crl_get_extension_data2 ()</h3>
11727 <pre class="programlisting"><span class="returnvalue">int</span>
11728 gnutls_x509_crl_get_extension_data2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
11729 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
11730 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>);</pre>
11731 <p>This function will return the requested by the index extension data in the
11732 certificate revocation list. The extension data will be allocated using
11733 <code class="function">gnutls_malloc()</code>.</p>
11734 <p>Use <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-extension-info" title="gnutls_x509_crt_get_extension_info ()"><code class="function">gnutls_x509_crt_get_extension_info()</code></a> to extract the OID.</p>
11735 <div class="refsect3">
11736 <a name="gnutls-x509-crl-get-extension-data2.parameters"></a><h4>Parameters</h4>
11737 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11738 <colgroup>
11739 <col width="150px" class="parameters_name">
11740 <col class="parameters_description">
11741 <col width="200px" class="parameters_annotations">
11742 </colgroup>
11743 <tbody>
11744 <tr>
11745 <td class="parameter_name"><p>crl</p></td>
11746 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> type</p></td>
11747 <td class="parameter_annotations"> </td>
11748 </tr>
11749 <tr>
11750 <td class="parameter_name"><p>indx</p></td>
11751 <td class="parameter_description"><p>Specifies which extension OID to read. Use (0) to get the first one.</p></td>
11752 <td class="parameter_annotations"> </td>
11753 </tr>
11754 <tr>
11755 <td class="parameter_name"><p>data</p></td>
11756 <td class="parameter_description"><p>will contain the extension DER-encoded data</p></td>
11757 <td class="parameter_annotations"> </td>
11758 </tr>
11759 </tbody>
11760 </table></div>
11761 </div>
11762 <div class="refsect3">
11763 <a name="gnutls-x509-crl-get-extension-data2.returns"></a><h4>Returns</h4>
11764 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned,
11765 otherwise a negative error code is returned. If you have reached the
11766 last extension available <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
11767 will be returned.</p>
11768 </div>
11769 </div>
11770 <hr>
11771 <div class="refsect2">
11772 <a name="gnutls-x509-crl-set-authority-key-id"></a><h3>gnutls_x509_crl_set_authority_key_id ()</h3>
11773 <pre class="programlisting"><span class="returnvalue">int</span>
11774 gnutls_x509_crl_set_authority_key_id (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
11775 <em class="parameter"><code>const <span class="type">void</span> *id</code></em>,
11776 <em class="parameter"><code><span class="type">size_t</span> id_size</code></em>);</pre>
11777 <p>This function will set the CRL's authority key ID extension. Only
11778 the keyIdentifier field can be set with this function. This may
11779 be used by an authority that holds multiple private keys, to distinguish
11780 the used key.</p>
11781 <div class="refsect3">
11782 <a name="gnutls-x509-crl-set-authority-key-id.parameters"></a><h4>Parameters</h4>
11783 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11784 <colgroup>
11785 <col width="150px" class="parameters_name">
11786 <col class="parameters_description">
11787 <col width="200px" class="parameters_annotations">
11788 </colgroup>
11789 <tbody>
11790 <tr>
11791 <td class="parameter_name"><p>crl</p></td>
11792 <td class="parameter_description"><p>a CRL of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a></p></td>
11793 <td class="parameter_annotations"> </td>
11794 </tr>
11795 <tr>
11796 <td class="parameter_name"><p>id</p></td>
11797 <td class="parameter_description"><p>The key ID</p></td>
11798 <td class="parameter_annotations"> </td>
11799 </tr>
11800 <tr>
11801 <td class="parameter_name"><p>id_size</p></td>
11802 <td class="parameter_description"><p>Holds the size of the serial field.</p></td>
11803 <td class="parameter_annotations"> </td>
11804 </tr>
11805 </tbody>
11806 </table></div>
11807 </div>
11808 <div class="refsect3">
11809 <a name="gnutls-x509-crl-set-authority-key-id.returns"></a><h4>Returns</h4>
11810 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
11811 negative error value.</p>
11812 </div>
11813 <p class="since">Since: 2.8.0</p>
11814 </div>
11815 <hr>
11816 <div class="refsect2">
11817 <a name="gnutls-x509-crl-set-number"></a><h3>gnutls_x509_crl_set_number ()</h3>
11818 <pre class="programlisting"><span class="returnvalue">int</span>
11819 gnutls_x509_crl_set_number (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
11820 <em class="parameter"><code>const <span class="type">void</span> *nr</code></em>,
11821 <em class="parameter"><code><span class="type">size_t</span> nr_size</code></em>);</pre>
11822 <p>This function will set the CRL's number extension. This
11823 is to be used as a unique and monotonic number assigned to
11824 the CRL by the authority.</p>
11825 <div class="refsect3">
11826 <a name="gnutls-x509-crl-set-number.parameters"></a><h4>Parameters</h4>
11827 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11828 <colgroup>
11829 <col width="150px" class="parameters_name">
11830 <col class="parameters_description">
11831 <col width="200px" class="parameters_annotations">
11832 </colgroup>
11833 <tbody>
11834 <tr>
11835 <td class="parameter_name"><p>crl</p></td>
11836 <td class="parameter_description"><p>a CRL of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a></p></td>
11837 <td class="parameter_annotations"> </td>
11838 </tr>
11839 <tr>
11840 <td class="parameter_name"><p>nr</p></td>
11841 <td class="parameter_description"><p>The CRL number</p></td>
11842 <td class="parameter_annotations"> </td>
11843 </tr>
11844 <tr>
11845 <td class="parameter_name"><p>nr_size</p></td>
11846 <td class="parameter_description"><p>Holds the size of the nr field.</p></td>
11847 <td class="parameter_annotations"> </td>
11848 </tr>
11849 </tbody>
11850 </table></div>
11851 </div>
11852 <div class="refsect3">
11853 <a name="gnutls-x509-crl-set-number.returns"></a><h4>Returns</h4>
11854 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
11855 negative error value.</p>
11856 </div>
11857 <p class="since">Since: 2.8.0</p>
11858 </div>
11859 <hr>
11860 <div class="refsect2">
11861 <a name="GNUTLS-PROFILE-TO-VFLAGS:CAPS"></a><h3>GNUTLS_PROFILE_TO_VFLAGS()</h3>
11862 <pre class="programlisting">#define GNUTLS_PROFILE_TO_VFLAGS(x) (((unsigned)x) &lt;&lt; 24)
11863 </pre>
11864 </div>
11865 <hr>
11866 <div class="refsect2">
11867 <a name="GNUTLS-VFLAGS-TO-PROFILE:CAPS"></a><h3>GNUTLS_VFLAGS_TO_PROFILE()</h3>
11868 <pre class="programlisting">#define GNUTLS_VFLAGS_TO_PROFILE(x) ((((unsigned)x) &gt;&gt; 24) &amp; 0xff)
11869 </pre>
11870 </div>
11871 <hr>
11872 <div class="refsect2">
11873 <a name="gnutls-certificate-verification-profile-get-name"></a><h3>gnutls_certificate_verification_profile_get_name ()</h3>
11874 <pre class="programlisting">const <span class="returnvalue">char</span> *
11875 gnutls_certificate_verification_profile_get_name
11876 ();</pre>
11877 <p>Convert a <a class="link" href="gnutls-x509.html#gnutls-certificate-verification-profiles-t" title="enum gnutls_certificate_verification_profiles_t"><span class="type">gnutls_certificate_verification_profiles_t</span></a> value to a string.</p>
11878 <div class="refsect3">
11879 <a name="gnutls-certificate-verification-profile-get-name.parameters"></a><h4>Parameters</h4>
11880 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11881 <colgroup>
11882 <col width="150px" class="parameters_name">
11883 <col class="parameters_description">
11884 <col width="200px" class="parameters_annotations">
11885 </colgroup>
11886 <tbody><tr>
11887 <td class="parameter_name"><p>id</p></td>
11888 <td class="parameter_description"><p>is a profile ID</p></td>
11889 <td class="parameter_annotations"> </td>
11890 </tr></tbody>
11891 </table></div>
11892 </div>
11893 <div class="refsect3">
11894 <a name="gnutls-certificate-verification-profile-get-name.returns"></a><h4>Returns</h4>
11895 <p> a string that contains the name of the specified profile or <code class="literal">NULL</code>.</p>
11896 </div>
11897 </div>
11898 <hr>
11899 <div class="refsect2">
11900 <a name="gnutls-x509-crt-list-verify"></a><h3>gnutls_x509_crt_list_verify ()</h3>
11901 <pre class="programlisting"><span class="returnvalue">int</span>
11902 gnutls_x509_crt_list_verify (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *cert_list</code></em>,
11903 <em class="parameter"><code><span class="type">unsigned </span> cert_list_length</code></em>,
11904 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *CA_list</code></em>,
11905 <em class="parameter"><code><span class="type">unsigned </span> CA_list_length</code></em>,
11906 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> *CRL_list</code></em>,
11907 <em class="parameter"><code><span class="type">unsigned </span> CRL_list_length</code></em>,
11908 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
11909 <em class="parameter"><code>unsigned <span class="type">int</span> *verify</code></em>);</pre>
11910 <p>This function will try to verify the given certificate list and
11911 return its status. The details of the verification are the same
11912 as in <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-verify-crt2" title="gnutls_x509_trust_list_verify_crt2 ()"><code class="function">gnutls_x509_trust_list_verify_crt2()</code></a>.</p>
11913 <p>You must check the peer's name in order to check if the verified
11914 certificate belongs to the actual peer.</p>
11915 <p>The certificate verification output will be put in <em class="parameter"><code>verify</code></em>
11916 and will
11917 be one or more of the gnutls_certificate_status_t enumerated
11918 elements bitwise or'd. For a more detailed verification status use
11919 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-verify" title="gnutls_x509_crt_verify ()"><code class="function">gnutls_x509_crt_verify()</code></a> per list element.</p>
11920 <div class="refsect3">
11921 <a name="gnutls-x509-crt-list-verify.parameters"></a><h4>Parameters</h4>
11922 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11923 <colgroup>
11924 <col width="150px" class="parameters_name">
11925 <col class="parameters_description">
11926 <col width="200px" class="parameters_annotations">
11927 </colgroup>
11928 <tbody>
11929 <tr>
11930 <td class="parameter_name"><p>cert_list</p></td>
11931 <td class="parameter_description"><p>is the certificate list to be verified</p></td>
11932 <td class="parameter_annotations"> </td>
11933 </tr>
11934 <tr>
11935 <td class="parameter_name"><p>cert_list_length</p></td>
11936 <td class="parameter_description"><p>holds the number of certificate in cert_list</p></td>
11937 <td class="parameter_annotations"> </td>
11938 </tr>
11939 <tr>
11940 <td class="parameter_name"><p>CA_list</p></td>
11941 <td class="parameter_description"><p>is the CA list which will be used in verification</p></td>
11942 <td class="parameter_annotations"> </td>
11943 </tr>
11944 <tr>
11945 <td class="parameter_name"><p>CA_list_length</p></td>
11946 <td class="parameter_description"><p>holds the number of CA certificate in CA_list</p></td>
11947 <td class="parameter_annotations"> </td>
11948 </tr>
11949 <tr>
11950 <td class="parameter_name"><p>CRL_list</p></td>
11951 <td class="parameter_description"><p>holds a list of CRLs.</p></td>
11952 <td class="parameter_annotations"> </td>
11953 </tr>
11954 <tr>
11955 <td class="parameter_name"><p>CRL_list_length</p></td>
11956 <td class="parameter_description"><p>the length of CRL list.</p></td>
11957 <td class="parameter_annotations"> </td>
11958 </tr>
11959 <tr>
11960 <td class="parameter_name"><p>flags</p></td>
11961 <td class="parameter_description"><p>Flags that may be used to change the verification algorithm. Use OR of the gnutls_certificate_verify_flags enumerations.</p></td>
11962 <td class="parameter_annotations"> </td>
11963 </tr>
11964 <tr>
11965 <td class="parameter_name"><p>verify</p></td>
11966 <td class="parameter_description"><p>will hold the certificate verification output.</p></td>
11967 <td class="parameter_annotations"> </td>
11968 </tr>
11969 </tbody>
11970 </table></div>
11971 </div>
11972 <div class="refsect3">
11973 <a name="gnutls-x509-crt-list-verify.returns"></a><h4>Returns</h4>
11974 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
11975 negative error value.</p>
11976 </div>
11977 </div>
11978 <hr>
11979 <div class="refsect2">
11980 <a name="gnutls-x509-crt-verify"></a><h3>gnutls_x509_crt_verify ()</h3>
11981 <pre class="programlisting"><span class="returnvalue">int</span>
11982 gnutls_x509_crt_verify (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
11983 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *CA_list</code></em>,
11984 <em class="parameter"><code><span class="type">unsigned </span> CA_list_length</code></em>,
11985 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
11986 <em class="parameter"><code>unsigned <span class="type">int</span> *verify</code></em>);</pre>
11987 <p>This function will try to verify the given certificate and return
11988 its status. Note that a verification error does not imply a negative
11989 return status. In that case the <em class="parameter"><code>verify</code></em>
11990 status is set.</p>
11991 <p>The details of the verification are the same
11992 as in <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-verify-crt2" title="gnutls_x509_trust_list_verify_crt2 ()"><code class="function">gnutls_x509_trust_list_verify_crt2()</code></a>.</p>
11993 <div class="refsect3">
11994 <a name="gnutls-x509-crt-verify.parameters"></a><h4>Parameters</h4>
11995 <div class="informaltable"><table class="informaltable" width="100%" border="0">
11996 <colgroup>
11997 <col width="150px" class="parameters_name">
11998 <col class="parameters_description">
11999 <col width="200px" class="parameters_annotations">
12000 </colgroup>
12001 <tbody>
12002 <tr>
12003 <td class="parameter_name"><p>cert</p></td>
12004 <td class="parameter_description"><p>is the certificate to be verified</p></td>
12005 <td class="parameter_annotations"> </td>
12006 </tr>
12007 <tr>
12008 <td class="parameter_name"><p>CA_list</p></td>
12009 <td class="parameter_description"><p>is one certificate that is considered to be trusted one</p></td>
12010 <td class="parameter_annotations"> </td>
12011 </tr>
12012 <tr>
12013 <td class="parameter_name"><p>CA_list_length</p></td>
12014 <td class="parameter_description"><p>holds the number of CA certificate in CA_list</p></td>
12015 <td class="parameter_annotations"> </td>
12016 </tr>
12017 <tr>
12018 <td class="parameter_name"><p>flags</p></td>
12019 <td class="parameter_description"><p>Flags that may be used to change the verification algorithm. Use OR of the gnutls_certificate_verify_flags enumerations.</p></td>
12020 <td class="parameter_annotations"> </td>
12021 </tr>
12022 <tr>
12023 <td class="parameter_name"><p>verify</p></td>
12024 <td class="parameter_description"><p>will hold the certificate verification output.</p></td>
12025 <td class="parameter_annotations"> </td>
12026 </tr>
12027 </tbody>
12028 </table></div>
12029 </div>
12030 <div class="refsect3">
12031 <a name="gnutls-x509-crt-verify.returns"></a><h4>Returns</h4>
12032 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
12033 negative error value.</p>
12034 </div>
12035 </div>
12036 <hr>
12037 <div class="refsect2">
12038 <a name="gnutls-x509-crl-verify"></a><h3>gnutls_x509_crl_verify ()</h3>
12039 <pre class="programlisting"><span class="returnvalue">int</span>
12040 gnutls_x509_crl_verify (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> crl</code></em>,
12041 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *CA_list</code></em>,
12042 <em class="parameter"><code><span class="type">unsigned </span> CA_list_length</code></em>,
12043 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
12044 <em class="parameter"><code>unsigned <span class="type">int</span> *verify</code></em>);</pre>
12045 <p>This function will try to verify the given crl and return its verification status.
12046 See <a class="link" href="gnutls-x509.html#gnutls-x509-crt-list-verify" title="gnutls_x509_crt_list_verify ()"><code class="function">gnutls_x509_crt_list_verify()</code></a> for a detailed description of
12047 return values. Note that since GnuTLS 3.1.4 this function includes
12048 the time checks.</p>
12049 <p>Note that value in <em class="parameter"><code>verify</code></em>
12050 is set only when the return value of this
12051 function is success (i.e, failure to trust a CRL a certificate does not imply
12052 a negative return value).</p>
12053 <p>Before GnuTLS 3.5.7 this function would return zero or a positive
12054 number on success.</p>
12055 <div class="refsect3">
12056 <a name="gnutls-x509-crl-verify.parameters"></a><h4>Parameters</h4>
12057 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12058 <colgroup>
12059 <col width="150px" class="parameters_name">
12060 <col class="parameters_description">
12061 <col width="200px" class="parameters_annotations">
12062 </colgroup>
12063 <tbody>
12064 <tr>
12065 <td class="parameter_name"><p>crl</p></td>
12066 <td class="parameter_description"><p>is the crl to be verified</p></td>
12067 <td class="parameter_annotations"> </td>
12068 </tr>
12069 <tr>
12070 <td class="parameter_name"><p>trusted_cas</p></td>
12071 <td class="parameter_description"><p>is a certificate list that is considered to be trusted one</p></td>
12072 <td class="parameter_annotations"> </td>
12073 </tr>
12074 <tr>
12075 <td class="parameter_name"><p>tcas_size</p></td>
12076 <td class="parameter_description"><p>holds the number of CA certificates in CA_list</p></td>
12077 <td class="parameter_annotations"> </td>
12078 </tr>
12079 <tr>
12080 <td class="parameter_name"><p>flags</p></td>
12081 <td class="parameter_description"><p>Flags that may be used to change the verification algorithm. Use OR of the gnutls_certificate_verify_flags enumerations.</p></td>
12082 <td class="parameter_annotations"> </td>
12083 </tr>
12084 <tr>
12085 <td class="parameter_name"><p>verify</p></td>
12086 <td class="parameter_description"><p>will hold the crl verification output.</p></td>
12087 <td class="parameter_annotations"> </td>
12088 </tr>
12089 </tbody>
12090 </table></div>
12091 </div>
12092 <div class="refsect3">
12093 <a name="gnutls-x509-crl-verify.returns"></a><h4>Returns</h4>
12094 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0), otherwise a
12095 negative error value.</p>
12096 </div>
12097 </div>
12098 <hr>
12099 <div class="refsect2">
12100 <a name="gnutls-x509-crt-verify-data2"></a><h3>gnutls_x509_crt_verify_data2 ()</h3>
12101 <pre class="programlisting"><span class="returnvalue">int</span>
12102 gnutls_x509_crt_verify_data2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
12103 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-sign-algorithm-t" title="enum gnutls_sign_algorithm_t"><span class="type">gnutls_sign_algorithm_t</span></a> algo</code></em>,
12104 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
12105 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>,
12106 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *signature</code></em>);</pre>
12107 <p>This function will verify the given signed data, using the
12108 parameters from the certificate.</p>
12109 <div class="refsect3">
12110 <a name="gnutls-x509-crt-verify-data2.parameters"></a><h4>Parameters</h4>
12111 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12112 <colgroup>
12113 <col width="150px" class="parameters_name">
12114 <col class="parameters_description">
12115 <col width="200px" class="parameters_annotations">
12116 </colgroup>
12117 <tbody>
12118 <tr>
12119 <td class="parameter_name"><p>crt</p></td>
12120 <td class="parameter_description"><p>Holds the certificate to verify with</p></td>
12121 <td class="parameter_annotations"> </td>
12122 </tr>
12123 <tr>
12124 <td class="parameter_name"><p>algo</p></td>
12125 <td class="parameter_description"><p>The signature algorithm used</p></td>
12126 <td class="parameter_annotations"> </td>
12127 </tr>
12128 <tr>
12129 <td class="parameter_name"><p>flags</p></td>
12130 <td class="parameter_description"><p>Zero or an OR list of <a class="link" href="gnutls-x509.html#gnutls-certificate-verify-flags" title="enum gnutls_certificate_verify_flags"><span class="type">gnutls_certificate_verify_flags</span></a></p></td>
12131 <td class="parameter_annotations"> </td>
12132 </tr>
12133 <tr>
12134 <td class="parameter_name"><p>data</p></td>
12135 <td class="parameter_description"><p>holds the signed data</p></td>
12136 <td class="parameter_annotations"> </td>
12137 </tr>
12138 <tr>
12139 <td class="parameter_name"><p>signature</p></td>
12140 <td class="parameter_description"><p>contains the signature</p></td>
12141 <td class="parameter_annotations"> </td>
12142 </tr>
12143 </tbody>
12144 </table></div>
12145 </div>
12146 <div class="refsect3">
12147 <a name="gnutls-x509-crt-verify-data2.returns"></a><h4>Returns</h4>
12148 <p> In case of a verification failure <a class="link" href="gnutls-gnutls.html#GNUTLS-E-PK-SIG-VERIFY-FAILED:CAPS" title="GNUTLS_E_PK_SIG_VERIFY_FAILED"><code class="literal">GNUTLS_E_PK_SIG_VERIFY_FAILED</code></a>
12149 is returned, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-EXPIRED:CAPS" title="GNUTLS_E_EXPIRED"><code class="literal">GNUTLS_E_EXPIRED</code></a> or <a class="link" href="gnutls-gnutls.html#GNUTLS-E-NOT-YET-ACTIVATED:CAPS" title="GNUTLS_E_NOT_YET_ACTIVATED"><code class="literal">GNUTLS_E_NOT_YET_ACTIVATED</code></a> on expired
12150 or not yet activated certificate and zero or positive code on success.</p>
12151 <p>Note that since GnuTLS 3.5.6 this function introduces checks in the
12152 end certificate (<em class="parameter"><code>crt</code></em>
12153 ), including time checks and key usage checks.</p>
12154 </div>
12155 <p class="since">Since: 3.4.0</p>
12156 </div>
12157 <hr>
12158 <div class="refsect2">
12159 <a name="gnutls-x509-crt-check-revocation"></a><h3>gnutls_x509_crt_check_revocation ()</h3>
12160 <pre class="programlisting"><span class="returnvalue">int</span>
12161 gnutls_x509_crt_check_revocation (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
12162 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> *crl_list</code></em>,
12163 <em class="parameter"><code><span class="type">unsigned </span> crl_list_length</code></em>);</pre>
12164 <p>This function will check if the given certificate is
12165 revoked. It is assumed that the CRLs have been verified before.</p>
12166 <div class="refsect3">
12167 <a name="gnutls-x509-crt-check-revocation.parameters"></a><h4>Parameters</h4>
12168 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12169 <colgroup>
12170 <col width="150px" class="parameters_name">
12171 <col class="parameters_description">
12172 <col width="200px" class="parameters_annotations">
12173 </colgroup>
12174 <tbody>
12175 <tr>
12176 <td class="parameter_name"><p>cert</p></td>
12177 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
12178 <td class="parameter_annotations"> </td>
12179 </tr>
12180 <tr>
12181 <td class="parameter_name"><p>crl_list</p></td>
12182 <td class="parameter_description"><p>should contain a list of gnutls_x509_crl_t types</p></td>
12183 <td class="parameter_annotations"> </td>
12184 </tr>
12185 <tr>
12186 <td class="parameter_name"><p>crl_list_length</p></td>
12187 <td class="parameter_description"><p>the length of the crl_list</p></td>
12188 <td class="parameter_annotations"> </td>
12189 </tr>
12190 </tbody>
12191 </table></div>
12192 </div>
12193 <div class="refsect3">
12194 <a name="gnutls-x509-crt-check-revocation.returns"></a><h4>Returns</h4>
12195 <p> 0 if the certificate is NOT revoked, and 1 if it is. A
12196 negative error code is returned on error.</p>
12197 </div>
12198 </div>
12199 <hr>
12200 <div class="refsect2">
12201 <a name="gnutls-x509-crt-get-fingerprint"></a><h3>gnutls_x509_crt_get_fingerprint ()</h3>
12202 <pre class="programlisting"><span class="returnvalue">int</span>
12203 gnutls_x509_crt_get_fingerprint (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
12204 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> algo</code></em>,
12205 <em class="parameter"><code><span class="type">void</span> *buf</code></em>,
12206 <em class="parameter"><code><span class="type">size_t</span> *buf_size</code></em>);</pre>
12207 <p>This function will calculate and copy the certificate's fingerprint
12208 in the provided buffer. The fingerprint is a hash of the DER-encoded
12209 data of the certificate.</p>
12210 <p>If the buffer is null then only the size will be filled.</p>
12211 <div class="refsect3">
12212 <a name="gnutls-x509-crt-get-fingerprint.parameters"></a><h4>Parameters</h4>
12213 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12214 <colgroup>
12215 <col width="150px" class="parameters_name">
12216 <col class="parameters_description">
12217 <col width="200px" class="parameters_annotations">
12218 </colgroup>
12219 <tbody>
12220 <tr>
12221 <td class="parameter_name"><p>cert</p></td>
12222 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
12223 <td class="parameter_annotations"> </td>
12224 </tr>
12225 <tr>
12226 <td class="parameter_name"><p>algo</p></td>
12227 <td class="parameter_description"><p>is a digest algorithm</p></td>
12228 <td class="parameter_annotations"> </td>
12229 </tr>
12230 <tr>
12231 <td class="parameter_name"><p>buf</p></td>
12232 <td class="parameter_description"><p>a pointer to a structure to hold the fingerprint (may be null)</p></td>
12233 <td class="parameter_annotations"> </td>
12234 </tr>
12235 <tr>
12236 <td class="parameter_name"><p>buf_size</p></td>
12237 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>buf</code></em>
12238 </p></td>
12239 <td class="parameter_annotations"> </td>
12240 </tr>
12241 </tbody>
12242 </table></div>
12243 </div>
12244 <div class="refsect3">
12245 <a name="gnutls-x509-crt-get-fingerprint.returns"></a><h4>Returns</h4>
12246 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the provided buffer is
12247 not long enough, and in that case the *buf_size will be updated
12248 with the required size. On success 0 is returned.</p>
12249 </div>
12250 </div>
12251 <hr>
12252 <div class="refsect2">
12253 <a name="gnutls-x509-crt-get-key-purpose-oid"></a><h3>gnutls_x509_crt_get_key_purpose_oid ()</h3>
12254 <pre class="programlisting"><span class="returnvalue">int</span>
12255 gnutls_x509_crt_get_key_purpose_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
12256 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
12257 <em class="parameter"><code><span class="type">void</span> *oid</code></em>,
12258 <em class="parameter"><code><span class="type">size_t</span> *oid_size</code></em>,
12259 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
12260 <p>This function will extract the key purpose OIDs of the Certificate
12261 specified by the given index. These are stored in the Extended Key
12262 Usage extension (2.5.29.37) See the GNUTLS_KP_* definitions for
12263 human readable names.</p>
12264 <p>If <em class="parameter"><code>oid</code></em>
12265 is null then only the size will be filled. The <em class="parameter"><code>oid</code></em>
12266
12267 returned will be null terminated, although <em class="parameter"><code>oid_size</code></em>
12268 will not
12269 account for the trailing null.</p>
12270 <div class="refsect3">
12271 <a name="gnutls-x509-crt-get-key-purpose-oid.parameters"></a><h4>Parameters</h4>
12272 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12273 <colgroup>
12274 <col width="150px" class="parameters_name">
12275 <col class="parameters_description">
12276 <col width="200px" class="parameters_annotations">
12277 </colgroup>
12278 <tbody>
12279 <tr>
12280 <td class="parameter_name"><p>cert</p></td>
12281 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
12282 <td class="parameter_annotations"> </td>
12283 </tr>
12284 <tr>
12285 <td class="parameter_name"><p>indx</p></td>
12286 <td class="parameter_description"><p>This specifies which OID to return. Use (0) to get the first one.</p></td>
12287 <td class="parameter_annotations"> </td>
12288 </tr>
12289 <tr>
12290 <td class="parameter_name"><p>oid</p></td>
12291 <td class="parameter_description"><p>a pointer to a buffer to hold the OID (may be null)</p></td>
12292 <td class="parameter_annotations"> </td>
12293 </tr>
12294 <tr>
12295 <td class="parameter_name"><p>oid_size</p></td>
12296 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>oid</code></em>
12297 </p></td>
12298 <td class="parameter_annotations"> </td>
12299 </tr>
12300 <tr>
12301 <td class="parameter_name"><p>critical</p></td>
12302 <td class="parameter_description"><p>output flag to indicate criticality of extension</p></td>
12303 <td class="parameter_annotations"> </td>
12304 </tr>
12305 </tbody>
12306 </table></div>
12307 </div>
12308 <div class="refsect3">
12309 <a name="gnutls-x509-crt-get-key-purpose-oid.returns"></a><h4>Returns</h4>
12310 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the provided buffer is
12311 not long enough, and in that case the *oid_size will be updated
12312 with the required size. On success 0 is returned.</p>
12313 </div>
12314 </div>
12315 <hr>
12316 <div class="refsect2">
12317 <a name="gnutls-x509-crt-set-key-purpose-oid"></a><h3>gnutls_x509_crt_set_key_purpose_oid ()</h3>
12318 <pre class="programlisting"><span class="returnvalue">int</span>
12319 gnutls_x509_crt_set_key_purpose_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
12320 <em class="parameter"><code>const <span class="type">void</span> *oid</code></em>,
12321 <em class="parameter"><code>unsigned <span class="type">int</span> critical</code></em>);</pre>
12322 <p>This function will set the key purpose OIDs of the Certificate.
12323 These are stored in the Extended Key Usage extension (2.5.29.37)
12324 See the GNUTLS_KP_* definitions for human readable names.</p>
12325 <p>Subsequent calls to this function will append OIDs to the OID list.</p>
12326 <div class="refsect3">
12327 <a name="gnutls-x509-crt-set-key-purpose-oid.parameters"></a><h4>Parameters</h4>
12328 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12329 <colgroup>
12330 <col width="150px" class="parameters_name">
12331 <col class="parameters_description">
12332 <col width="200px" class="parameters_annotations">
12333 </colgroup>
12334 <tbody>
12335 <tr>
12336 <td class="parameter_name"><p>cert</p></td>
12337 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
12338 <td class="parameter_annotations"> </td>
12339 </tr>
12340 <tr>
12341 <td class="parameter_name"><p>oid</p></td>
12342 <td class="parameter_description"><p>a pointer to a null terminated string that holds the OID</p></td>
12343 <td class="parameter_annotations"> </td>
12344 </tr>
12345 <tr>
12346 <td class="parameter_name"><p>critical</p></td>
12347 <td class="parameter_description"><p>Whether this extension will be critical or not</p></td>
12348 <td class="parameter_annotations"> </td>
12349 </tr>
12350 </tbody>
12351 </table></div>
12352 </div>
12353 <div class="refsect3">
12354 <a name="gnutls-x509-crt-set-key-purpose-oid.returns"></a><h4>Returns</h4>
12355 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned,
12356 otherwise a negative error code is returned.</p>
12357 </div>
12358 </div>
12359 <hr>
12360 <div class="refsect2">
12361 <a name="gnutls-x509-crt-check-key-purpose"></a><h3>gnutls_x509_crt_check_key_purpose ()</h3>
12362 <pre class="programlisting"><span class="returnvalue">unsigned</span>
12363 gnutls_x509_crt_check_key_purpose (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
12364 <em class="parameter"><code>const <span class="type">char</span> *purpose</code></em>,
12365 <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre>
12366 <p>This function will check whether the given certificate matches
12367 the provided key purpose. If <em class="parameter"><code>flags</code></em>
12368 contains <code class="literal">GNUTLS_KP_FLAG_ALLOW_ANY</code> then
12369 it a certificate marked for any purpose will not match.</p>
12370 <div class="refsect3">
12371 <a name="gnutls-x509-crt-check-key-purpose.parameters"></a><h4>Parameters</h4>
12372 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12373 <colgroup>
12374 <col width="150px" class="parameters_name">
12375 <col class="parameters_description">
12376 <col width="200px" class="parameters_annotations">
12377 </colgroup>
12378 <tbody>
12379 <tr>
12380 <td class="parameter_name"><p>cert</p></td>
12381 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
12382 <td class="parameter_annotations"> </td>
12383 </tr>
12384 <tr>
12385 <td class="parameter_name"><p>purpose</p></td>
12386 <td class="parameter_description"><p>a key purpose OID (e.g., <a class="link" href="gnutls-x509.html#GNUTLS-KP-CODE-SIGNING:CAPS" title="GNUTLS_KP_CODE_SIGNING"><code class="literal">GNUTLS_KP_CODE_SIGNING</code></a>)</p></td>
12387 <td class="parameter_annotations"> </td>
12388 </tr>
12389 <tr>
12390 <td class="parameter_name"><p>flags</p></td>
12391 <td class="parameter_description"><p>zero or <a class="link" href="gnutls-x509.html#GNUTLS-KP-FLAG-DISALLOW-ANY:CAPS" title="GNUTLS_KP_FLAG_DISALLOW_ANY"><code class="literal">GNUTLS_KP_FLAG_DISALLOW_ANY</code></a></p></td>
12392 <td class="parameter_annotations"> </td>
12393 </tr>
12394 </tbody>
12395 </table></div>
12396 </div>
12397 <div class="refsect3">
12398 <a name="gnutls-x509-crt-check-key-purpose.returns"></a><h4>Returns</h4>
12399 <p> zero if the key purpose doesn't match, and non-zero otherwise.</p>
12400 </div>
12401 <p class="since">Since: 3.5.6</p>
12402 </div>
12403 <hr>
12404 <div class="refsect2">
12405 <a name="GNUTLS-PKCS-CIPHER-MASK:CAPS"></a><h3>GNUTLS_PKCS_CIPHER_MASK()</h3>
12406 <pre class="programlisting">#define GNUTLS_PKCS_CIPHER_MASK(x) ((x) &amp; (~(GNUTLS_PKCS_NULL_PASSWORD)))
12407 </pre>
12408 </div>
12409 <hr>
12410 <div class="refsect2">
12411 <a name="gnutls-pkcs-schema-get-name"></a><h3>gnutls_pkcs_schema_get_name ()</h3>
12412 <pre class="programlisting">const <span class="returnvalue">char</span> *
12413 gnutls_pkcs_schema_get_name (<em class="parameter"><code>unsigned <span class="type">int</span> schema</code></em>);</pre>
12414 <p>This function will return a human readable description of the
12415 PKCS12 or PBES2 schema.</p>
12416 <div class="refsect3">
12417 <a name="gnutls-pkcs-schema-get-name.parameters"></a><h4>Parameters</h4>
12418 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12419 <colgroup>
12420 <col width="150px" class="parameters_name">
12421 <col class="parameters_description">
12422 <col width="200px" class="parameters_annotations">
12423 </colgroup>
12424 <tbody><tr>
12425 <td class="parameter_name"><p>schema</p></td>
12426 <td class="parameter_description"><p>Holds the PKCS <span class="type">12</span> or PBES2 schema (<a class="link" href="gnutls-x509.html#gnutls-pkcs-encrypt-flags-t" title="enum gnutls_pkcs_encrypt_flags_t"><code class="literal">gnutls_pkcs_encrypt_flags_t</code></a>)</p></td>
12427 <td class="parameter_annotations"> </td>
12428 </tr></tbody>
12429 </table></div>
12430 </div>
12431 <div class="refsect3">
12432 <a name="gnutls-pkcs-schema-get-name.returns"></a><h4>Returns</h4>
12433 <p> a constraint string or <code class="literal">NULL</code> on error.</p>
12434 </div>
12435 <p class="since">Since: 3.4.0</p>
12436 </div>
12437 <hr>
12438 <div class="refsect2">
12439 <a name="gnutls-pkcs-schema-get-oid"></a><h3>gnutls_pkcs_schema_get_oid ()</h3>
12440 <pre class="programlisting">const <span class="returnvalue">char</span> *
12441 gnutls_pkcs_schema_get_oid (<em class="parameter"><code>unsigned <span class="type">int</span> schema</code></em>);</pre>
12442 <p>This function will return the object identifier of the
12443 PKCS12 or PBES2 schema.</p>
12444 <div class="refsect3">
12445 <a name="gnutls-pkcs-schema-get-oid.parameters"></a><h4>Parameters</h4>
12446 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12447 <colgroup>
12448 <col width="150px" class="parameters_name">
12449 <col class="parameters_description">
12450 <col width="200px" class="parameters_annotations">
12451 </colgroup>
12452 <tbody><tr>
12453 <td class="parameter_name"><p>schema</p></td>
12454 <td class="parameter_description"><p>Holds the PKCS <span class="type">12</span> or PBES2 schema (<a class="link" href="gnutls-x509.html#gnutls-pkcs-encrypt-flags-t" title="enum gnutls_pkcs_encrypt_flags_t"><code class="literal">gnutls_pkcs_encrypt_flags_t</code></a>)</p></td>
12455 <td class="parameter_annotations"> </td>
12456 </tr></tbody>
12457 </table></div>
12458 </div>
12459 <div class="refsect3">
12460 <a name="gnutls-pkcs-schema-get-oid.returns"></a><h4>Returns</h4>
12461 <p> a constraint string or <code class="literal">NULL</code> on error.</p>
12462 </div>
12463 <p class="since">Since: 3.4.0</p>
12464 </div>
12465 <hr>
12466 <div class="refsect2">
12467 <a name="gnutls-x509-privkey-init"></a><h3>gnutls_x509_privkey_init ()</h3>
12468 <pre class="programlisting"><span class="returnvalue">int</span>
12469 gnutls_x509_privkey_init (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> *key</code></em>);</pre>
12470 <p>This function will initialize a private key type.</p>
12471 <div class="refsect3">
12472 <a name="gnutls-x509-privkey-init.parameters"></a><h4>Parameters</h4>
12473 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12474 <colgroup>
12475 <col width="150px" class="parameters_name">
12476 <col class="parameters_description">
12477 <col width="200px" class="parameters_annotations">
12478 </colgroup>
12479 <tbody><tr>
12480 <td class="parameter_name"><p>key</p></td>
12481 <td class="parameter_description"><p>A pointer to the type to be initialized</p></td>
12482 <td class="parameter_annotations"> </td>
12483 </tr></tbody>
12484 </table></div>
12485 </div>
12486 <div class="refsect3">
12487 <a name="gnutls-x509-privkey-init.returns"></a><h4>Returns</h4>
12488 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
12489 negative error value.</p>
12490 </div>
12491 </div>
12492 <hr>
12493 <div class="refsect2">
12494 <a name="gnutls-x509-privkey-deinit"></a><h3>gnutls_x509_privkey_deinit ()</h3>
12495 <pre class="programlisting"><span class="returnvalue">void</span>
12496 gnutls_x509_privkey_deinit (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>);</pre>
12497 <p>This function will deinitialize a private key structure.</p>
12498 <div class="refsect3">
12499 <a name="gnutls-x509-privkey-deinit.parameters"></a><h4>Parameters</h4>
12500 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12501 <colgroup>
12502 <col width="150px" class="parameters_name">
12503 <col class="parameters_description">
12504 <col width="200px" class="parameters_annotations">
12505 </colgroup>
12506 <tbody><tr>
12507 <td class="parameter_name"><p>key</p></td>
12508 <td class="parameter_description"><p>The key to be deinitialized</p></td>
12509 <td class="parameter_annotations"> </td>
12510 </tr></tbody>
12511 </table></div>
12512 </div>
12513 </div>
12514 <hr>
12515 <div class="refsect2">
12516 <a name="gnutls-x509-privkey-sec-param"></a><h3>gnutls_x509_privkey_sec_param ()</h3>
12517 <pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-sec-param-t" title="enum gnutls_sec_param_t"><span class="returnvalue">gnutls_sec_param_t</span></a>
12518 gnutls_x509_privkey_sec_param (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>);</pre>
12519 <p>This function will return the security parameter appropriate with
12520 this private key.</p>
12521 <div class="refsect3">
12522 <a name="gnutls-x509-privkey-sec-param.parameters"></a><h4>Parameters</h4>
12523 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12524 <colgroup>
12525 <col width="150px" class="parameters_name">
12526 <col class="parameters_description">
12527 <col width="200px" class="parameters_annotations">
12528 </colgroup>
12529 <tbody><tr>
12530 <td class="parameter_name"><p>key</p></td>
12531 <td class="parameter_description"><p>a key</p></td>
12532 <td class="parameter_annotations"> </td>
12533 </tr></tbody>
12534 </table></div>
12535 </div>
12536 <div class="refsect3">
12537 <a name="gnutls-x509-privkey-sec-param.returns"></a><h4>Returns</h4>
12538 <p> On success, a valid security parameter is returned otherwise
12539 <a class="link" href="gnutls-gnutls.html#GNUTLS-SEC-PARAM-UNKNOWN:CAPS"><code class="literal">GNUTLS_SEC_PARAM_UNKNOWN</code></a> is returned.</p>
12540 </div>
12541 <p class="since">Since: 2.12.0</p>
12542 </div>
12543 <hr>
12544 <div class="refsect2">
12545 <a name="gnutls-x509-privkey-set-pin-function"></a><h3>gnutls_x509_privkey_set_pin_function ()</h3>
12546 <pre class="programlisting"><span class="returnvalue">void</span>
12547 gnutls_x509_privkey_set_pin_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
12548 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pin-callback-t" title="gnutls_pin_callback_t ()"><span class="type">gnutls_pin_callback_t</span></a> fn</code></em>,
12549 <em class="parameter"><code><span class="type">void</span> *userdata</code></em>);</pre>
12550 <p>This function will set a callback function to be used when
12551 it is required to access a protected object. This function overrides
12552 the global function set using <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-set-pin-function" title="gnutls_pkcs11_set_pin_function ()"><code class="function">gnutls_pkcs11_set_pin_function()</code></a>.</p>
12553 <p>Note that this callback is used when decrypting a key.</p>
12554 <div class="refsect3">
12555 <a name="gnutls-x509-privkey-set-pin-function.parameters"></a><h4>Parameters</h4>
12556 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12557 <colgroup>
12558 <col width="150px" class="parameters_name">
12559 <col class="parameters_description">
12560 <col width="200px" class="parameters_annotations">
12561 </colgroup>
12562 <tbody>
12563 <tr>
12564 <td class="parameter_name"><p>privkey</p></td>
12565 <td class="parameter_description"><p>The certificate structure</p></td>
12566 <td class="parameter_annotations"> </td>
12567 </tr>
12568 <tr>
12569 <td class="parameter_name"><p>fn</p></td>
12570 <td class="parameter_description"><p>the callback</p></td>
12571 <td class="parameter_annotations"> </td>
12572 </tr>
12573 <tr>
12574 <td class="parameter_name"><p>userdata</p></td>
12575 <td class="parameter_description"><p>data associated with the callback</p></td>
12576 <td class="parameter_annotations"> </td>
12577 </tr>
12578 </tbody>
12579 </table></div>
12580 </div>
12581 <p class="since">Since: 3.4.0</p>
12582 </div>
12583 <hr>
12584 <div class="refsect2">
12585 <a name="gnutls-x509-privkey-cpy"></a><h3>gnutls_x509_privkey_cpy ()</h3>
12586 <pre class="programlisting"><span class="returnvalue">int</span>
12587 gnutls_x509_privkey_cpy (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> dst</code></em>,
12588 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> src</code></em>);</pre>
12589 <p>This function will copy a private key from source to destination
12590 key. Destination has to be initialized.</p>
12591 <div class="refsect3">
12592 <a name="gnutls-x509-privkey-cpy.parameters"></a><h4>Parameters</h4>
12593 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12594 <colgroup>
12595 <col width="150px" class="parameters_name">
12596 <col class="parameters_description">
12597 <col width="200px" class="parameters_annotations">
12598 </colgroup>
12599 <tbody>
12600 <tr>
12601 <td class="parameter_name"><p>dst</p></td>
12602 <td class="parameter_description"><p>The destination key, which should be initialized.</p></td>
12603 <td class="parameter_annotations"> </td>
12604 </tr>
12605 <tr>
12606 <td class="parameter_name"><p>src</p></td>
12607 <td class="parameter_description"><p>The source key</p></td>
12608 <td class="parameter_annotations"> </td>
12609 </tr>
12610 </tbody>
12611 </table></div>
12612 </div>
12613 <div class="refsect3">
12614 <a name="gnutls-x509-privkey-cpy.returns"></a><h4>Returns</h4>
12615 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
12616 negative error value.</p>
12617 </div>
12618 </div>
12619 <hr>
12620 <div class="refsect2">
12621 <a name="gnutls-x509-privkey-import"></a><h3>gnutls_x509_privkey_import ()</h3>
12622 <pre class="programlisting"><span class="returnvalue">int</span>
12623 gnutls_x509_privkey_import (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
12624 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>,
12625 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>);</pre>
12626 <p>This function will convert the given DER or PEM encoded key to the
12627 native <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> format. The output will be stored in
12628 <em class="parameter"><code>key</code></em>
12629 .</p>
12630 <p>If the key is PEM encoded it should have a header that contains "PRIVATE
12631 KEY". Note that this function falls back to PKCS #8 decoding without
12632 password, if the default format fails to import.</p>
12633 <div class="refsect3">
12634 <a name="gnutls-x509-privkey-import.parameters"></a><h4>Parameters</h4>
12635 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12636 <colgroup>
12637 <col width="150px" class="parameters_name">
12638 <col class="parameters_description">
12639 <col width="200px" class="parameters_annotations">
12640 </colgroup>
12641 <tbody>
12642 <tr>
12643 <td class="parameter_name"><p>key</p></td>
12644 <td class="parameter_description"><p>The data to store the parsed key</p></td>
12645 <td class="parameter_annotations"> </td>
12646 </tr>
12647 <tr>
12648 <td class="parameter_name"><p>data</p></td>
12649 <td class="parameter_description"><p>The DER or PEM encoded certificate.</p></td>
12650 <td class="parameter_annotations"> </td>
12651 </tr>
12652 <tr>
12653 <td class="parameter_name"><p>format</p></td>
12654 <td class="parameter_description"><p>One of DER or PEM</p></td>
12655 <td class="parameter_annotations"> </td>
12656 </tr>
12657 </tbody>
12658 </table></div>
12659 </div>
12660 <div class="refsect3">
12661 <a name="gnutls-x509-privkey-import.returns"></a><h4>Returns</h4>
12662 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
12663 negative error value.</p>
12664 </div>
12665 </div>
12666 <hr>
12667 <div class="refsect2">
12668 <a name="gnutls-x509-privkey-import-pkcs8"></a><h3>gnutls_x509_privkey_import_pkcs8 ()</h3>
12669 <pre class="programlisting"><span class="returnvalue">int</span>
12670 gnutls_x509_privkey_import_pkcs8 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
12671 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>,
12672 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
12673 <em class="parameter"><code>const <span class="type">char</span> *password</code></em>,
12674 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
12675 <p>This function will convert the given DER or PEM encoded PKCS8 2.0
12676 encrypted key to the native gnutls_x509_privkey_t format. The
12677 output will be stored in <em class="parameter"><code>key</code></em>
12678 . Both RSA and DSA keys can be
12679 imported, and flags can only be used to indicate an unencrypted
12680 key.</p>
12681 <p>The <em class="parameter"><code>password</code></em>
12682 can be either ASCII or UTF-8 in the default PBES2
12683 encryption schemas, or ASCII for the PKCS12 schemas.</p>
12684 <p>If the Certificate is PEM encoded it should have a header of
12685 "ENCRYPTED PRIVATE KEY", or "PRIVATE KEY". You only need to
12686 specify the flags if the key is DER encoded, since in that case
12687 the encryption status cannot be auto-detected.</p>
12688 <p>If the <a class="link" href="gnutls-x509.html#GNUTLS-PKCS-PLAIN:CAPS"><code class="literal">GNUTLS_PKCS_PLAIN</code></a> flag is specified and the supplied data
12689 are encrypted then <a class="link" href="gnutls-gnutls.html#GNUTLS-E-DECRYPTION-FAILED:CAPS" title="GNUTLS_E_DECRYPTION_FAILED"><code class="literal">GNUTLS_E_DECRYPTION_FAILED</code></a> is returned.</p>
12690 <div class="refsect3">
12691 <a name="gnutls-x509-privkey-import-pkcs8.parameters"></a><h4>Parameters</h4>
12692 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12693 <colgroup>
12694 <col width="150px" class="parameters_name">
12695 <col class="parameters_description">
12696 <col width="200px" class="parameters_annotations">
12697 </colgroup>
12698 <tbody>
12699 <tr>
12700 <td class="parameter_name"><p>key</p></td>
12701 <td class="parameter_description"><p>The data to store the parsed key</p></td>
12702 <td class="parameter_annotations"> </td>
12703 </tr>
12704 <tr>
12705 <td class="parameter_name"><p>data</p></td>
12706 <td class="parameter_description"><p>The DER or PEM encoded key.</p></td>
12707 <td class="parameter_annotations"> </td>
12708 </tr>
12709 <tr>
12710 <td class="parameter_name"><p>format</p></td>
12711 <td class="parameter_description"><p>One of DER or PEM</p></td>
12712 <td class="parameter_annotations"> </td>
12713 </tr>
12714 <tr>
12715 <td class="parameter_name"><p>password</p></td>
12716 <td class="parameter_description"><p>the password to decrypt the key (if it is encrypted).</p></td>
12717 <td class="parameter_annotations"> </td>
12718 </tr>
12719 <tr>
12720 <td class="parameter_name"><p>flags</p></td>
12721 <td class="parameter_description"><p>0 if encrypted or GNUTLS_PKCS_PLAIN if not encrypted.</p></td>
12722 <td class="parameter_annotations"> </td>
12723 </tr>
12724 </tbody>
12725 </table></div>
12726 </div>
12727 <div class="refsect3">
12728 <a name="gnutls-x509-privkey-import-pkcs8.returns"></a><h4>Returns</h4>
12729 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
12730 negative error value.</p>
12731 </div>
12732 </div>
12733 <hr>
12734 <div class="refsect2">
12735 <a name="gnutls-x509-privkey-import-openssl"></a><h3>gnutls_x509_privkey_import_openssl ()</h3>
12736 <pre class="programlisting"><span class="returnvalue">int</span>
12737 gnutls_x509_privkey_import_openssl (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
12738 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>,
12739 <em class="parameter"><code>const <span class="type">char</span> *password</code></em>);</pre>
12740 <p>This function will convert the given PEM encrypted to
12741 the native gnutls_x509_privkey_t format. The
12742 output will be stored in <em class="parameter"><code>key</code></em>
12743 . </p>
12744 <p>The <em class="parameter"><code>password</code></em>
12745 should be in ASCII. If the password is not provided
12746 or wrong then <a class="link" href="gnutls-gnutls.html#GNUTLS-E-DECRYPTION-FAILED:CAPS" title="GNUTLS_E_DECRYPTION_FAILED"><code class="literal">GNUTLS_E_DECRYPTION_FAILED</code></a> will be returned.</p>
12747 <p>If the Certificate is PEM encoded it should have a header of
12748 "PRIVATE KEY" and the "DEK-Info" header.</p>
12749 <div class="refsect3">
12750 <a name="gnutls-x509-privkey-import-openssl.parameters"></a><h4>Parameters</h4>
12751 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12752 <colgroup>
12753 <col width="150px" class="parameters_name">
12754 <col class="parameters_description">
12755 <col width="200px" class="parameters_annotations">
12756 </colgroup>
12757 <tbody>
12758 <tr>
12759 <td class="parameter_name"><p>key</p></td>
12760 <td class="parameter_description"><p>The data to store the parsed key</p></td>
12761 <td class="parameter_annotations"> </td>
12762 </tr>
12763 <tr>
12764 <td class="parameter_name"><p>data</p></td>
12765 <td class="parameter_description"><p>The DER or PEM encoded key.</p></td>
12766 <td class="parameter_annotations"> </td>
12767 </tr>
12768 <tr>
12769 <td class="parameter_name"><p>password</p></td>
12770 <td class="parameter_description"><p>the password to decrypt the key (if it is encrypted).</p></td>
12771 <td class="parameter_annotations"> </td>
12772 </tr>
12773 </tbody>
12774 </table></div>
12775 </div>
12776 <div class="refsect3">
12777 <a name="gnutls-x509-privkey-import-openssl.returns"></a><h4>Returns</h4>
12778 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
12779 negative error value.</p>
12780 </div>
12781 </div>
12782 <hr>
12783 <div class="refsect2">
12784 <a name="gnutls-pkcs8-info"></a><h3>gnutls_pkcs8_info ()</h3>
12785 <pre class="programlisting"><span class="returnvalue">int</span>
12786 gnutls_pkcs8_info (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>,
12787 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
12788 <em class="parameter"><code>unsigned <span class="type">int</span> *schema</code></em>,
12789 <em class="parameter"><code>unsigned <span class="type">int</span> *cipher</code></em>,
12790 <em class="parameter"><code><span class="type">void</span> *salt</code></em>,
12791 <em class="parameter"><code>unsigned <span class="type">int</span> *salt_size</code></em>,
12792 <em class="parameter"><code>unsigned <span class="type">int</span> *iter_count</code></em>,
12793 <em class="parameter"><code><span class="type">char</span> **oid</code></em>);</pre>
12794 <p>This function will provide information on the algorithms used
12795 in a particular PKCS #8 structure. If the structure algorithms
12796 are unknown the code <a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNKNOWN-CIPHER-TYPE:CAPS" title="GNUTLS_E_UNKNOWN_CIPHER_TYPE"><code class="literal">GNUTLS_E_UNKNOWN_CIPHER_TYPE</code></a> will be returned,
12797 and only <em class="parameter"><code>oid</code></em>
12798 , will be set. That is, <em class="parameter"><code>oid</code></em>
12799 will be set on encrypted PKCS #8
12800 structures whether supported or not. It must be deinitialized using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.
12801 The other variables are only set on supported structures.</p>
12802 <div class="refsect3">
12803 <a name="gnutls-pkcs8-info.parameters"></a><h4>Parameters</h4>
12804 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12805 <colgroup>
12806 <col width="150px" class="parameters_name">
12807 <col class="parameters_description">
12808 <col width="200px" class="parameters_annotations">
12809 </colgroup>
12810 <tbody>
12811 <tr>
12812 <td class="parameter_name"><p>data</p></td>
12813 <td class="parameter_description"><p>Holds the PKCS #8 data</p></td>
12814 <td class="parameter_annotations"> </td>
12815 </tr>
12816 <tr>
12817 <td class="parameter_name"><p>format</p></td>
12818 <td class="parameter_description"><p>the format of the PKCS #8 data</p></td>
12819 <td class="parameter_annotations"> </td>
12820 </tr>
12821 <tr>
12822 <td class="parameter_name"><p>schema</p></td>
12823 <td class="parameter_description"><p>indicate the schema as one of <a class="link" href="gnutls-x509.html#gnutls-pkcs-encrypt-flags-t" title="enum gnutls_pkcs_encrypt_flags_t"><code class="literal">gnutls_pkcs_encrypt_flags_t</code></a></p></td>
12824 <td class="parameter_annotations"> </td>
12825 </tr>
12826 <tr>
12827 <td class="parameter_name"><p>cipher</p></td>
12828 <td class="parameter_description"><p>the cipher used as <a class="link" href="gnutls-gnutls.html#gnutls-cipher-algorithm-t" title="enum gnutls_cipher_algorithm_t"><code class="literal">gnutls_cipher_algorithm_t</code></a></p></td>
12829 <td class="parameter_annotations"> </td>
12830 </tr>
12831 <tr>
12832 <td class="parameter_name"><p>salt</p></td>
12833 <td class="parameter_description"><p>PBKDF2 salt (if non-NULL then <em class="parameter"><code>salt_size</code></em>
12834 initially holds its size)</p></td>
12835 <td class="parameter_annotations"> </td>
12836 </tr>
12837 <tr>
12838 <td class="parameter_name"><p>salt_size</p></td>
12839 <td class="parameter_description"><p>PBKDF2 salt size</p></td>
12840 <td class="parameter_annotations"> </td>
12841 </tr>
12842 <tr>
12843 <td class="parameter_name"><p>iter_count</p></td>
12844 <td class="parameter_description"><p>PBKDF2 iteration count</p></td>
12845 <td class="parameter_annotations"> </td>
12846 </tr>
12847 <tr>
12848 <td class="parameter_name"><p>oid</p></td>
12849 <td class="parameter_description"><p>if non-NULL it will contain an allocated null-terminated variable with the OID</p></td>
12850 <td class="parameter_annotations"> </td>
12851 </tr>
12852 </tbody>
12853 </table></div>
12854 </div>
12855 <div class="refsect3">
12856 <a name="gnutls-pkcs8-info.returns"></a><h4>Returns</h4>
12857 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a> if the provided structure isn't an encrypted key,
12858 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNKNOWN-CIPHER-TYPE:CAPS" title="GNUTLS_E_UNKNOWN_CIPHER_TYPE"><code class="literal">GNUTLS_E_UNKNOWN_CIPHER_TYPE</code></a> if the structure's encryption isn't supported, or
12859 another negative error code in case of a failure. Zero on success.</p>
12860 </div>
12861 <p class="since">Since: 3.4.0</p>
12862 </div>
12863 <hr>
12864 <div class="refsect2">
12865 <a name="gnutls-x509-privkey-import2"></a><h3>gnutls_x509_privkey_import2 ()</h3>
12866 <pre class="programlisting"><span class="returnvalue">int</span>
12867 gnutls_x509_privkey_import2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
12868 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>,
12869 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
12870 <em class="parameter"><code>const <span class="type">char</span> *password</code></em>,
12871 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
12872 <p>This function will import the given DER or PEM encoded key, to
12873 the native <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> format, irrespective of the
12874 input format. The input format is auto-detected.</p>
12875 <p>The supported formats are basic unencrypted key, PKCS8, PKCS12,
12876 and the openssl format.</p>
12877 <p>If the provided key is encrypted but no password was given, then
12878 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-DECRYPTION-FAILED:CAPS" title="GNUTLS_E_DECRYPTION_FAILED"><code class="literal">GNUTLS_E_DECRYPTION_FAILED</code></a> is returned. Since GnuTLS 3.4.0 this
12879 function will utilize the PIN callbacks if any.</p>
12880 <div class="refsect3">
12881 <a name="gnutls-x509-privkey-import2.parameters"></a><h4>Parameters</h4>
12882 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12883 <colgroup>
12884 <col width="150px" class="parameters_name">
12885 <col class="parameters_description">
12886 <col width="200px" class="parameters_annotations">
12887 </colgroup>
12888 <tbody>
12889 <tr>
12890 <td class="parameter_name"><p>key</p></td>
12891 <td class="parameter_description"><p>The data to store the parsed key</p></td>
12892 <td class="parameter_annotations"> </td>
12893 </tr>
12894 <tr>
12895 <td class="parameter_name"><p>data</p></td>
12896 <td class="parameter_description"><p>The DER or PEM encoded key.</p></td>
12897 <td class="parameter_annotations"> </td>
12898 </tr>
12899 <tr>
12900 <td class="parameter_name"><p>format</p></td>
12901 <td class="parameter_description"><p>One of DER or PEM</p></td>
12902 <td class="parameter_annotations"> </td>
12903 </tr>
12904 <tr>
12905 <td class="parameter_name"><p>password</p></td>
12906 <td class="parameter_description"><p>A password (optional)</p></td>
12907 <td class="parameter_annotations"> </td>
12908 </tr>
12909 <tr>
12910 <td class="parameter_name"><p>flags</p></td>
12911 <td class="parameter_description"><p>an ORed sequence of gnutls_pkcs_encrypt_flags_t</p></td>
12912 <td class="parameter_annotations"> </td>
12913 </tr>
12914 </tbody>
12915 </table></div>
12916 </div>
12917 <div class="refsect3">
12918 <a name="gnutls-x509-privkey-import2.returns"></a><h4>Returns</h4>
12919 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
12920 negative error value.</p>
12921 </div>
12922 </div>
12923 <hr>
12924 <div class="refsect2">
12925 <a name="gnutls-x509-privkey-import-rsa-raw"></a><h3>gnutls_x509_privkey_import_rsa_raw ()</h3>
12926 <pre class="programlisting"><span class="returnvalue">int</span>
12927 gnutls_x509_privkey_import_rsa_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
12928 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *m</code></em>,
12929 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *e</code></em>,
12930 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *d</code></em>,
12931 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *p</code></em>,
12932 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *q</code></em>,
12933 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *u</code></em>);</pre>
12934 <p>This function will convert the given RSA raw parameters to the
12935 native <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> format. The output will be stored in
12936 <em class="parameter"><code>key</code></em>
12937 .</p>
12938 <div class="refsect3">
12939 <a name="gnutls-x509-privkey-import-rsa-raw.parameters"></a><h4>Parameters</h4>
12940 <div class="informaltable"><table class="informaltable" width="100%" border="0">
12941 <colgroup>
12942 <col width="150px" class="parameters_name">
12943 <col class="parameters_description">
12944 <col width="200px" class="parameters_annotations">
12945 </colgroup>
12946 <tbody>
12947 <tr>
12948 <td class="parameter_name"><p>key</p></td>
12949 <td class="parameter_description"><p>The data to store the parsed key</p></td>
12950 <td class="parameter_annotations"> </td>
12951 </tr>
12952 <tr>
12953 <td class="parameter_name"><p>m</p></td>
12954 <td class="parameter_description"><p>holds the modulus</p></td>
12955 <td class="parameter_annotations"> </td>
12956 </tr>
12957 <tr>
12958 <td class="parameter_name"><p>e</p></td>
12959 <td class="parameter_description"><p>holds the public exponent</p></td>
12960 <td class="parameter_annotations"> </td>
12961 </tr>
12962 <tr>
12963 <td class="parameter_name"><p>d</p></td>
12964 <td class="parameter_description"><p>holds the private exponent</p></td>
12965 <td class="parameter_annotations"> </td>
12966 </tr>
12967 <tr>
12968 <td class="parameter_name"><p>p</p></td>
12969 <td class="parameter_description"><p>holds the first prime (p)</p></td>
12970 <td class="parameter_annotations"> </td>
12971 </tr>
12972 <tr>
12973 <td class="parameter_name"><p>q</p></td>
12974 <td class="parameter_description"><p>holds the second prime (q)</p></td>
12975 <td class="parameter_annotations"> </td>
12976 </tr>
12977 <tr>
12978 <td class="parameter_name"><p>u</p></td>
12979 <td class="parameter_description"><p>holds the coefficient</p></td>
12980 <td class="parameter_annotations"> </td>
12981 </tr>
12982 </tbody>
12983 </table></div>
12984 </div>
12985 <div class="refsect3">
12986 <a name="gnutls-x509-privkey-import-rsa-raw.returns"></a><h4>Returns</h4>
12987 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
12988 negative error value.</p>
12989 </div>
12990 </div>
12991 <hr>
12992 <div class="refsect2">
12993 <a name="gnutls-x509-privkey-import-rsa-raw2"></a><h3>gnutls_x509_privkey_import_rsa_raw2 ()</h3>
12994 <pre class="programlisting"><span class="returnvalue">int</span>
12995 gnutls_x509_privkey_import_rsa_raw2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
12996 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *m</code></em>,
12997 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *e</code></em>,
12998 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *d</code></em>,
12999 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *p</code></em>,
13000 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *q</code></em>,
13001 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *u</code></em>,
13002 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *e1</code></em>,
13003 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *e2</code></em>);</pre>
13004 <p>This function will convert the given RSA raw parameters to the
13005 native <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> format. The output will be stored in
13006 <em class="parameter"><code>key</code></em>
13007 .</p>
13008 <div class="refsect3">
13009 <a name="gnutls-x509-privkey-import-rsa-raw2.parameters"></a><h4>Parameters</h4>
13010 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13011 <colgroup>
13012 <col width="150px" class="parameters_name">
13013 <col class="parameters_description">
13014 <col width="200px" class="parameters_annotations">
13015 </colgroup>
13016 <tbody>
13017 <tr>
13018 <td class="parameter_name"><p>key</p></td>
13019 <td class="parameter_description"><p>The data to store the parsed key</p></td>
13020 <td class="parameter_annotations"> </td>
13021 </tr>
13022 <tr>
13023 <td class="parameter_name"><p>m</p></td>
13024 <td class="parameter_description"><p>holds the modulus</p></td>
13025 <td class="parameter_annotations"> </td>
13026 </tr>
13027 <tr>
13028 <td class="parameter_name"><p>e</p></td>
13029 <td class="parameter_description"><p>holds the public exponent</p></td>
13030 <td class="parameter_annotations"> </td>
13031 </tr>
13032 <tr>
13033 <td class="parameter_name"><p>d</p></td>
13034 <td class="parameter_description"><p>holds the private exponent</p></td>
13035 <td class="parameter_annotations"> </td>
13036 </tr>
13037 <tr>
13038 <td class="parameter_name"><p>p</p></td>
13039 <td class="parameter_description"><p>holds the first prime (p)</p></td>
13040 <td class="parameter_annotations"> </td>
13041 </tr>
13042 <tr>
13043 <td class="parameter_name"><p>q</p></td>
13044 <td class="parameter_description"><p>holds the second prime (q)</p></td>
13045 <td class="parameter_annotations"> </td>
13046 </tr>
13047 <tr>
13048 <td class="parameter_name"><p>u</p></td>
13049 <td class="parameter_description"><p>holds the coefficient (optional)</p></td>
13050 <td class="parameter_annotations"> </td>
13051 </tr>
13052 <tr>
13053 <td class="parameter_name"><p>e1</p></td>
13054 <td class="parameter_description"><p>holds e1 = d mod (p-1) (optional)</p></td>
13055 <td class="parameter_annotations"> </td>
13056 </tr>
13057 <tr>
13058 <td class="parameter_name"><p>e2</p></td>
13059 <td class="parameter_description"><p>holds e2 = d mod (q-1) (optional)</p></td>
13060 <td class="parameter_annotations"> </td>
13061 </tr>
13062 </tbody>
13063 </table></div>
13064 </div>
13065 <div class="refsect3">
13066 <a name="gnutls-x509-privkey-import-rsa-raw2.returns"></a><h4>Returns</h4>
13067 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
13068 negative error value.</p>
13069 </div>
13070 </div>
13071 <hr>
13072 <div class="refsect2">
13073 <a name="gnutls-x509-privkey-import-ecc-raw"></a><h3>gnutls_x509_privkey_import_ecc_raw ()</h3>
13074 <pre class="programlisting"><span class="returnvalue">int</span>
13075 gnutls_x509_privkey_import_ecc_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
13076 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ecc-curve-t" title="enum gnutls_ecc_curve_t"><span class="type">gnutls_ecc_curve_t</span></a> curve</code></em>,
13077 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *x</code></em>,
13078 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *y</code></em>,
13079 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *k</code></em>);</pre>
13080 <p>This function will convert the given elliptic curve parameters to the
13081 native <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> format. The output will be stored
13082 in <em class="parameter"><code>key</code></em>
13083 . For EdDSA keys, the <em class="parameter"><code>x</code></em>
13084 and <em class="parameter"><code>k</code></em>
13085 values must be in the
13086 native to curve format.</p>
13087 <div class="refsect3">
13088 <a name="gnutls-x509-privkey-import-ecc-raw.parameters"></a><h4>Parameters</h4>
13089 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13090 <colgroup>
13091 <col width="150px" class="parameters_name">
13092 <col class="parameters_description">
13093 <col width="200px" class="parameters_annotations">
13094 </colgroup>
13095 <tbody>
13096 <tr>
13097 <td class="parameter_name"><p>key</p></td>
13098 <td class="parameter_description"><p>The data to store the parsed key</p></td>
13099 <td class="parameter_annotations"> </td>
13100 </tr>
13101 <tr>
13102 <td class="parameter_name"><p>curve</p></td>
13103 <td class="parameter_description"><p>holds the curve</p></td>
13104 <td class="parameter_annotations"> </td>
13105 </tr>
13106 <tr>
13107 <td class="parameter_name"><p>x</p></td>
13108 <td class="parameter_description"><p>holds the x-coordinate</p></td>
13109 <td class="parameter_annotations"> </td>
13110 </tr>
13111 <tr>
13112 <td class="parameter_name"><p>y</p></td>
13113 <td class="parameter_description"><p>holds the y-coordinate</p></td>
13114 <td class="parameter_annotations"> </td>
13115 </tr>
13116 <tr>
13117 <td class="parameter_name"><p>k</p></td>
13118 <td class="parameter_description"><p>holds the k</p></td>
13119 <td class="parameter_annotations"> </td>
13120 </tr>
13121 </tbody>
13122 </table></div>
13123 </div>
13124 <div class="refsect3">
13125 <a name="gnutls-x509-privkey-import-ecc-raw.returns"></a><h4>Returns</h4>
13126 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
13127 negative error value.</p>
13128 </div>
13129 <p class="since">Since: 3.0</p>
13130 </div>
13131 <hr>
13132 <div class="refsect2">
13133 <a name="gnutls-x509-privkey-import-gost-raw"></a><h3>gnutls_x509_privkey_import_gost_raw ()</h3>
13134 <pre class="programlisting"><span class="returnvalue">int</span>
13135 gnutls_x509_privkey_import_gost_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
13136 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ecc-curve-t" title="enum gnutls_ecc_curve_t"><span class="type">gnutls_ecc_curve_t</span></a> curve</code></em>,
13137 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> digest</code></em>,
13138 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-gost-paramset-t" title="enum gnutls_gost_paramset_t"><span class="type">gnutls_gost_paramset_t</span></a> paramset</code></em>,
13139 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *x</code></em>,
13140 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *y</code></em>,
13141 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *k</code></em>);</pre>
13142 <p>This function will convert the given GOST private key's parameters to the
13143 native <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> format. The output will be stored
13144 in <em class="parameter"><code>key</code></em>
13145 . <em class="parameter"><code>digest</code></em>
13146 should be one of GNUTLS_DIG_GOSR_94,
13147 GNUTLS_DIG_STREEBOG_256 or GNUTLS_DIG_STREEBOG_512. If <em class="parameter"><code>paramset</code></em>
13148 is set to
13149 GNUTLS_GOST_PARAMSET_UNKNOWN default one will be selected depending on
13150 <em class="parameter"><code>digest</code></em>
13151 .</p>
13152 <p>Note: parameters should be stored with least significant byte first. On
13153 version 3.6.3 big-endian format was used incorrectly.</p>
13154 <div class="refsect3">
13155 <a name="gnutls-x509-privkey-import-gost-raw.parameters"></a><h4>Parameters</h4>
13156 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13157 <colgroup>
13158 <col width="150px" class="parameters_name">
13159 <col class="parameters_description">
13160 <col width="200px" class="parameters_annotations">
13161 </colgroup>
13162 <tbody>
13163 <tr>
13164 <td class="parameter_name"><p>key</p></td>
13165 <td class="parameter_description"><p>The data to store the parsed key</p></td>
13166 <td class="parameter_annotations"> </td>
13167 </tr>
13168 <tr>
13169 <td class="parameter_name"><p>curve</p></td>
13170 <td class="parameter_description"><p>holds the curve</p></td>
13171 <td class="parameter_annotations"> </td>
13172 </tr>
13173 <tr>
13174 <td class="parameter_name"><p>digest</p></td>
13175 <td class="parameter_description"><p>will hold the digest</p></td>
13176 <td class="parameter_annotations"> </td>
13177 </tr>
13178 <tr>
13179 <td class="parameter_name"><p>paramset</p></td>
13180 <td class="parameter_description"><p>will hold the GOST parameter set ID</p></td>
13181 <td class="parameter_annotations"> </td>
13182 </tr>
13183 <tr>
13184 <td class="parameter_name"><p>x</p></td>
13185 <td class="parameter_description"><p>holds the x-coordinate</p></td>
13186 <td class="parameter_annotations"> </td>
13187 </tr>
13188 <tr>
13189 <td class="parameter_name"><p>y</p></td>
13190 <td class="parameter_description"><p>holds the y-coordinate</p></td>
13191 <td class="parameter_annotations"> </td>
13192 </tr>
13193 <tr>
13194 <td class="parameter_name"><p>k</p></td>
13195 <td class="parameter_description"><p>holds the k (private key)</p></td>
13196 <td class="parameter_annotations"> </td>
13197 </tr>
13198 </tbody>
13199 </table></div>
13200 </div>
13201 <div class="refsect3">
13202 <a name="gnutls-x509-privkey-import-gost-raw.returns"></a><h4>Returns</h4>
13203 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
13204 negative error value.</p>
13205 </div>
13206 <p class="since">Since: 3.6.3</p>
13207 </div>
13208 <hr>
13209 <div class="refsect2">
13210 <a name="gnutls-x509-privkey-fix"></a><h3>gnutls_x509_privkey_fix ()</h3>
13211 <pre class="programlisting"><span class="returnvalue">int</span>
13212 gnutls_x509_privkey_fix (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>);</pre>
13213 <p>This function will recalculate the secondary parameters in a key.
13214 In RSA keys, this can be the coefficient and exponent1,2.</p>
13215 <div class="refsect3">
13216 <a name="gnutls-x509-privkey-fix.parameters"></a><h4>Parameters</h4>
13217 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13218 <colgroup>
13219 <col width="150px" class="parameters_name">
13220 <col class="parameters_description">
13221 <col width="200px" class="parameters_annotations">
13222 </colgroup>
13223 <tbody><tr>
13224 <td class="parameter_name"><p>key</p></td>
13225 <td class="parameter_description"><p>a key</p></td>
13226 <td class="parameter_annotations"> </td>
13227 </tr></tbody>
13228 </table></div>
13229 </div>
13230 <div class="refsect3">
13231 <a name="gnutls-x509-privkey-fix.returns"></a><h4>Returns</h4>
13232 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
13233 negative error value.</p>
13234 </div>
13235 </div>
13236 <hr>
13237 <div class="refsect2">
13238 <a name="gnutls-x509-privkey-export-dsa-raw"></a><h3>gnutls_x509_privkey_export_dsa_raw ()</h3>
13239 <pre class="programlisting"><span class="returnvalue">int</span>
13240 gnutls_x509_privkey_export_dsa_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
13241 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *p</code></em>,
13242 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *q</code></em>,
13243 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *g</code></em>,
13244 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *y</code></em>,
13245 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *x</code></em>);</pre>
13246 <p>This function will export the DSA private key's parameters found
13247 in the given structure. The new parameters will be allocated using
13248 <code class="function">gnutls_malloc()</code> and will be stored in the appropriate datum.</p>
13249 <div class="refsect3">
13250 <a name="gnutls-x509-privkey-export-dsa-raw.parameters"></a><h4>Parameters</h4>
13251 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13252 <colgroup>
13253 <col width="150px" class="parameters_name">
13254 <col class="parameters_description">
13255 <col width="200px" class="parameters_annotations">
13256 </colgroup>
13257 <tbody>
13258 <tr>
13259 <td class="parameter_name"><p>key</p></td>
13260 <td class="parameter_description"><p>a key</p></td>
13261 <td class="parameter_annotations"> </td>
13262 </tr>
13263 <tr>
13264 <td class="parameter_name"><p>p</p></td>
13265 <td class="parameter_description"><p>will hold the p</p></td>
13266 <td class="parameter_annotations"> </td>
13267 </tr>
13268 <tr>
13269 <td class="parameter_name"><p>q</p></td>
13270 <td class="parameter_description"><p>will hold the q</p></td>
13271 <td class="parameter_annotations"> </td>
13272 </tr>
13273 <tr>
13274 <td class="parameter_name"><p>g</p></td>
13275 <td class="parameter_description"><p>will hold the g</p></td>
13276 <td class="parameter_annotations"> </td>
13277 </tr>
13278 <tr>
13279 <td class="parameter_name"><p>y</p></td>
13280 <td class="parameter_description"><p>will hold the y</p></td>
13281 <td class="parameter_annotations"> </td>
13282 </tr>
13283 <tr>
13284 <td class="parameter_name"><p>x</p></td>
13285 <td class="parameter_description"><p>will hold the x</p></td>
13286 <td class="parameter_annotations"> </td>
13287 </tr>
13288 </tbody>
13289 </table></div>
13290 </div>
13291 <div class="refsect3">
13292 <a name="gnutls-x509-privkey-export-dsa-raw.returns"></a><h4>Returns</h4>
13293 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
13294 negative error value.</p>
13295 </div>
13296 </div>
13297 <hr>
13298 <div class="refsect2">
13299 <a name="gnutls-x509-privkey-import-dsa-raw"></a><h3>gnutls_x509_privkey_import_dsa_raw ()</h3>
13300 <pre class="programlisting"><span class="returnvalue">int</span>
13301 gnutls_x509_privkey_import_dsa_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
13302 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *p</code></em>,
13303 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *q</code></em>,
13304 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *g</code></em>,
13305 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *y</code></em>,
13306 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *x</code></em>);</pre>
13307 <p>This function will convert the given DSA raw parameters to the
13308 native <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> format. The output will be stored
13309 in <em class="parameter"><code>key</code></em>
13310 .</p>
13311 <div class="refsect3">
13312 <a name="gnutls-x509-privkey-import-dsa-raw.parameters"></a><h4>Parameters</h4>
13313 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13314 <colgroup>
13315 <col width="150px" class="parameters_name">
13316 <col class="parameters_description">
13317 <col width="200px" class="parameters_annotations">
13318 </colgroup>
13319 <tbody>
13320 <tr>
13321 <td class="parameter_name"><p>key</p></td>
13322 <td class="parameter_description"><p>The data to store the parsed key</p></td>
13323 <td class="parameter_annotations"> </td>
13324 </tr>
13325 <tr>
13326 <td class="parameter_name"><p>p</p></td>
13327 <td class="parameter_description"><p>holds the p</p></td>
13328 <td class="parameter_annotations"> </td>
13329 </tr>
13330 <tr>
13331 <td class="parameter_name"><p>q</p></td>
13332 <td class="parameter_description"><p>holds the q</p></td>
13333 <td class="parameter_annotations"> </td>
13334 </tr>
13335 <tr>
13336 <td class="parameter_name"><p>g</p></td>
13337 <td class="parameter_description"><p>holds the g</p></td>
13338 <td class="parameter_annotations"> </td>
13339 </tr>
13340 <tr>
13341 <td class="parameter_name"><p>y</p></td>
13342 <td class="parameter_description"><p>holds the y (optional)</p></td>
13343 <td class="parameter_annotations"> </td>
13344 </tr>
13345 <tr>
13346 <td class="parameter_name"><p>x</p></td>
13347 <td class="parameter_description"><p>holds the x</p></td>
13348 <td class="parameter_annotations"> </td>
13349 </tr>
13350 </tbody>
13351 </table></div>
13352 </div>
13353 <div class="refsect3">
13354 <a name="gnutls-x509-privkey-import-dsa-raw.returns"></a><h4>Returns</h4>
13355 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
13356 negative error value.</p>
13357 </div>
13358 </div>
13359 <hr>
13360 <div class="refsect2">
13361 <a name="gnutls-x509-privkey-import-dh-raw"></a><h3>gnutls_x509_privkey_import_dh_raw ()</h3>
13362 <pre class="programlisting"><span class="returnvalue">int</span>
13363 gnutls_x509_privkey_import_dh_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
13364 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> params</code></em>,
13365 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *y</code></em>,
13366 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *x</code></em>);</pre>
13367 <p>This function will convert the given Diffie-Hellman raw parameters
13368 to the native <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> format. The output will be
13369 stored in <em class="parameter"><code>key</code></em>
13370 .</p>
13371 <div class="refsect3">
13372 <a name="gnutls-x509-privkey-import-dh-raw.parameters"></a><h4>Parameters</h4>
13373 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13374 <colgroup>
13375 <col width="150px" class="parameters_name">
13376 <col class="parameters_description">
13377 <col width="200px" class="parameters_annotations">
13378 </colgroup>
13379 <tbody>
13380 <tr>
13381 <td class="parameter_name"><p>key</p></td>
13382 <td class="parameter_description"><p>The data to store the parsed key</p></td>
13383 <td class="parameter_annotations"> </td>
13384 </tr>
13385 <tr>
13386 <td class="parameter_name"><p>params</p></td>
13387 <td class="parameter_description"><p>holds the <a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><code class="literal">gnutls_dh_params_t</code></a></p></td>
13388 <td class="parameter_annotations"> </td>
13389 </tr>
13390 <tr>
13391 <td class="parameter_name"><p>y</p></td>
13392 <td class="parameter_description"><p>holds the y (optional)</p></td>
13393 <td class="parameter_annotations"> </td>
13394 </tr>
13395 <tr>
13396 <td class="parameter_name"><p>x</p></td>
13397 <td class="parameter_description"><p>holds the x</p></td>
13398 <td class="parameter_annotations"> </td>
13399 </tr>
13400 </tbody>
13401 </table></div>
13402 </div>
13403 <div class="refsect3">
13404 <a name="gnutls-x509-privkey-import-dh-raw.returns"></a><h4>Returns</h4>
13405 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
13406 negative error value.</p>
13407 </div>
13408 </div>
13409 <hr>
13410 <div class="refsect2">
13411 <a name="gnutls-x509-privkey-get-pk-algorithm"></a><h3>gnutls_x509_privkey_get_pk_algorithm ()</h3>
13412 <pre class="programlisting"><span class="returnvalue">int</span>
13413 gnutls_x509_privkey_get_pk_algorithm (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>);</pre>
13414 <p>This function will return the public key algorithm of a private
13415 key.</p>
13416 <div class="refsect3">
13417 <a name="gnutls-x509-privkey-get-pk-algorithm.parameters"></a><h4>Parameters</h4>
13418 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13419 <colgroup>
13420 <col width="150px" class="parameters_name">
13421 <col class="parameters_description">
13422 <col width="200px" class="parameters_annotations">
13423 </colgroup>
13424 <tbody><tr>
13425 <td class="parameter_name"><p>key</p></td>
13426 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> type</p></td>
13427 <td class="parameter_annotations"> </td>
13428 </tr></tbody>
13429 </table></div>
13430 </div>
13431 <div class="refsect3">
13432 <a name="gnutls-x509-privkey-get-pk-algorithm.returns"></a><h4>Returns</h4>
13433 <p> a member of the <a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t"><span class="type">gnutls_pk_algorithm_t</span></a> enumeration on
13434 success, or a negative error code on error.</p>
13435 </div>
13436 </div>
13437 <hr>
13438 <div class="refsect2">
13439 <a name="gnutls-x509-privkey-get-pk-algorithm2"></a><h3>gnutls_x509_privkey_get_pk_algorithm2 ()</h3>
13440 <pre class="programlisting"><span class="returnvalue">int</span>
13441 gnutls_x509_privkey_get_pk_algorithm2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
13442 <em class="parameter"><code>unsigned <span class="type">int</span> *bits</code></em>);</pre>
13443 <p>This function will return the public key algorithm of a private
13444 key.</p>
13445 <div class="refsect3">
13446 <a name="gnutls-x509-privkey-get-pk-algorithm2.parameters"></a><h4>Parameters</h4>
13447 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13448 <colgroup>
13449 <col width="150px" class="parameters_name">
13450 <col class="parameters_description">
13451 <col width="200px" class="parameters_annotations">
13452 </colgroup>
13453 <tbody>
13454 <tr>
13455 <td class="parameter_name"><p>key</p></td>
13456 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> type</p></td>
13457 <td class="parameter_annotations"> </td>
13458 </tr>
13459 <tr>
13460 <td class="parameter_name"><p>bits</p></td>
13461 <td class="parameter_description"><p>The number of bits in the public key algorithm</p></td>
13462 <td class="parameter_annotations"> </td>
13463 </tr>
13464 </tbody>
13465 </table></div>
13466 </div>
13467 <div class="refsect3">
13468 <a name="gnutls-x509-privkey-get-pk-algorithm2.returns"></a><h4>Returns</h4>
13469 <p> a member of the <a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t"><span class="type">gnutls_pk_algorithm_t</span></a> enumeration on
13470 success, or a negative error code on error.</p>
13471 </div>
13472 </div>
13473 <hr>
13474 <div class="refsect2">
13475 <a name="gnutls-x509-privkey-get-spki"></a><h3>gnutls_x509_privkey_get_spki ()</h3>
13476 <pre class="programlisting"><span class="returnvalue">int</span>
13477 gnutls_x509_privkey_get_spki (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
13478 <em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a> spki</code></em>,
13479 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
13480 <p>This function will return the public key information of a private
13481 key. The provided <em class="parameter"><code>spki</code></em>
13482 must be initialized.</p>
13483 <div class="refsect3">
13484 <a name="gnutls-x509-privkey-get-spki.parameters"></a><h4>Parameters</h4>
13485 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13486 <colgroup>
13487 <col width="150px" class="parameters_name">
13488 <col class="parameters_description">
13489 <col width="200px" class="parameters_annotations">
13490 </colgroup>
13491 <tbody>
13492 <tr>
13493 <td class="parameter_name"><p>key</p></td>
13494 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> type</p></td>
13495 <td class="parameter_annotations"> </td>
13496 </tr>
13497 <tr>
13498 <td class="parameter_name"><p>spki</p></td>
13499 <td class="parameter_description"><p>a SubjectPublicKeyInfo structure of type <a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a></p></td>
13500 <td class="parameter_annotations"> </td>
13501 </tr>
13502 <tr>
13503 <td class="parameter_name"><p>flags</p></td>
13504 <td class="parameter_description"><p>must be zero</p></td>
13505 <td class="parameter_annotations"> </td>
13506 </tr>
13507 </tbody>
13508 </table></div>
13509 </div>
13510 <div class="refsect3">
13511 <a name="gnutls-x509-privkey-get-spki.returns"></a><h4>Returns</h4>
13512 <p> Zero on success, or a negative error code on error.</p>
13513 </div>
13514 </div>
13515 <hr>
13516 <div class="refsect2">
13517 <a name="gnutls-x509-privkey-set-spki"></a><h3>gnutls_x509_privkey_set_spki ()</h3>
13518 <pre class="programlisting"><span class="returnvalue">int</span>
13519 gnutls_x509_privkey_set_spki (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
13520 <em class="parameter"><code>const <a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a> spki</code></em>,
13521 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
13522 <p>This function will return the public key information of a private
13523 key. The provided <em class="parameter"><code>spki</code></em>
13524 must be initialized.</p>
13525 <div class="refsect3">
13526 <a name="gnutls-x509-privkey-set-spki.parameters"></a><h4>Parameters</h4>
13527 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13528 <colgroup>
13529 <col width="150px" class="parameters_name">
13530 <col class="parameters_description">
13531 <col width="200px" class="parameters_annotations">
13532 </colgroup>
13533 <tbody>
13534 <tr>
13535 <td class="parameter_name"><p>key</p></td>
13536 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> type</p></td>
13537 <td class="parameter_annotations"> </td>
13538 </tr>
13539 <tr>
13540 <td class="parameter_name"><p>spki</p></td>
13541 <td class="parameter_description"><p>a SubjectPublicKeyInfo structure of type <a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a></p></td>
13542 <td class="parameter_annotations"> </td>
13543 </tr>
13544 <tr>
13545 <td class="parameter_name"><p>flags</p></td>
13546 <td class="parameter_description"><p>must be zero</p></td>
13547 <td class="parameter_annotations"> </td>
13548 </tr>
13549 </tbody>
13550 </table></div>
13551 </div>
13552 <div class="refsect3">
13553 <a name="gnutls-x509-privkey-set-spki.returns"></a><h4>Returns</h4>
13554 <p> Zero on success, or a negative error code on error.</p>
13555 </div>
13556 </div>
13557 <hr>
13558 <div class="refsect2">
13559 <a name="gnutls-x509-privkey-get-key-id"></a><h3>gnutls_x509_privkey_get_key_id ()</h3>
13560 <pre class="programlisting"><span class="returnvalue">int</span>
13561 gnutls_x509_privkey_get_key_id (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
13562 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
13563 <em class="parameter"><code>unsigned <span class="type">char</span> *output_data</code></em>,
13564 <em class="parameter"><code><span class="type">size_t</span> *output_data_size</code></em>);</pre>
13565 <p>This function will return a unique ID that depends on the public key
13566 parameters. This ID can be used in checking whether a certificate
13567 corresponds to the given key.</p>
13568 <p>If the buffer provided is not long enough to hold the output, then
13569 *<em class="parameter"><code>output_data_size</code></em>
13570 is updated and <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> will
13571 be returned. The output will normally be a SHA-1 hash output,
13572 which is 20 bytes.</p>
13573 <div class="refsect3">
13574 <a name="gnutls-x509-privkey-get-key-id.parameters"></a><h4>Parameters</h4>
13575 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13576 <colgroup>
13577 <col width="150px" class="parameters_name">
13578 <col class="parameters_description">
13579 <col width="200px" class="parameters_annotations">
13580 </colgroup>
13581 <tbody>
13582 <tr>
13583 <td class="parameter_name"><p>key</p></td>
13584 <td class="parameter_description"><p>a key</p></td>
13585 <td class="parameter_annotations"> </td>
13586 </tr>
13587 <tr>
13588 <td class="parameter_name"><p>flags</p></td>
13589 <td class="parameter_description"><p>should be one of the flags from <a class="link" href="gnutls-x509.html#gnutls-keyid-flags-t" title="enum gnutls_keyid_flags_t"><code class="literal">gnutls_keyid_flags_t</code></a></p></td>
13590 <td class="parameter_annotations"> </td>
13591 </tr>
13592 <tr>
13593 <td class="parameter_name"><p>output_data</p></td>
13594 <td class="parameter_description"><p>will contain the key ID</p></td>
13595 <td class="parameter_annotations"> </td>
13596 </tr>
13597 <tr>
13598 <td class="parameter_name"><p>output_data_size</p></td>
13599 <td class="parameter_description"><p>holds the size of output_data (and will be
13600 replaced by the actual size of parameters)</p></td>
13601 <td class="parameter_annotations"> </td>
13602 </tr>
13603 </tbody>
13604 </table></div>
13605 </div>
13606 <div class="refsect3">
13607 <a name="gnutls-x509-privkey-get-key-id.returns"></a><h4>Returns</h4>
13608 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
13609 negative error value.</p>
13610 </div>
13611 </div>
13612 <hr>
13613 <div class="refsect2">
13614 <a name="gnutls-x509-privkey-generate"></a><h3>gnutls_x509_privkey_generate ()</h3>
13615 <pre class="programlisting"><span class="returnvalue">int</span>
13616 gnutls_x509_privkey_generate (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
13617 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t"><span class="type">gnutls_pk_algorithm_t</span></a> algo</code></em>,
13618 <em class="parameter"><code>unsigned <span class="type">int</span> bits</code></em>,
13619 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
13620 <p>This function will generate a random private key. Note that this
13621 function must be called on an initialized private key.</p>
13622 <p>The flag <a class="link" href="gnutls-abstract.html#GNUTLS-PRIVKEY-FLAG-PROVABLE:CAPS"><code class="literal">GNUTLS_PRIVKEY_FLAG_PROVABLE</code></a>
13623 instructs the key generation process to use algorithms like Shawe-Taylor
13624 (from FIPS PUB186-4) which generate provable parameters out of a seed
13625 for RSA and DSA keys. See <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-generate2" title="gnutls_x509_privkey_generate2 ()"><code class="function">gnutls_x509_privkey_generate2()</code></a> for more
13626 information.</p>
13627 <p>Note that when generating an elliptic curve key, the curve
13628 can be substituted in the place of the bits parameter using the
13629 <a class="link" href="gnutls-gnutls.html#GNUTLS-CURVE-TO-BITS:CAPS" title="GNUTLS_CURVE_TO_BITS()"><code class="function">GNUTLS_CURVE_TO_BITS()</code></a> macro. The input to the macro is any curve from
13630 <a class="link" href="gnutls-gnutls.html#gnutls-ecc-curve-t" title="enum gnutls_ecc_curve_t"><code class="literal">gnutls_ecc_curve_t</code></a>.</p>
13631 <p>For DSA keys, if the subgroup size needs to be specified check
13632 the <a class="link" href="gnutls-abstract.html#GNUTLS-SUBGROUP-TO-BITS:CAPS" title="GNUTLS_SUBGROUP_TO_BITS()"><code class="function">GNUTLS_SUBGROUP_TO_BITS()</code></a> macro.</p>
13633 <p>It is recommended to do not set the number of <em class="parameter"><code>bits</code></em>
13634 directly, use <a class="link" href="gnutls-gnutls.html#gnutls-sec-param-to-pk-bits" title="gnutls_sec_param_to_pk_bits ()"><code class="function">gnutls_sec_param_to_pk_bits()</code></a> instead .</p>
13635 <p>See also <a class="link" href="gnutls-abstract.html#gnutls-privkey-generate" title="gnutls_privkey_generate ()"><code class="function">gnutls_privkey_generate()</code></a>, <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-generate2" title="gnutls_x509_privkey_generate2 ()"><code class="function">gnutls_x509_privkey_generate2()</code></a>.</p>
13636 <div class="refsect3">
13637 <a name="gnutls-x509-privkey-generate.parameters"></a><h4>Parameters</h4>
13638 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13639 <colgroup>
13640 <col width="150px" class="parameters_name">
13641 <col class="parameters_description">
13642 <col width="200px" class="parameters_annotations">
13643 </colgroup>
13644 <tbody>
13645 <tr>
13646 <td class="parameter_name"><p>key</p></td>
13647 <td class="parameter_description"><p>an initialized key</p></td>
13648 <td class="parameter_annotations"> </td>
13649 </tr>
13650 <tr>
13651 <td class="parameter_name"><p>algo</p></td>
13652 <td class="parameter_description"><p>is one of the algorithms in <a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t"><span class="type">gnutls_pk_algorithm_t</span></a>.</p></td>
13653 <td class="parameter_annotations"> </td>
13654 </tr>
13655 <tr>
13656 <td class="parameter_name"><p>bits</p></td>
13657 <td class="parameter_description"><p>the size of the parameters to generate</p></td>
13658 <td class="parameter_annotations"> </td>
13659 </tr>
13660 <tr>
13661 <td class="parameter_name"><p>flags</p></td>
13662 <td class="parameter_description"><p>Must be zero or flags from <a class="link" href="gnutls-abstract.html#gnutls-privkey-flags-t" title="enum gnutls_privkey_flags_t"><span class="type">gnutls_privkey_flags_t</span></a>.</p></td>
13663 <td class="parameter_annotations"> </td>
13664 </tr>
13665 </tbody>
13666 </table></div>
13667 </div>
13668 <div class="refsect3">
13669 <a name="gnutls-x509-privkey-generate.returns"></a><h4>Returns</h4>
13670 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
13671 negative error value.</p>
13672 </div>
13673 </div>
13674 <hr>
13675 <div class="refsect2">
13676 <a name="gnutls-x509-privkey-set-flags"></a><h3>gnutls_x509_privkey_set_flags ()</h3>
13677 <pre class="programlisting"><span class="returnvalue">void</span>
13678 gnutls_x509_privkey_set_flags (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
13679 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
13680 <p>This function will set flags for the specified private key, after
13681 it is generated. Currently this is useful for the <a class="link" href="gnutls-abstract.html#GNUTLS-PRIVKEY-FLAG-EXPORT-COMPAT:CAPS"><code class="literal">GNUTLS_PRIVKEY_FLAG_EXPORT_COMPAT</code></a>
13682 to allow exporting a "provable" private key in backwards compatible way.</p>
13683 <div class="refsect3">
13684 <a name="gnutls-x509-privkey-set-flags.parameters"></a><h4>Parameters</h4>
13685 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13686 <colgroup>
13687 <col width="150px" class="parameters_name">
13688 <col class="parameters_description">
13689 <col width="200px" class="parameters_annotations">
13690 </colgroup>
13691 <tbody>
13692 <tr>
13693 <td class="parameter_name"><p>key</p></td>
13694 <td class="parameter_description"><p>A key of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a></p></td>
13695 <td class="parameter_annotations"> </td>
13696 </tr>
13697 <tr>
13698 <td class="parameter_name"><p>flags</p></td>
13699 <td class="parameter_description"><p>flags from the <code class="literal">gnutls_privkey_flags</code></p></td>
13700 <td class="parameter_annotations"> </td>
13701 </tr>
13702 </tbody>
13703 </table></div>
13704 </div>
13705 <p class="since">Since: 3.5.0</p>
13706 </div>
13707 <hr>
13708 <div class="refsect2">
13709 <a name="gnutls-x509-privkey-generate2"></a><h3>gnutls_x509_privkey_generate2 ()</h3>
13710 <pre class="programlisting"><span class="returnvalue">int</span>
13711 gnutls_x509_privkey_generate2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
13712 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t"><span class="type">gnutls_pk_algorithm_t</span></a> algo</code></em>,
13713 <em class="parameter"><code>unsigned <span class="type">int</span> bits</code></em>,
13714 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
13715 <em class="parameter"><code>const <a class="link" href="gnutls-x509.html#gnutls-keygen-data-st" title="gnutls_keygen_data_st"><span class="type">gnutls_keygen_data_st</span></a> *data</code></em>,
13716 <em class="parameter"><code><span class="type">unsigned </span> data_size</code></em>);</pre>
13717 <p>This function will generate a random private key. Note that this
13718 function must be called on an initialized private key.</p>
13719 <p>The flag <a class="link" href="gnutls-abstract.html#GNUTLS-PRIVKEY-FLAG-PROVABLE:CAPS"><code class="literal">GNUTLS_PRIVKEY_FLAG_PROVABLE</code></a>
13720 instructs the key generation process to use algorithms like Shawe-Taylor
13721 (from FIPS PUB186-4) which generate provable parameters out of a seed
13722 for RSA and DSA keys. On DSA keys the PQG parameters are generated using the
13723 seed, while on RSA the two primes. To specify an explicit seed
13724 (by default a random seed is used), use the <em class="parameter"><code>data</code></em>
13725 with a <a class="link" href="gnutls-x509.html#GNUTLS-KEYGEN-SEED:CAPS"><code class="literal">GNUTLS_KEYGEN_SEED</code></a>
13726 type.</p>
13727 <p>Note that when generating an elliptic curve key, the curve
13728 can be substituted in the place of the bits parameter using the
13729 <a class="link" href="gnutls-gnutls.html#GNUTLS-CURVE-TO-BITS:CAPS" title="GNUTLS_CURVE_TO_BITS()"><code class="function">GNUTLS_CURVE_TO_BITS()</code></a> macro.</p>
13730 <p>To export the generated keys in memory or in files it is recommended to use the
13731 PKCS#8 form as it can handle all key types, and can store additional parameters
13732 such as the seed, in case of provable RSA or DSA keys.
13733 Generated keys can be exported in memory using <a class="link" href="gnutls-abstract.html#gnutls-privkey-export-x509" title="gnutls_privkey_export_x509 ()"><code class="function">gnutls_privkey_export_x509()</code></a>,
13734 and then with <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-export2-pkcs8" title="gnutls_x509_privkey_export2_pkcs8 ()"><code class="function">gnutls_x509_privkey_export2_pkcs8()</code></a>.</p>
13735 <p>If key generation is part of your application, avoid setting the number
13736 of bits directly, and instead use <a class="link" href="gnutls-gnutls.html#gnutls-sec-param-to-pk-bits" title="gnutls_sec_param_to_pk_bits ()"><code class="function">gnutls_sec_param_to_pk_bits()</code></a>.
13737 That way the generated keys will adapt to the security levels
13738 of the underlying GnuTLS library.</p>
13739 <p>See also <a class="link" href="gnutls-abstract.html#gnutls-privkey-generate2" title="gnutls_privkey_generate2 ()"><code class="function">gnutls_privkey_generate2()</code></a>.</p>
13740 <div class="refsect3">
13741 <a name="gnutls-x509-privkey-generate2.parameters"></a><h4>Parameters</h4>
13742 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13743 <colgroup>
13744 <col width="150px" class="parameters_name">
13745 <col class="parameters_description">
13746 <col width="200px" class="parameters_annotations">
13747 </colgroup>
13748 <tbody>
13749 <tr>
13750 <td class="parameter_name"><p>key</p></td>
13751 <td class="parameter_description"><p>a key</p></td>
13752 <td class="parameter_annotations"> </td>
13753 </tr>
13754 <tr>
13755 <td class="parameter_name"><p>algo</p></td>
13756 <td class="parameter_description"><p>is one of the algorithms in <a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t"><span class="type">gnutls_pk_algorithm_t</span></a>.</p></td>
13757 <td class="parameter_annotations"> </td>
13758 </tr>
13759 <tr>
13760 <td class="parameter_name"><p>bits</p></td>
13761 <td class="parameter_description"><p>the size of the modulus</p></td>
13762 <td class="parameter_annotations"> </td>
13763 </tr>
13764 <tr>
13765 <td class="parameter_name"><p>flags</p></td>
13766 <td class="parameter_description"><p>Must be zero or flags from <a class="link" href="gnutls-abstract.html#gnutls-privkey-flags-t" title="enum gnutls_privkey_flags_t"><span class="type">gnutls_privkey_flags_t</span></a>.</p></td>
13767 <td class="parameter_annotations"> </td>
13768 </tr>
13769 <tr>
13770 <td class="parameter_name"><p>data</p></td>
13771 <td class="parameter_description"><p>Allow specifying <a class="link" href="gnutls-x509.html#gnutls-keygen-data-st" title="gnutls_keygen_data_st"><code class="literal">gnutls_keygen_data_st</code></a> types such as the seed to be used.</p></td>
13772 <td class="parameter_annotations"> </td>
13773 </tr>
13774 <tr>
13775 <td class="parameter_name"><p>data_size</p></td>
13776 <td class="parameter_description"><p>The number of <em class="parameter"><code>data</code></em>
13777 available.</p></td>
13778 <td class="parameter_annotations"> </td>
13779 </tr>
13780 </tbody>
13781 </table></div>
13782 </div>
13783 <div class="refsect3">
13784 <a name="gnutls-x509-privkey-generate2.returns"></a><h4>Returns</h4>
13785 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
13786 negative error value.</p>
13787 </div>
13788 </div>
13789 <hr>
13790 <div class="refsect2">
13791 <a name="gnutls-x509-privkey-verify-seed"></a><h3>gnutls_x509_privkey_verify_seed ()</h3>
13792 <pre class="programlisting"><span class="returnvalue">int</span>
13793 gnutls_x509_privkey_verify_seed (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
13794 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> Param2</code></em>,
13795 <em class="parameter"><code>const <span class="type">void</span> *seed</code></em>,
13796 <em class="parameter"><code><span class="type">size_t</span> seed_size</code></em>);</pre>
13797 <p>This function will verify that the given private key was generated from
13798 the provided seed. If <em class="parameter"><code>seed</code></em>
13799 is <code class="literal">NULL</code> then the seed stored in the <em class="parameter"><code>key</code></em>
13800 's structure
13801 will be used for verification.</p>
13802 <div class="refsect3">
13803 <a name="gnutls-x509-privkey-verify-seed.parameters"></a><h4>Parameters</h4>
13804 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13805 <colgroup>
13806 <col width="150px" class="parameters_name">
13807 <col class="parameters_description">
13808 <col width="200px" class="parameters_annotations">
13809 </colgroup>
13810 <tbody>
13811 <tr>
13812 <td class="parameter_name"><p>key</p></td>
13813 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> type</p></td>
13814 <td class="parameter_annotations"> </td>
13815 </tr>
13816 <tr>
13817 <td class="parameter_name"><p>digest</p></td>
13818 <td class="parameter_description"><p>it contains the digest algorithm used for key generation (if applicable)</p></td>
13819 <td class="parameter_annotations"> </td>
13820 </tr>
13821 <tr>
13822 <td class="parameter_name"><p>seed</p></td>
13823 <td class="parameter_description"><p>the seed of the key to be checked with</p></td>
13824 <td class="parameter_annotations"> </td>
13825 </tr>
13826 <tr>
13827 <td class="parameter_name"><p>seed_size</p></td>
13828 <td class="parameter_description"><p>holds the size of <em class="parameter"><code>seed</code></em>
13829 </p></td>
13830 <td class="parameter_annotations"> </td>
13831 </tr>
13832 </tbody>
13833 </table></div>
13834 </div>
13835 <div class="refsect3">
13836 <a name="gnutls-x509-privkey-verify-seed.returns"></a><h4>Returns</h4>
13837 <p> In case of a verification failure <a class="link" href="gnutls-gnutls.html#GNUTLS-E-PRIVKEY-VERIFICATION-ERROR:CAPS" title="GNUTLS_E_PRIVKEY_VERIFICATION_ERROR"><code class="literal">GNUTLS_E_PRIVKEY_VERIFICATION_ERROR</code></a>
13838 is returned, and zero or positive code on success.</p>
13839 </div>
13840 <p class="since">Since: 3.5.0</p>
13841 </div>
13842 <hr>
13843 <div class="refsect2">
13844 <a name="gnutls-x509-privkey-get-seed"></a><h3>gnutls_x509_privkey_get_seed ()</h3>
13845 <pre class="programlisting"><span class="returnvalue">int</span>
13846 gnutls_x509_privkey_get_seed (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
13847 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> *Param2</code></em>,
13848 <em class="parameter"><code><span class="type">void</span> *seed</code></em>,
13849 <em class="parameter"><code><span class="type">size_t</span> *seed_size</code></em>);</pre>
13850 <p>This function will return the seed that was used to generate the
13851 given private key. That function will succeed only if the key was generated
13852 as a provable key.</p>
13853 <div class="refsect3">
13854 <a name="gnutls-x509-privkey-get-seed.parameters"></a><h4>Parameters</h4>
13855 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13856 <colgroup>
13857 <col width="150px" class="parameters_name">
13858 <col class="parameters_description">
13859 <col width="200px" class="parameters_annotations">
13860 </colgroup>
13861 <tbody>
13862 <tr>
13863 <td class="parameter_name"><p>key</p></td>
13864 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> type</p></td>
13865 <td class="parameter_annotations"> </td>
13866 </tr>
13867 <tr>
13868 <td class="parameter_name"><p>digest</p></td>
13869 <td class="parameter_description"><p>if non-NULL it will contain the digest algorithm used for key generation (if applicable)</p></td>
13870 <td class="parameter_annotations"> </td>
13871 </tr>
13872 <tr>
13873 <td class="parameter_name"><p>seed</p></td>
13874 <td class="parameter_description"><p>where seed will be copied to</p></td>
13875 <td class="parameter_annotations"> </td>
13876 </tr>
13877 <tr>
13878 <td class="parameter_name"><p>seed_size</p></td>
13879 <td class="parameter_description"><p>originally holds the size of <em class="parameter"><code>seed</code></em>
13880 , will be updated with actual size</p></td>
13881 <td class="parameter_annotations"> </td>
13882 </tr>
13883 </tbody>
13884 </table></div>
13885 </div>
13886 <div class="refsect3">
13887 <a name="gnutls-x509-privkey-get-seed.returns"></a><h4>Returns</h4>
13888 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
13889 negative error value.</p>
13890 </div>
13891 <p class="since">Since: 3.5.0</p>
13892 </div>
13893 <hr>
13894 <div class="refsect2">
13895 <a name="gnutls-x509-privkey-verify-params"></a><h3>gnutls_x509_privkey_verify_params ()</h3>
13896 <pre class="programlisting"><span class="returnvalue">int</span>
13897 gnutls_x509_privkey_verify_params (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>);</pre>
13898 <p>This function will verify the private key parameters.</p>
13899 <div class="refsect3">
13900 <a name="gnutls-x509-privkey-verify-params.parameters"></a><h4>Parameters</h4>
13901 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13902 <colgroup>
13903 <col width="150px" class="parameters_name">
13904 <col class="parameters_description">
13905 <col width="200px" class="parameters_annotations">
13906 </colgroup>
13907 <tbody><tr>
13908 <td class="parameter_name"><p>key</p></td>
13909 <td class="parameter_description"><p>a key</p></td>
13910 <td class="parameter_annotations"> </td>
13911 </tr></tbody>
13912 </table></div>
13913 </div>
13914 <div class="refsect3">
13915 <a name="gnutls-x509-privkey-verify-params.returns"></a><h4>Returns</h4>
13916 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
13917 negative error value.</p>
13918 </div>
13919 </div>
13920 <hr>
13921 <div class="refsect2">
13922 <a name="gnutls-x509-privkey-export"></a><h3>gnutls_x509_privkey_export ()</h3>
13923 <pre class="programlisting"><span class="returnvalue">int</span>
13924 gnutls_x509_privkey_export (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
13925 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
13926 <em class="parameter"><code><span class="type">void</span> *output_data</code></em>,
13927 <em class="parameter"><code><span class="type">size_t</span> *output_data_size</code></em>);</pre>
13928 <p>This function will export the private key to a PKCS#1 structure for
13929 RSA or RSA-PSS keys, and integer sequence for DSA keys. Other keys types
13930 will be exported in PKCS#8 form.</p>
13931 <p>If the structure is PEM encoded, it will have a header
13932 of "BEGIN RSA PRIVATE KEY".</p>
13933 <p>It is recommended to use <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-export-pkcs8" title="gnutls_x509_privkey_export_pkcs8 ()"><code class="function">gnutls_x509_privkey_export_pkcs8()</code></a> instead
13934 of this function, when a consistent output format is required.</p>
13935 <div class="refsect3">
13936 <a name="gnutls-x509-privkey-export.parameters"></a><h4>Parameters</h4>
13937 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13938 <colgroup>
13939 <col width="150px" class="parameters_name">
13940 <col class="parameters_description">
13941 <col width="200px" class="parameters_annotations">
13942 </colgroup>
13943 <tbody>
13944 <tr>
13945 <td class="parameter_name"><p>key</p></td>
13946 <td class="parameter_description"><p>Holds the key</p></td>
13947 <td class="parameter_annotations"> </td>
13948 </tr>
13949 <tr>
13950 <td class="parameter_name"><p>format</p></td>
13951 <td class="parameter_description"><p>the format of output params. One of PEM or DER.</p></td>
13952 <td class="parameter_annotations"> </td>
13953 </tr>
13954 <tr>
13955 <td class="parameter_name"><p>output_data</p></td>
13956 <td class="parameter_description"><p>will contain a private key PEM or DER encoded</p></td>
13957 <td class="parameter_annotations"> </td>
13958 </tr>
13959 <tr>
13960 <td class="parameter_name"><p>output_data_size</p></td>
13961 <td class="parameter_description"><p>holds the size of output_data (and will be
13962 replaced by the actual size of parameters)</p></td>
13963 <td class="parameter_annotations"> </td>
13964 </tr>
13965 </tbody>
13966 </table></div>
13967 </div>
13968 <div class="refsect3">
13969 <a name="gnutls-x509-privkey-export.returns"></a><h4>Returns</h4>
13970 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
13971 negative error value.</p>
13972 </div>
13973 </div>
13974 <hr>
13975 <div class="refsect2">
13976 <a name="gnutls-x509-privkey-export2"></a><h3>gnutls_x509_privkey_export2 ()</h3>
13977 <pre class="programlisting"><span class="returnvalue">int</span>
13978 gnutls_x509_privkey_export2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
13979 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
13980 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>);</pre>
13981 <p>This function will export the private key to a PKCS#1 structure for
13982 RSA or RSA-PSS keys, and integer sequence for DSA keys. Other keys types
13983 will be exported in PKCS#8 form.</p>
13984 <p>The output buffer is allocated using <code class="function">gnutls_malloc()</code>.</p>
13985 <p>It is recommended to use <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-export2-pkcs8" title="gnutls_x509_privkey_export2_pkcs8 ()"><code class="function">gnutls_x509_privkey_export2_pkcs8()</code></a> instead
13986 of this function, when a consistent output format is required.</p>
13987 <div class="refsect3">
13988 <a name="gnutls-x509-privkey-export2.parameters"></a><h4>Parameters</h4>
13989 <div class="informaltable"><table class="informaltable" width="100%" border="0">
13990 <colgroup>
13991 <col width="150px" class="parameters_name">
13992 <col class="parameters_description">
13993 <col width="200px" class="parameters_annotations">
13994 </colgroup>
13995 <tbody>
13996 <tr>
13997 <td class="parameter_name"><p>key</p></td>
13998 <td class="parameter_description"><p>Holds the key</p></td>
13999 <td class="parameter_annotations"> </td>
14000 </tr>
14001 <tr>
14002 <td class="parameter_name"><p>format</p></td>
14003 <td class="parameter_description"><p>the format of output params. One of PEM or DER.</p></td>
14004 <td class="parameter_annotations"> </td>
14005 </tr>
14006 <tr>
14007 <td class="parameter_name"><p>out</p></td>
14008 <td class="parameter_description"><p>will contain a private key PEM or DER encoded</p></td>
14009 <td class="parameter_annotations"> </td>
14010 </tr>
14011 </tbody>
14012 </table></div>
14013 </div>
14014 <div class="refsect3">
14015 <a name="gnutls-x509-privkey-export2.returns"></a><h4>Returns</h4>
14016 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
14017 negative error value.</p>
14018 <p>Since 3.1.3</p>
14019 </div>
14020 </div>
14021 <hr>
14022 <div class="refsect2">
14023 <a name="gnutls-x509-privkey-export-pkcs8"></a><h3>gnutls_x509_privkey_export_pkcs8 ()</h3>
14024 <pre class="programlisting"><span class="returnvalue">int</span>
14025 gnutls_x509_privkey_export_pkcs8 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
14026 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
14027 <em class="parameter"><code>const <span class="type">char</span> *password</code></em>,
14028 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
14029 <em class="parameter"><code><span class="type">void</span> *output_data</code></em>,
14030 <em class="parameter"><code><span class="type">size_t</span> *output_data_size</code></em>);</pre>
14031 <p>This function will export the private key to a PKCS8 structure.
14032 Both RSA and DSA keys can be exported. For DSA keys we use
14033 PKCS <span class="type">11</span> definitions. If the flags do not specify the encryption
14034 cipher, then the default 3DES (PBES2) will be used.</p>
14035 <p>The <em class="parameter"><code>password</code></em>
14036 can be either ASCII or UTF-8 in the default PBES2
14037 encryption schemas, or ASCII for the PKCS12 schemas.</p>
14038 <p>If the buffer provided is not long enough to hold the output, then
14039 *output_data_size is updated and GNUTLS_E_SHORT_MEMORY_BUFFER will
14040 be returned.</p>
14041 <p>If the structure is PEM encoded, it will have a header
14042 of "BEGIN ENCRYPTED PRIVATE KEY" or "BEGIN PRIVATE KEY" if
14043 encryption is not used.</p>
14044 <div class="refsect3">
14045 <a name="gnutls-x509-privkey-export-pkcs8.parameters"></a><h4>Parameters</h4>
14046 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14047 <colgroup>
14048 <col width="150px" class="parameters_name">
14049 <col class="parameters_description">
14050 <col width="200px" class="parameters_annotations">
14051 </colgroup>
14052 <tbody>
14053 <tr>
14054 <td class="parameter_name"><p>key</p></td>
14055 <td class="parameter_description"><p>Holds the key</p></td>
14056 <td class="parameter_annotations"> </td>
14057 </tr>
14058 <tr>
14059 <td class="parameter_name"><p>format</p></td>
14060 <td class="parameter_description"><p>the format of output params. One of PEM or DER.</p></td>
14061 <td class="parameter_annotations"> </td>
14062 </tr>
14063 <tr>
14064 <td class="parameter_name"><p>password</p></td>
14065 <td class="parameter_description"><p>the password that will be used to encrypt the key.</p></td>
14066 <td class="parameter_annotations"> </td>
14067 </tr>
14068 <tr>
14069 <td class="parameter_name"><p>flags</p></td>
14070 <td class="parameter_description"><p>an ORed sequence of gnutls_pkcs_encrypt_flags_t</p></td>
14071 <td class="parameter_annotations"> </td>
14072 </tr>
14073 <tr>
14074 <td class="parameter_name"><p>output_data</p></td>
14075 <td class="parameter_description"><p>will contain a private key PEM or DER encoded</p></td>
14076 <td class="parameter_annotations"> </td>
14077 </tr>
14078 <tr>
14079 <td class="parameter_name"><p>output_data_size</p></td>
14080 <td class="parameter_description"><p>holds the size of output_data (and will be
14081 replaced by the actual size of parameters)</p></td>
14082 <td class="parameter_annotations"> </td>
14083 </tr>
14084 </tbody>
14085 </table></div>
14086 </div>
14087 <div class="refsect3">
14088 <a name="gnutls-x509-privkey-export-pkcs8.returns"></a><h4>Returns</h4>
14089 <p> In case of failure a negative error code will be
14090 returned, and 0 on success.</p>
14091 </div>
14092 </div>
14093 <hr>
14094 <div class="refsect2">
14095 <a name="gnutls-x509-privkey-export2-pkcs8"></a><h3>gnutls_x509_privkey_export2_pkcs8 ()</h3>
14096 <pre class="programlisting"><span class="returnvalue">int</span>
14097 gnutls_x509_privkey_export2_pkcs8 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
14098 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
14099 <em class="parameter"><code>const <span class="type">char</span> *password</code></em>,
14100 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
14101 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>);</pre>
14102 <p>This function will export the private key to a PKCS8 structure.
14103 Both RSA and DSA keys can be exported. For DSA keys we use
14104 PKCS <span class="type">11</span> definitions. If the flags do not specify the encryption
14105 cipher, then the default 3DES (PBES2) will be used.</p>
14106 <p>The <em class="parameter"><code>password</code></em>
14107 can be either ASCII or UTF-8 in the default PBES2
14108 encryption schemas, or ASCII for the PKCS12 schemas.</p>
14109 <p>The output buffer is allocated using <code class="function">gnutls_malloc()</code>.</p>
14110 <p>If the structure is PEM encoded, it will have a header
14111 of "BEGIN ENCRYPTED PRIVATE KEY" or "BEGIN PRIVATE KEY" if
14112 encryption is not used.</p>
14113 <div class="refsect3">
14114 <a name="gnutls-x509-privkey-export2-pkcs8.parameters"></a><h4>Parameters</h4>
14115 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14116 <colgroup>
14117 <col width="150px" class="parameters_name">
14118 <col class="parameters_description">
14119 <col width="200px" class="parameters_annotations">
14120 </colgroup>
14121 <tbody>
14122 <tr>
14123 <td class="parameter_name"><p>key</p></td>
14124 <td class="parameter_description"><p>Holds the key</p></td>
14125 <td class="parameter_annotations"> </td>
14126 </tr>
14127 <tr>
14128 <td class="parameter_name"><p>format</p></td>
14129 <td class="parameter_description"><p>the format of output params. One of PEM or DER.</p></td>
14130 <td class="parameter_annotations"> </td>
14131 </tr>
14132 <tr>
14133 <td class="parameter_name"><p>password</p></td>
14134 <td class="parameter_description"><p>the password that will be used to encrypt the key.</p></td>
14135 <td class="parameter_annotations"> </td>
14136 </tr>
14137 <tr>
14138 <td class="parameter_name"><p>flags</p></td>
14139 <td class="parameter_description"><p>an ORed sequence of gnutls_pkcs_encrypt_flags_t</p></td>
14140 <td class="parameter_annotations"> </td>
14141 </tr>
14142 <tr>
14143 <td class="parameter_name"><p>out</p></td>
14144 <td class="parameter_description"><p>will contain a private key PEM or DER encoded</p></td>
14145 <td class="parameter_annotations"> </td>
14146 </tr>
14147 </tbody>
14148 </table></div>
14149 </div>
14150 <div class="refsect3">
14151 <a name="gnutls-x509-privkey-export2-pkcs8.returns"></a><h4>Returns</h4>
14152 <p> In case of failure a negative error code will be
14153 returned, and 0 on success.</p>
14154 <p>Since 3.1.3</p>
14155 </div>
14156 </div>
14157 <hr>
14158 <div class="refsect2">
14159 <a name="gnutls-x509-privkey-export-rsa-raw2"></a><h3>gnutls_x509_privkey_export_rsa_raw2 ()</h3>
14160 <pre class="programlisting"><span class="returnvalue">int</span>
14161 gnutls_x509_privkey_export_rsa_raw2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
14162 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *m</code></em>,
14163 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *e</code></em>,
14164 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *d</code></em>,
14165 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *p</code></em>,
14166 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *q</code></em>,
14167 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *u</code></em>,
14168 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *e1</code></em>,
14169 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *e2</code></em>);</pre>
14170 <p>This function will export the RSA private key's parameters found
14171 in the given structure. The new parameters will be allocated using
14172 <code class="function">gnutls_malloc()</code> and will be stored in the appropriate datum.</p>
14173 <div class="refsect3">
14174 <a name="gnutls-x509-privkey-export-rsa-raw2.parameters"></a><h4>Parameters</h4>
14175 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14176 <colgroup>
14177 <col width="150px" class="parameters_name">
14178 <col class="parameters_description">
14179 <col width="200px" class="parameters_annotations">
14180 </colgroup>
14181 <tbody>
14182 <tr>
14183 <td class="parameter_name"><p>key</p></td>
14184 <td class="parameter_description"><p>a key</p></td>
14185 <td class="parameter_annotations"> </td>
14186 </tr>
14187 <tr>
14188 <td class="parameter_name"><p>m</p></td>
14189 <td class="parameter_description"><p>will hold the modulus</p></td>
14190 <td class="parameter_annotations"> </td>
14191 </tr>
14192 <tr>
14193 <td class="parameter_name"><p>e</p></td>
14194 <td class="parameter_description"><p>will hold the public exponent</p></td>
14195 <td class="parameter_annotations"> </td>
14196 </tr>
14197 <tr>
14198 <td class="parameter_name"><p>d</p></td>
14199 <td class="parameter_description"><p>will hold the private exponent</p></td>
14200 <td class="parameter_annotations"> </td>
14201 </tr>
14202 <tr>
14203 <td class="parameter_name"><p>p</p></td>
14204 <td class="parameter_description"><p>will hold the first prime (p)</p></td>
14205 <td class="parameter_annotations"> </td>
14206 </tr>
14207 <tr>
14208 <td class="parameter_name"><p>q</p></td>
14209 <td class="parameter_description"><p>will hold the second prime (q)</p></td>
14210 <td class="parameter_annotations"> </td>
14211 </tr>
14212 <tr>
14213 <td class="parameter_name"><p>u</p></td>
14214 <td class="parameter_description"><p>will hold the coefficient</p></td>
14215 <td class="parameter_annotations"> </td>
14216 </tr>
14217 <tr>
14218 <td class="parameter_name"><p>e1</p></td>
14219 <td class="parameter_description"><p>will hold e1 = d mod (p-1)</p></td>
14220 <td class="parameter_annotations"> </td>
14221 </tr>
14222 <tr>
14223 <td class="parameter_name"><p>e2</p></td>
14224 <td class="parameter_description"><p>will hold e2 = d mod (q-1)</p></td>
14225 <td class="parameter_annotations"> </td>
14226 </tr>
14227 </tbody>
14228 </table></div>
14229 </div>
14230 <div class="refsect3">
14231 <a name="gnutls-x509-privkey-export-rsa-raw2.returns"></a><h4>Returns</h4>
14232 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
14233 negative error value.</p>
14234 </div>
14235 <p class="since">Since: 2.12.0</p>
14236 </div>
14237 <hr>
14238 <div class="refsect2">
14239 <a name="gnutls-x509-privkey-export-rsa-raw"></a><h3>gnutls_x509_privkey_export_rsa_raw ()</h3>
14240 <pre class="programlisting"><span class="returnvalue">int</span>
14241 gnutls_x509_privkey_export_rsa_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
14242 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *m</code></em>,
14243 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *e</code></em>,
14244 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *d</code></em>,
14245 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *p</code></em>,
14246 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *q</code></em>,
14247 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *u</code></em>);</pre>
14248 <p>This function will export the RSA private key's parameters found
14249 in the given structure. The new parameters will be allocated using
14250 <code class="function">gnutls_malloc()</code> and will be stored in the appropriate datum.</p>
14251 <div class="refsect3">
14252 <a name="gnutls-x509-privkey-export-rsa-raw.parameters"></a><h4>Parameters</h4>
14253 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14254 <colgroup>
14255 <col width="150px" class="parameters_name">
14256 <col class="parameters_description">
14257 <col width="200px" class="parameters_annotations">
14258 </colgroup>
14259 <tbody>
14260 <tr>
14261 <td class="parameter_name"><p>key</p></td>
14262 <td class="parameter_description"><p>a key</p></td>
14263 <td class="parameter_annotations"> </td>
14264 </tr>
14265 <tr>
14266 <td class="parameter_name"><p>m</p></td>
14267 <td class="parameter_description"><p>will hold the modulus</p></td>
14268 <td class="parameter_annotations"> </td>
14269 </tr>
14270 <tr>
14271 <td class="parameter_name"><p>e</p></td>
14272 <td class="parameter_description"><p>will hold the public exponent</p></td>
14273 <td class="parameter_annotations"> </td>
14274 </tr>
14275 <tr>
14276 <td class="parameter_name"><p>d</p></td>
14277 <td class="parameter_description"><p>will hold the private exponent</p></td>
14278 <td class="parameter_annotations"> </td>
14279 </tr>
14280 <tr>
14281 <td class="parameter_name"><p>p</p></td>
14282 <td class="parameter_description"><p>will hold the first prime (p)</p></td>
14283 <td class="parameter_annotations"> </td>
14284 </tr>
14285 <tr>
14286 <td class="parameter_name"><p>q</p></td>
14287 <td class="parameter_description"><p>will hold the second prime (q)</p></td>
14288 <td class="parameter_annotations"> </td>
14289 </tr>
14290 <tr>
14291 <td class="parameter_name"><p>u</p></td>
14292 <td class="parameter_description"><p>will hold the coefficient</p></td>
14293 <td class="parameter_annotations"> </td>
14294 </tr>
14295 </tbody>
14296 </table></div>
14297 </div>
14298 <div class="refsect3">
14299 <a name="gnutls-x509-privkey-export-rsa-raw.returns"></a><h4>Returns</h4>
14300 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
14301 negative error value.</p>
14302 </div>
14303 </div>
14304 <hr>
14305 <div class="refsect2">
14306 <a name="gnutls-x509-privkey-export-ecc-raw"></a><h3>gnutls_x509_privkey_export_ecc_raw ()</h3>
14307 <pre class="programlisting"><span class="returnvalue">int</span>
14308 gnutls_x509_privkey_export_ecc_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
14309 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ecc-curve-t" title="enum gnutls_ecc_curve_t"><span class="type">gnutls_ecc_curve_t</span></a> *curve</code></em>,
14310 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *x</code></em>,
14311 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *y</code></em>,
14312 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *k</code></em>);</pre>
14313 <p>This function will export the ECC private key's parameters found
14314 in the given structure. The new parameters will be allocated using
14315 <code class="function">gnutls_malloc()</code> and will be stored in the appropriate datum.</p>
14316 <p>In EdDSA curves the <em class="parameter"><code>y</code></em>
14317 parameter will be <code class="literal">NULL</code> and the other parameters
14318 will be in the native format for the curve.</p>
14319 <div class="refsect3">
14320 <a name="gnutls-x509-privkey-export-ecc-raw.parameters"></a><h4>Parameters</h4>
14321 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14322 <colgroup>
14323 <col width="150px" class="parameters_name">
14324 <col class="parameters_description">
14325 <col width="200px" class="parameters_annotations">
14326 </colgroup>
14327 <tbody>
14328 <tr>
14329 <td class="parameter_name"><p>key</p></td>
14330 <td class="parameter_description"><p>a key</p></td>
14331 <td class="parameter_annotations"> </td>
14332 </tr>
14333 <tr>
14334 <td class="parameter_name"><p>curve</p></td>
14335 <td class="parameter_description"><p>will hold the curve</p></td>
14336 <td class="parameter_annotations"> </td>
14337 </tr>
14338 <tr>
14339 <td class="parameter_name"><p>x</p></td>
14340 <td class="parameter_description"><p>will hold the x-coordinate</p></td>
14341 <td class="parameter_annotations"> </td>
14342 </tr>
14343 <tr>
14344 <td class="parameter_name"><p>y</p></td>
14345 <td class="parameter_description"><p>will hold the y-coordinate</p></td>
14346 <td class="parameter_annotations"> </td>
14347 </tr>
14348 <tr>
14349 <td class="parameter_name"><p>k</p></td>
14350 <td class="parameter_description"><p>will hold the private key</p></td>
14351 <td class="parameter_annotations"> </td>
14352 </tr>
14353 </tbody>
14354 </table></div>
14355 </div>
14356 <div class="refsect3">
14357 <a name="gnutls-x509-privkey-export-ecc-raw.returns"></a><h4>Returns</h4>
14358 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
14359 negative error value.</p>
14360 </div>
14361 <p class="since">Since: 3.0</p>
14362 </div>
14363 <hr>
14364 <div class="refsect2">
14365 <a name="gnutls-x509-privkey-export-gost-raw"></a><h3>gnutls_x509_privkey_export_gost_raw ()</h3>
14366 <pre class="programlisting"><span class="returnvalue">int</span>
14367 gnutls_x509_privkey_export_gost_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
14368 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ecc-curve-t" title="enum gnutls_ecc_curve_t"><span class="type">gnutls_ecc_curve_t</span></a> *curve</code></em>,
14369 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> *digest</code></em>,
14370 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-gost-paramset-t" title="enum gnutls_gost_paramset_t"><span class="type">gnutls_gost_paramset_t</span></a> *paramset</code></em>,
14371 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *x</code></em>,
14372 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *y</code></em>,
14373 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *k</code></em>);</pre>
14374 <p>This function will export the GOST private key's parameters found
14375 in the given structure. The new parameters will be allocated using
14376 <code class="function">gnutls_malloc()</code> and will be stored in the appropriate datum.</p>
14377 <p>Note: parameters will be stored with least significant byte first. On
14378 version 3.6.3 this was incorrectly returned in big-endian format.</p>
14379 <div class="refsect3">
14380 <a name="gnutls-x509-privkey-export-gost-raw.parameters"></a><h4>Parameters</h4>
14381 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14382 <colgroup>
14383 <col width="150px" class="parameters_name">
14384 <col class="parameters_description">
14385 <col width="200px" class="parameters_annotations">
14386 </colgroup>
14387 <tbody>
14388 <tr>
14389 <td class="parameter_name"><p>key</p></td>
14390 <td class="parameter_description"><p>a key</p></td>
14391 <td class="parameter_annotations"> </td>
14392 </tr>
14393 <tr>
14394 <td class="parameter_name"><p>curve</p></td>
14395 <td class="parameter_description"><p>will hold the curve</p></td>
14396 <td class="parameter_annotations"> </td>
14397 </tr>
14398 <tr>
14399 <td class="parameter_name"><p>digest</p></td>
14400 <td class="parameter_description"><p>will hold the digest</p></td>
14401 <td class="parameter_annotations"> </td>
14402 </tr>
14403 <tr>
14404 <td class="parameter_name"><p>paramset</p></td>
14405 <td class="parameter_description"><p>will hold the GOST parameter set ID</p></td>
14406 <td class="parameter_annotations"> </td>
14407 </tr>
14408 <tr>
14409 <td class="parameter_name"><p>x</p></td>
14410 <td class="parameter_description"><p>will hold the x-coordinate</p></td>
14411 <td class="parameter_annotations"> </td>
14412 </tr>
14413 <tr>
14414 <td class="parameter_name"><p>y</p></td>
14415 <td class="parameter_description"><p>will hold the y-coordinate</p></td>
14416 <td class="parameter_annotations"> </td>
14417 </tr>
14418 <tr>
14419 <td class="parameter_name"><p>k</p></td>
14420 <td class="parameter_description"><p>will hold the private key</p></td>
14421 <td class="parameter_annotations"> </td>
14422 </tr>
14423 </tbody>
14424 </table></div>
14425 </div>
14426 <div class="refsect3">
14427 <a name="gnutls-x509-privkey-export-gost-raw.returns"></a><h4>Returns</h4>
14428 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
14429 negative error value.</p>
14430 </div>
14431 <p class="since">Since: 3.6.3</p>
14432 </div>
14433 <hr>
14434 <div class="refsect2">
14435 <a name="gnutls-x509-privkey-sign-data"></a><h3>gnutls_x509_privkey_sign_data ()</h3>
14436 <pre class="programlisting"><span class="returnvalue">int</span>
14437 gnutls_x509_privkey_sign_data (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
14438 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> digest</code></em>,
14439 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
14440 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>,
14441 <em class="parameter"><code><span class="type">void</span> *signature</code></em>,
14442 <em class="parameter"><code><span class="type">size_t</span> *signature_size</code></em>);</pre>
14443 <p>This function will sign the given data using a signature algorithm
14444 supported by the private key. Signature algorithms are always used
14445 together with a hash functions. Different hash functions may be
14446 used for the RSA algorithm, but only SHA-1 for the DSA keys.</p>
14447 <p>If the buffer provided is not long enough to hold the output, then
14448 *<em class="parameter"><code>signature_size</code></em>
14449 is updated and <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> will
14450 be returned.</p>
14451 <p>Use <code class="function">gnutls_x509_crt_get_preferred_hash_algorithm()</code> to determine
14452 the hash algorithm.</p>
14453 <div class="refsect3">
14454 <a name="gnutls-x509-privkey-sign-data.parameters"></a><h4>Parameters</h4>
14455 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14456 <colgroup>
14457 <col width="150px" class="parameters_name">
14458 <col class="parameters_description">
14459 <col width="200px" class="parameters_annotations">
14460 </colgroup>
14461 <tbody>
14462 <tr>
14463 <td class="parameter_name"><p>key</p></td>
14464 <td class="parameter_description"><p>a key</p></td>
14465 <td class="parameter_annotations"> </td>
14466 </tr>
14467 <tr>
14468 <td class="parameter_name"><p>digest</p></td>
14469 <td class="parameter_description"><p>should be a digest algorithm</p></td>
14470 <td class="parameter_annotations"> </td>
14471 </tr>
14472 <tr>
14473 <td class="parameter_name"><p>flags</p></td>
14474 <td class="parameter_description"><p>should be 0 for now</p></td>
14475 <td class="parameter_annotations"> </td>
14476 </tr>
14477 <tr>
14478 <td class="parameter_name"><p>data</p></td>
14479 <td class="parameter_description"><p>holds the data to be signed</p></td>
14480 <td class="parameter_annotations"> </td>
14481 </tr>
14482 <tr>
14483 <td class="parameter_name"><p>signature</p></td>
14484 <td class="parameter_description"><p>will contain the signature</p></td>
14485 <td class="parameter_annotations"> </td>
14486 </tr>
14487 <tr>
14488 <td class="parameter_name"><p>signature_size</p></td>
14489 <td class="parameter_description"><p>holds the size of signature (and will be replaced
14490 by the new size)</p></td>
14491 <td class="parameter_annotations"> </td>
14492 </tr>
14493 </tbody>
14494 </table></div>
14495 </div>
14496 <div class="refsect3">
14497 <a name="gnutls-x509-privkey-sign-data.returns"></a><h4>Returns</h4>
14498 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
14499 negative error value.</p>
14500 </div>
14501 </div>
14502 <hr>
14503 <div class="refsect2">
14504 <a name="gnutls-x509-crq-sign"></a><h3>gnutls_x509_crq_sign ()</h3>
14505 <pre class="programlisting"><span class="returnvalue">int</span>
14506 gnutls_x509_crq_sign (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
14507 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>);</pre>
14508 <p>This function is the same a <a class="link" href="gnutls-x509.html#gnutls-x509-crq-sign2" title="gnutls_x509_crq_sign2 ()"><code class="function">gnutls_x509_crq_sign2()</code></a> with no flags,
14509 and an appropriate hash algorithm. The hash algorithm used may
14510 vary between versions of GnuTLS, and it is tied to the security
14511 level of the issuer's public key.</p>
14512 <p>A known limitation of this function is, that a newly-signed request will not
14513 be fully functional (e.g., for signature verification), until it
14514 is exported an re-imported.</p>
14515 <div class="refsect3">
14516 <a name="gnutls-x509-crq-sign.parameters"></a><h4>Parameters</h4>
14517 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14518 <colgroup>
14519 <col width="150px" class="parameters_name">
14520 <col class="parameters_description">
14521 <col width="200px" class="parameters_annotations">
14522 </colgroup>
14523 <tbody>
14524 <tr>
14525 <td class="parameter_name"><p>crq</p></td>
14526 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
14527 <td class="parameter_annotations"> </td>
14528 </tr>
14529 <tr>
14530 <td class="parameter_name"><p>key</p></td>
14531 <td class="parameter_description"><p>holds a private key</p></td>
14532 <td class="parameter_annotations"> </td>
14533 </tr>
14534 </tbody>
14535 </table></div>
14536 </div>
14537 <div class="refsect3">
14538 <a name="gnutls-x509-crq-sign.returns"></a><h4>Returns</h4>
14539 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
14540 negative error value.</p>
14541 </div>
14542 </div>
14543 <hr>
14544 <div class="refsect2">
14545 <a name="gnutls-x509-crq-sign2"></a><h3>gnutls_x509_crq_sign2 ()</h3>
14546 <pre class="programlisting"><span class="returnvalue">int</span>
14547 gnutls_x509_crq_sign2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
14548 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>,
14549 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> dig</code></em>,
14550 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
14551 <p>This function will sign the certificate request with a private key.
14552 This must be the same key as the one used in
14553 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-set-key" title="gnutls_x509_crt_set_key ()"><code class="function">gnutls_x509_crt_set_key()</code></a> since a certificate request is self
14554 signed.</p>
14555 <p>This must be the last step in a certificate request generation
14556 since all the previously set parameters are now signed.</p>
14557 <p>A known limitation of this function is, that a newly-signed request will not
14558 be fully functional (e.g., for signature verification), until it
14559 is exported an re-imported.</p>
14560 <p>After GnuTLS 3.6.1 the value of <em class="parameter"><code>dig</code></em>
14561 may be <a class="link" href="gnutls-gnutls.html#GNUTLS-DIG-UNKNOWN:CAPS"><code class="literal">GNUTLS_DIG_UNKNOWN</code></a>,
14562 and in that case, a suitable but reasonable for the key algorithm will be selected.</p>
14563 <div class="refsect3">
14564 <a name="gnutls-x509-crq-sign2.parameters"></a><h4>Parameters</h4>
14565 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14566 <colgroup>
14567 <col width="150px" class="parameters_name">
14568 <col class="parameters_description">
14569 <col width="200px" class="parameters_annotations">
14570 </colgroup>
14571 <tbody>
14572 <tr>
14573 <td class="parameter_name"><p>crq</p></td>
14574 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
14575 <td class="parameter_annotations"> </td>
14576 </tr>
14577 <tr>
14578 <td class="parameter_name"><p>key</p></td>
14579 <td class="parameter_description"><p>holds a private key</p></td>
14580 <td class="parameter_annotations"> </td>
14581 </tr>
14582 <tr>
14583 <td class="parameter_name"><p>dig</p></td>
14584 <td class="parameter_description"><p>The message digest to use, i.e., <a class="link" href="gnutls-gnutls.html#GNUTLS-DIG-SHA256:CAPS"><code class="literal">GNUTLS_DIG_SHA256</code></a></p></td>
14585 <td class="parameter_annotations"> </td>
14586 </tr>
14587 <tr>
14588 <td class="parameter_name"><p>flags</p></td>
14589 <td class="parameter_description"><p>must be 0</p></td>
14590 <td class="parameter_annotations"> </td>
14591 </tr>
14592 </tbody>
14593 </table></div>
14594 </div>
14595 <div class="refsect3">
14596 <a name="gnutls-x509-crq-sign2.returns"></a><h4>Returns</h4>
14597 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.
14598 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-ASN1-VALUE-NOT-FOUND:CAPS" title="GNUTLS_E_ASN1_VALUE_NOT_FOUND"><code class="literal">GNUTLS_E_ASN1_VALUE_NOT_FOUND</code></a> is returned if you didn't set all
14599 information in the certificate request (e.g., the version using
14600 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-set-version" title="gnutls_x509_crq_set_version ()"><code class="function">gnutls_x509_crq_set_version()</code></a>).</p>
14601 </div>
14602 </div>
14603 <hr>
14604 <div class="refsect2">
14605 <a name="gnutls-x509-crq-print"></a><h3>gnutls_x509_crq_print ()</h3>
14606 <pre class="programlisting"><span class="returnvalue">int</span>
14607 gnutls_x509_crq_print (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
14608 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-certificate-print-formats-t" title="enum gnutls_certificate_print_formats_t"><span class="type">gnutls_certificate_print_formats_t</span></a> format</code></em>,
14609 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>);</pre>
14610 <p>This function will pretty print a certificate request, suitable for
14611 display to a human.</p>
14612 <p>The output <em class="parameter"><code>out</code></em>
14613 needs to be deallocated using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p>
14614 <div class="refsect3">
14615 <a name="gnutls-x509-crq-print.parameters"></a><h4>Parameters</h4>
14616 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14617 <colgroup>
14618 <col width="150px" class="parameters_name">
14619 <col class="parameters_description">
14620 <col width="200px" class="parameters_annotations">
14621 </colgroup>
14622 <tbody>
14623 <tr>
14624 <td class="parameter_name"><p>crq</p></td>
14625 <td class="parameter_description"><p>The data to be printed</p></td>
14626 <td class="parameter_annotations"> </td>
14627 </tr>
14628 <tr>
14629 <td class="parameter_name"><p>format</p></td>
14630 <td class="parameter_description"><p>Indicate the format to use</p></td>
14631 <td class="parameter_annotations"> </td>
14632 </tr>
14633 <tr>
14634 <td class="parameter_name"><p>out</p></td>
14635 <td class="parameter_description"><p>Newly allocated datum with null terminated string.</p></td>
14636 <td class="parameter_annotations"> </td>
14637 </tr>
14638 </tbody>
14639 </table></div>
14640 </div>
14641 <div class="refsect3">
14642 <a name="gnutls-x509-crq-print.returns"></a><h4>Returns</h4>
14643 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
14644 negative error value.</p>
14645 </div>
14646 <p class="since">Since: 2.8.0</p>
14647 </div>
14648 <hr>
14649 <div class="refsect2">
14650 <a name="gnutls-x509-crq-verify"></a><h3>gnutls_x509_crq_verify ()</h3>
14651 <pre class="programlisting"><span class="returnvalue">int</span>
14652 gnutls_x509_crq_verify (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
14653 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
14654 <p>This function will verify self signature in the certificate
14655 request and return its status.</p>
14656 <div class="refsect3">
14657 <a name="gnutls-x509-crq-verify.parameters"></a><h4>Parameters</h4>
14658 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14659 <colgroup>
14660 <col width="150px" class="parameters_name">
14661 <col class="parameters_description">
14662 <col width="200px" class="parameters_annotations">
14663 </colgroup>
14664 <tbody>
14665 <tr>
14666 <td class="parameter_name"><p>crq</p></td>
14667 <td class="parameter_description"><p>is the crq to be verified</p></td>
14668 <td class="parameter_annotations"> </td>
14669 </tr>
14670 <tr>
14671 <td class="parameter_name"><p>flags</p></td>
14672 <td class="parameter_description"><p>Flags that may be used to change the verification algorithm. Use OR of the gnutls_certificate_verify_flags enumerations.</p></td>
14673 <td class="parameter_annotations"> </td>
14674 </tr>
14675 </tbody>
14676 </table></div>
14677 </div>
14678 <div class="refsect3">
14679 <a name="gnutls-x509-crq-verify.returns"></a><h4>Returns</h4>
14680 <p> In case of a verification failure <a class="link" href="gnutls-gnutls.html#GNUTLS-E-PK-SIG-VERIFY-FAILED:CAPS" title="GNUTLS_E_PK_SIG_VERIFY_FAILED"><code class="literal">GNUTLS_E_PK_SIG_VERIFY_FAILED</code></a>
14681 is returned, and zero or positive code on success.</p>
14682 <p>Since 2.12.0</p>
14683 </div>
14684 </div>
14685 <hr>
14686 <div class="refsect2">
14687 <a name="gnutls-x509-crq-init"></a><h3>gnutls_x509_crq_init ()</h3>
14688 <pre class="programlisting"><span class="returnvalue">int</span>
14689 gnutls_x509_crq_init (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> *crq</code></em>);</pre>
14690 <p>This function will initialize a PKCS<span class="type">10</span> certificate request
14691 structure.</p>
14692 <div class="refsect3">
14693 <a name="gnutls-x509-crq-init.parameters"></a><h4>Parameters</h4>
14694 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14695 <colgroup>
14696 <col width="150px" class="parameters_name">
14697 <col class="parameters_description">
14698 <col width="200px" class="parameters_annotations">
14699 </colgroup>
14700 <tbody><tr>
14701 <td class="parameter_name"><p>crq</p></td>
14702 <td class="parameter_description"><p>A pointer to the type to be initialized</p></td>
14703 <td class="parameter_annotations"> </td>
14704 </tr></tbody>
14705 </table></div>
14706 </div>
14707 <div class="refsect3">
14708 <a name="gnutls-x509-crq-init.returns"></a><h4>Returns</h4>
14709 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
14710 negative error value.</p>
14711 </div>
14712 </div>
14713 <hr>
14714 <div class="refsect2">
14715 <a name="gnutls-x509-crq-deinit"></a><h3>gnutls_x509_crq_deinit ()</h3>
14716 <pre class="programlisting"><span class="returnvalue">void</span>
14717 gnutls_x509_crq_deinit (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>);</pre>
14718 <p>This function will deinitialize a PKCS<span class="type">10</span> certificate request
14719 structure.</p>
14720 <div class="refsect3">
14721 <a name="gnutls-x509-crq-deinit.parameters"></a><h4>Parameters</h4>
14722 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14723 <colgroup>
14724 <col width="150px" class="parameters_name">
14725 <col class="parameters_description">
14726 <col width="200px" class="parameters_annotations">
14727 </colgroup>
14728 <tbody><tr>
14729 <td class="parameter_name"><p>crq</p></td>
14730 <td class="parameter_description"><p>the type to be deinitialized</p></td>
14731 <td class="parameter_annotations"> </td>
14732 </tr></tbody>
14733 </table></div>
14734 </div>
14735 </div>
14736 <hr>
14737 <div class="refsect2">
14738 <a name="gnutls-x509-crq-import"></a><h3>gnutls_x509_crq_import ()</h3>
14739 <pre class="programlisting"><span class="returnvalue">int</span>
14740 gnutls_x509_crq_import (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
14741 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>,
14742 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>);</pre>
14743 <p>This function will convert the given DER or PEM encoded certificate
14744 request to a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type. The output will be
14745 stored in <em class="parameter"><code>crq</code></em>
14746 .</p>
14747 <p>If the Certificate is PEM encoded it should have a header of "NEW
14748 CERTIFICATE REQUEST".</p>
14749 <div class="refsect3">
14750 <a name="gnutls-x509-crq-import.parameters"></a><h4>Parameters</h4>
14751 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14752 <colgroup>
14753 <col width="150px" class="parameters_name">
14754 <col class="parameters_description">
14755 <col width="200px" class="parameters_annotations">
14756 </colgroup>
14757 <tbody>
14758 <tr>
14759 <td class="parameter_name"><p>crq</p></td>
14760 <td class="parameter_description"><p>The data to store the parsed certificate request.</p></td>
14761 <td class="parameter_annotations"> </td>
14762 </tr>
14763 <tr>
14764 <td class="parameter_name"><p>data</p></td>
14765 <td class="parameter_description"><p>The DER or PEM encoded certificate.</p></td>
14766 <td class="parameter_annotations"> </td>
14767 </tr>
14768 <tr>
14769 <td class="parameter_name"><p>format</p></td>
14770 <td class="parameter_description"><p>One of DER or PEM</p></td>
14771 <td class="parameter_annotations"> </td>
14772 </tr>
14773 </tbody>
14774 </table></div>
14775 </div>
14776 <div class="refsect3">
14777 <a name="gnutls-x509-crq-import.returns"></a><h4>Returns</h4>
14778 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
14779 negative error value.</p>
14780 </div>
14781 </div>
14782 <hr>
14783 <div class="refsect2">
14784 <a name="gnutls-x509-crq-get-private-key-usage-period"></a><h3>gnutls_x509_crq_get_private_key_usage_period ()</h3>
14785 <pre class="programlisting"><span class="returnvalue">int</span>
14786 gnutls_x509_crq_get_private_key_usage_period
14787 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> cert</code></em>,
14788 <em class="parameter"><code><span class="type">time_t</span> *activation</code></em>,
14789 <em class="parameter"><code><span class="type">time_t</span> *expiration</code></em>,
14790 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
14791 <p>This function will return the expiration and activation
14792 times of the private key of the certificate.</p>
14793 <div class="refsect3">
14794 <a name="gnutls-x509-crq-get-private-key-usage-period.parameters"></a><h4>Parameters</h4>
14795 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14796 <colgroup>
14797 <col width="150px" class="parameters_name">
14798 <col class="parameters_description">
14799 <col width="200px" class="parameters_annotations">
14800 </colgroup>
14801 <tbody>
14802 <tr>
14803 <td class="parameter_name"><p>crq</p></td>
14804 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
14805 <td class="parameter_annotations"> </td>
14806 </tr>
14807 <tr>
14808 <td class="parameter_name"><p>activation</p></td>
14809 <td class="parameter_description"><p>The activation time</p></td>
14810 <td class="parameter_annotations"> </td>
14811 </tr>
14812 <tr>
14813 <td class="parameter_name"><p>expiration</p></td>
14814 <td class="parameter_description"><p>The expiration time</p></td>
14815 <td class="parameter_annotations"> </td>
14816 </tr>
14817 <tr>
14818 <td class="parameter_name"><p>critical</p></td>
14819 <td class="parameter_description"><p>the extension status</p></td>
14820 <td class="parameter_annotations"> </td>
14821 </tr>
14822 </tbody>
14823 </table></div>
14824 </div>
14825 <div class="refsect3">
14826 <a name="gnutls-x509-crq-get-private-key-usage-period.returns"></a><h4>Returns</h4>
14827 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
14828 if the extension is not present, otherwise a negative error value.</p>
14829 </div>
14830 </div>
14831 <hr>
14832 <div class="refsect2">
14833 <a name="gnutls-x509-crq-get-dn"></a><h3>gnutls_x509_crq_get_dn ()</h3>
14834 <pre class="programlisting"><span class="returnvalue">int</span>
14835 gnutls_x509_crq_get_dn (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
14836 <em class="parameter"><code><span class="type">char</span> *buf</code></em>,
14837 <em class="parameter"><code><span class="type">size_t</span> *sizeof_buf</code></em>);</pre>
14838 <p>This function will copy the name of the Certificate request subject
14839 to the provided buffer. The name will be in the form
14840 "C=xxxx,O=yyyy,CN=zzzz" as described in RFC 2253. The output string
14841 <em class="parameter"><code>buf</code></em>
14842 will be ASCII or UTF-8 encoded, depending on the certificate
14843 data.</p>
14844 <p>This function does not output a fully RFC4514 compliant string, if
14845 that is required see <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-dn3" title="gnutls_x509_crq_get_dn3 ()"><code class="function">gnutls_x509_crq_get_dn3()</code></a>.</p>
14846 <div class="refsect3">
14847 <a name="gnutls-x509-crq-get-dn.parameters"></a><h4>Parameters</h4>
14848 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14849 <colgroup>
14850 <col width="150px" class="parameters_name">
14851 <col class="parameters_description">
14852 <col width="200px" class="parameters_annotations">
14853 </colgroup>
14854 <tbody>
14855 <tr>
14856 <td class="parameter_name"><p>crq</p></td>
14857 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
14858 <td class="parameter_annotations"> </td>
14859 </tr>
14860 <tr>
14861 <td class="parameter_name"><p>buf</p></td>
14862 <td class="parameter_description"><p>a pointer to a structure to hold the name (may be <code class="literal">NULL</code>)</p></td>
14863 <td class="parameter_annotations"> </td>
14864 </tr>
14865 <tr>
14866 <td class="parameter_name"><p>buf_size</p></td>
14867 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>buf</code></em>
14868 </p></td>
14869 <td class="parameter_annotations"> </td>
14870 </tr>
14871 </tbody>
14872 </table></div>
14873 </div>
14874 <div class="refsect3">
14875 <a name="gnutls-x509-crq-get-dn.returns"></a><h4>Returns</h4>
14876 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the provided buffer is not
14877 long enough, and in that case the *<em class="parameter"><code>buf_size</code></em>
14878 will be updated with
14879 the required size. On success 0 is returned.</p>
14880 </div>
14881 </div>
14882 <hr>
14883 <div class="refsect2">
14884 <a name="gnutls-x509-crq-get-dn2"></a><h3>gnutls_x509_crq_get_dn2 ()</h3>
14885 <pre class="programlisting"><span class="returnvalue">int</span>
14886 gnutls_x509_crq_get_dn2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
14887 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *dn</code></em>);</pre>
14888 <p>This function will allocate buffer and copy the name of the Certificate
14889 request. The name will be in the form "C=xxxx,O=yyyy,CN=zzzz" as
14890 described in RFC4514. The output string will be ASCII or UTF-8
14891 encoded, depending on the certificate data.</p>
14892 <p>This function does not output a fully RFC4514 compliant string, if
14893 that is required see <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-dn3" title="gnutls_x509_crq_get_dn3 ()"><code class="function">gnutls_x509_crq_get_dn3()</code></a>.</p>
14894 <div class="refsect3">
14895 <a name="gnutls-x509-crq-get-dn2.parameters"></a><h4>Parameters</h4>
14896 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14897 <colgroup>
14898 <col width="150px" class="parameters_name">
14899 <col class="parameters_description">
14900 <col width="200px" class="parameters_annotations">
14901 </colgroup>
14902 <tbody>
14903 <tr>
14904 <td class="parameter_name"><p>crq</p></td>
14905 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
14906 <td class="parameter_annotations"> </td>
14907 </tr>
14908 <tr>
14909 <td class="parameter_name"><p>dn</p></td>
14910 <td class="parameter_description"><p>a pointer to a structure to hold the name; must be freed using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a></p></td>
14911 <td class="parameter_annotations"> </td>
14912 </tr>
14913 </tbody>
14914 </table></div>
14915 </div>
14916 <div class="refsect3">
14917 <a name="gnutls-x509-crq-get-dn2.returns"></a><h4>Returns</h4>
14918 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
14919 negative error value. and a negative error code on error.</p>
14920 </div>
14921 <p class="since">Since: 3.1.10</p>
14922 </div>
14923 <hr>
14924 <div class="refsect2">
14925 <a name="gnutls-x509-crq-get-dn3"></a><h3>gnutls_x509_crq_get_dn3 ()</h3>
14926 <pre class="programlisting"><span class="returnvalue">int</span>
14927 gnutls_x509_crq_get_dn3 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
14928 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *dn</code></em>,
14929 <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre>
14930 <p>This function will allocate buffer and copy the name of the Certificate
14931 request. The name will be in the form "C=xxxx,O=yyyy,CN=zzzz" as
14932 described in RFC4514. The output string will be ASCII or UTF-8
14933 encoded, depending on the certificate data.</p>
14934 <p>When the flag <a class="link" href="gnutls-x509.html#GNUTLS-X509-DN-FLAG-COMPAT:CAPS" title="GNUTLS_X509_DN_FLAG_COMPAT"><code class="literal">GNUTLS_X509_DN_FLAG_COMPAT</code></a> is specified, the output
14935 format will match the format output by previous to 3.5.6 versions of GnuTLS
14936 which was not not fully RFC4514-compliant.</p>
14937 <div class="refsect3">
14938 <a name="gnutls-x509-crq-get-dn3.parameters"></a><h4>Parameters</h4>
14939 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14940 <colgroup>
14941 <col width="150px" class="parameters_name">
14942 <col class="parameters_description">
14943 <col width="200px" class="parameters_annotations">
14944 </colgroup>
14945 <tbody>
14946 <tr>
14947 <td class="parameter_name"><p>crq</p></td>
14948 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
14949 <td class="parameter_annotations"> </td>
14950 </tr>
14951 <tr>
14952 <td class="parameter_name"><p>dn</p></td>
14953 <td class="parameter_description"><p>a pointer to a structure to hold the name; must be freed using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a></p></td>
14954 <td class="parameter_annotations"> </td>
14955 </tr>
14956 <tr>
14957 <td class="parameter_name"><p>flags</p></td>
14958 <td class="parameter_description"><p>zero or <a class="link" href="gnutls-x509.html#GNUTLS-X509-DN-FLAG-COMPAT:CAPS" title="GNUTLS_X509_DN_FLAG_COMPAT"><code class="literal">GNUTLS_X509_DN_FLAG_COMPAT</code></a></p></td>
14959 <td class="parameter_annotations"> </td>
14960 </tr>
14961 </tbody>
14962 </table></div>
14963 </div>
14964 <div class="refsect3">
14965 <a name="gnutls-x509-crq-get-dn3.returns"></a><h4>Returns</h4>
14966 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
14967 negative error value. and a negative error code on error.</p>
14968 </div>
14969 <p class="since">Since: 3.5.7</p>
14970 </div>
14971 <hr>
14972 <div class="refsect2">
14973 <a name="gnutls-x509-crq-get-dn-oid"></a><h3>gnutls_x509_crq_get_dn_oid ()</h3>
14974 <pre class="programlisting"><span class="returnvalue">int</span>
14975 gnutls_x509_crq_get_dn_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
14976 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
14977 <em class="parameter"><code><span class="type">void</span> *oid</code></em>,
14978 <em class="parameter"><code><span class="type">size_t</span> *sizeof_oid</code></em>);</pre>
14979 <p>This function will extract the requested OID of the name of the
14980 certificate request subject, specified by the given index.</p>
14981 <div class="refsect3">
14982 <a name="gnutls-x509-crq-get-dn-oid.parameters"></a><h4>Parameters</h4>
14983 <div class="informaltable"><table class="informaltable" width="100%" border="0">
14984 <colgroup>
14985 <col width="150px" class="parameters_name">
14986 <col class="parameters_description">
14987 <col width="200px" class="parameters_annotations">
14988 </colgroup>
14989 <tbody>
14990 <tr>
14991 <td class="parameter_name"><p>crq</p></td>
14992 <td class="parameter_description"><p>should contain a gnutls_x509_crq_t type</p></td>
14993 <td class="parameter_annotations"> </td>
14994 </tr>
14995 <tr>
14996 <td class="parameter_name"><p>indx</p></td>
14997 <td class="parameter_description"><p>Specifies which DN OID to get. Use (0) to get the first one.</p></td>
14998 <td class="parameter_annotations"> </td>
14999 </tr>
15000 <tr>
15001 <td class="parameter_name"><p>oid</p></td>
15002 <td class="parameter_description"><p>a pointer to a structure to hold the name (may be <code class="literal">NULL</code>)</p></td>
15003 <td class="parameter_annotations"> </td>
15004 </tr>
15005 <tr>
15006 <td class="parameter_name"><p>sizeof_oid</p></td>
15007 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>oid</code></em>
15008 </p></td>
15009 <td class="parameter_annotations"> </td>
15010 </tr>
15011 </tbody>
15012 </table></div>
15013 </div>
15014 <div class="refsect3">
15015 <a name="gnutls-x509-crq-get-dn-oid.returns"></a><h4>Returns</h4>
15016 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the provided buffer is
15017 not long enough, and in that case the *<em class="parameter"><code>sizeof_oid</code></em>
15018 will be
15019 updated with the required size. On success 0 is returned.</p>
15020 </div>
15021 </div>
15022 <hr>
15023 <div class="refsect2">
15024 <a name="gnutls-x509-crq-get-dn-by-oid"></a><h3>gnutls_x509_crq_get_dn_by_oid ()</h3>
15025 <pre class="programlisting"><span class="returnvalue">int</span>
15026 gnutls_x509_crq_get_dn_by_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15027 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
15028 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
15029 <em class="parameter"><code>unsigned <span class="type">int</span> raw_flag</code></em>,
15030 <em class="parameter"><code><span class="type">void</span> *buf</code></em>,
15031 <em class="parameter"><code><span class="type">size_t</span> *sizeof_buf</code></em>);</pre>
15032 <p>This function will extract the part of the name of the Certificate
15033 request subject, specified by the given OID. The output will be
15034 encoded as described in RFC2253. The output string will be ASCII
15035 or UTF-8 encoded, depending on the certificate data.</p>
15036 <p>Some helper macros with popular OIDs can be found in gnutls/x509.h
15037 If raw flag is (0), this function will only return known OIDs as
15038 text. Other OIDs will be DER encoded, as described in RFC2253 --
15039 in hex format with a '#' prefix. You can check about known OIDs
15040 using <a class="link" href="gnutls-x509.html#gnutls-x509-dn-oid-known" title="gnutls_x509_dn_oid_known ()"><code class="function">gnutls_x509_dn_oid_known()</code></a>.</p>
15041 <div class="refsect3">
15042 <a name="gnutls-x509-crq-get-dn-by-oid.parameters"></a><h4>Parameters</h4>
15043 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15044 <colgroup>
15045 <col width="150px" class="parameters_name">
15046 <col class="parameters_description">
15047 <col width="200px" class="parameters_annotations">
15048 </colgroup>
15049 <tbody>
15050 <tr>
15051 <td class="parameter_name"><p>crq</p></td>
15052 <td class="parameter_description"><p>should contain a gnutls_x509_crq_t type</p></td>
15053 <td class="parameter_annotations"> </td>
15054 </tr>
15055 <tr>
15056 <td class="parameter_name"><p>oid</p></td>
15057 <td class="parameter_description"><p>holds an Object Identifier in a null terminated string</p></td>
15058 <td class="parameter_annotations"> </td>
15059 </tr>
15060 <tr>
15061 <td class="parameter_name"><p>indx</p></td>
15062 <td class="parameter_description"><p>In case multiple same OIDs exist in the RDN, this specifies
15063 which to get. Use (0) to get the first one.</p></td>
15064 <td class="parameter_annotations"> </td>
15065 </tr>
15066 <tr>
15067 <td class="parameter_name"><p>raw_flag</p></td>
15068 <td class="parameter_description"><p>If non-zero returns the raw DER data of the DN part.</p></td>
15069 <td class="parameter_annotations"> </td>
15070 </tr>
15071 <tr>
15072 <td class="parameter_name"><p>buf</p></td>
15073 <td class="parameter_description"><p>a pointer to a structure to hold the name (may be <code class="literal">NULL</code>)</p></td>
15074 <td class="parameter_annotations"> </td>
15075 </tr>
15076 <tr>
15077 <td class="parameter_name"><p>buf_size</p></td>
15078 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>buf</code></em>
15079 </p></td>
15080 <td class="parameter_annotations"> </td>
15081 </tr>
15082 </tbody>
15083 </table></div>
15084 </div>
15085 <div class="refsect3">
15086 <a name="gnutls-x509-crq-get-dn-by-oid.returns"></a><h4>Returns</h4>
15087 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the provided buffer is
15088 not long enough, and in that case the *<em class="parameter"><code>buf_size</code></em>
15089 will be
15090 updated with the required size. On success 0 is returned.</p>
15091 </div>
15092 </div>
15093 <hr>
15094 <div class="refsect2">
15095 <a name="gnutls-x509-crq-set-dn"></a><h3>gnutls_x509_crq_set_dn ()</h3>
15096 <pre class="programlisting"><span class="returnvalue">int</span>
15097 gnutls_x509_crq_set_dn (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15098 <em class="parameter"><code>const <span class="type">char</span> *dn</code></em>,
15099 <em class="parameter"><code>const <span class="type">char</span> **err</code></em>);</pre>
15100 <p>This function will set the DN on the provided certificate.
15101 The input string should be plain ASCII or UTF-8 encoded. On
15102 DN parsing error <a class="link" href="gnutls-gnutls.html#GNUTLS-E-PARSING-ERROR:CAPS" title="GNUTLS_E_PARSING_ERROR"><code class="literal">GNUTLS_E_PARSING_ERROR</code></a> is returned.</p>
15103 <div class="refsect3">
15104 <a name="gnutls-x509-crq-set-dn.parameters"></a><h4>Parameters</h4>
15105 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15106 <colgroup>
15107 <col width="150px" class="parameters_name">
15108 <col class="parameters_description">
15109 <col width="200px" class="parameters_annotations">
15110 </colgroup>
15111 <tbody>
15112 <tr>
15113 <td class="parameter_name"><p>crq</p></td>
15114 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a></p></td>
15115 <td class="parameter_annotations"> </td>
15116 </tr>
15117 <tr>
15118 <td class="parameter_name"><p>dn</p></td>
15119 <td class="parameter_description"><p>a comma separated DN string (RFC4514)</p></td>
15120 <td class="parameter_annotations"> </td>
15121 </tr>
15122 <tr>
15123 <td class="parameter_name"><p>err</p></td>
15124 <td class="parameter_description"><p>indicates the error position (if any)</p></td>
15125 <td class="parameter_annotations"> </td>
15126 </tr>
15127 </tbody>
15128 </table></div>
15129 </div>
15130 <div class="refsect3">
15131 <a name="gnutls-x509-crq-set-dn.returns"></a><h4>Returns</h4>
15132 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15133 negative error value.</p>
15134 </div>
15135 </div>
15136 <hr>
15137 <div class="refsect2">
15138 <a name="gnutls-x509-crq-set-dn-by-oid"></a><h3>gnutls_x509_crq_set_dn_by_oid ()</h3>
15139 <pre class="programlisting"><span class="returnvalue">int</span>
15140 gnutls_x509_crq_set_dn_by_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15141 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
15142 <em class="parameter"><code>unsigned <span class="type">int</span> raw_flag</code></em>,
15143 <em class="parameter"><code>const <span class="type">void</span> *data</code></em>,
15144 <em class="parameter"><code>unsigned <span class="type">int</span> sizeof_data</code></em>);</pre>
15145 <p>This function will set the part of the name of the Certificate
15146 request subject, specified by the given OID. The input string
15147 should be ASCII or UTF-8 encoded.</p>
15148 <p>Some helper macros with popular OIDs can be found in gnutls/x509.h
15149 With this function you can only set the known OIDs. You can test
15150 for known OIDs using <a class="link" href="gnutls-x509.html#gnutls-x509-dn-oid-known" title="gnutls_x509_dn_oid_known ()"><code class="function">gnutls_x509_dn_oid_known()</code></a>. For OIDs that are
15151 not known (by gnutls) you should properly DER encode your data, and
15152 call this function with raw_flag set.</p>
15153 <div class="refsect3">
15154 <a name="gnutls-x509-crq-set-dn-by-oid.parameters"></a><h4>Parameters</h4>
15155 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15156 <colgroup>
15157 <col width="150px" class="parameters_name">
15158 <col class="parameters_description">
15159 <col width="200px" class="parameters_annotations">
15160 </colgroup>
15161 <tbody>
15162 <tr>
15163 <td class="parameter_name"><p>crq</p></td>
15164 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
15165 <td class="parameter_annotations"> </td>
15166 </tr>
15167 <tr>
15168 <td class="parameter_name"><p>oid</p></td>
15169 <td class="parameter_description"><p>holds an Object Identifier in a (0)-terminated string</p></td>
15170 <td class="parameter_annotations"> </td>
15171 </tr>
15172 <tr>
15173 <td class="parameter_name"><p>raw_flag</p></td>
15174 <td class="parameter_description"><p>must be 0, or 1 if the data are DER encoded</p></td>
15175 <td class="parameter_annotations"> </td>
15176 </tr>
15177 <tr>
15178 <td class="parameter_name"><p>data</p></td>
15179 <td class="parameter_description"><p>a pointer to the input data</p></td>
15180 <td class="parameter_annotations"> </td>
15181 </tr>
15182 <tr>
15183 <td class="parameter_name"><p>sizeof_data</p></td>
15184 <td class="parameter_description"><p>holds the size of <em class="parameter"><code>data</code></em>
15185 </p></td>
15186 <td class="parameter_annotations"> </td>
15187 </tr>
15188 </tbody>
15189 </table></div>
15190 </div>
15191 <div class="refsect3">
15192 <a name="gnutls-x509-crq-set-dn-by-oid.returns"></a><h4>Returns</h4>
15193 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15194 negative error value.</p>
15195 </div>
15196 </div>
15197 <hr>
15198 <div class="refsect2">
15199 <a name="gnutls-x509-crq-set-version"></a><h3>gnutls_x509_crq_set_version ()</h3>
15200 <pre class="programlisting"><span class="returnvalue">int</span>
15201 gnutls_x509_crq_set_version (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15202 <em class="parameter"><code>unsigned <span class="type">int</span> version</code></em>);</pre>
15203 <p>This function will set the version of the certificate request. For
15204 version 1 requests this must be one.</p>
15205 <div class="refsect3">
15206 <a name="gnutls-x509-crq-set-version.parameters"></a><h4>Parameters</h4>
15207 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15208 <colgroup>
15209 <col width="150px" class="parameters_name">
15210 <col class="parameters_description">
15211 <col width="200px" class="parameters_annotations">
15212 </colgroup>
15213 <tbody>
15214 <tr>
15215 <td class="parameter_name"><p>crq</p></td>
15216 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
15217 <td class="parameter_annotations"> </td>
15218 </tr>
15219 <tr>
15220 <td class="parameter_name"><p>version</p></td>
15221 <td class="parameter_description"><p>holds the version number, for v1 Requests must be 1</p></td>
15222 <td class="parameter_annotations"> </td>
15223 </tr>
15224 </tbody>
15225 </table></div>
15226 </div>
15227 <div class="refsect3">
15228 <a name="gnutls-x509-crq-set-version.returns"></a><h4>Returns</h4>
15229 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15230 negative error value.</p>
15231 </div>
15232 </div>
15233 <hr>
15234 <div class="refsect2">
15235 <a name="gnutls-x509-crq-get-version"></a><h3>gnutls_x509_crq_get_version ()</h3>
15236 <pre class="programlisting"><span class="returnvalue">int</span>
15237 gnutls_x509_crq_get_version (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>);</pre>
15238 <p>This function will return the version of the specified Certificate
15239 request.</p>
15240 <div class="refsect3">
15241 <a name="gnutls-x509-crq-get-version.parameters"></a><h4>Parameters</h4>
15242 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15243 <colgroup>
15244 <col width="150px" class="parameters_name">
15245 <col class="parameters_description">
15246 <col width="200px" class="parameters_annotations">
15247 </colgroup>
15248 <tbody><tr>
15249 <td class="parameter_name"><p>crq</p></td>
15250 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
15251 <td class="parameter_annotations"> </td>
15252 </tr></tbody>
15253 </table></div>
15254 </div>
15255 <div class="refsect3">
15256 <a name="gnutls-x509-crq-get-version.returns"></a><h4>Returns</h4>
15257 <p> version of certificate request, or a negative error code on
15258 error.</p>
15259 </div>
15260 </div>
15261 <hr>
15262 <div class="refsect2">
15263 <a name="gnutls-x509-crq-set-key"></a><h3>gnutls_x509_crq_set_key ()</h3>
15264 <pre class="programlisting"><span class="returnvalue">int</span>
15265 gnutls_x509_crq_set_key (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15266 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>);</pre>
15267 <p>This function will set the public parameters from the given private
15268 key to the request.</p>
15269 <div class="refsect3">
15270 <a name="gnutls-x509-crq-set-key.parameters"></a><h4>Parameters</h4>
15271 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15272 <colgroup>
15273 <col width="150px" class="parameters_name">
15274 <col class="parameters_description">
15275 <col width="200px" class="parameters_annotations">
15276 </colgroup>
15277 <tbody>
15278 <tr>
15279 <td class="parameter_name"><p>crq</p></td>
15280 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
15281 <td class="parameter_annotations"> </td>
15282 </tr>
15283 <tr>
15284 <td class="parameter_name"><p>key</p></td>
15285 <td class="parameter_description"><p>holds a private key</p></td>
15286 <td class="parameter_annotations"> </td>
15287 </tr>
15288 </tbody>
15289 </table></div>
15290 </div>
15291 <div class="refsect3">
15292 <a name="gnutls-x509-crq-set-key.returns"></a><h4>Returns</h4>
15293 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15294 negative error value.</p>
15295 </div>
15296 </div>
15297 <hr>
15298 <div class="refsect2">
15299 <a name="gnutls-x509-crq-set-extension-by-oid"></a><h3>gnutls_x509_crq_set_extension_by_oid ()</h3>
15300 <pre class="programlisting"><span class="returnvalue">int</span>
15301 gnutls_x509_crq_set_extension_by_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15302 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
15303 <em class="parameter"><code>const <span class="type">void</span> *buf</code></em>,
15304 <em class="parameter"><code><span class="type">size_t</span> sizeof_buf</code></em>,
15305 <em class="parameter"><code>unsigned <span class="type">int</span> critical</code></em>);</pre>
15306 <p>This function will set an the extension, by the specified OID, in
15307 the certificate request. The extension data should be binary data DER
15308 encoded.</p>
15309 <div class="refsect3">
15310 <a name="gnutls-x509-crq-set-extension-by-oid.parameters"></a><h4>Parameters</h4>
15311 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15312 <colgroup>
15313 <col width="150px" class="parameters_name">
15314 <col class="parameters_description">
15315 <col width="200px" class="parameters_annotations">
15316 </colgroup>
15317 <tbody>
15318 <tr>
15319 <td class="parameter_name"><p>crq</p></td>
15320 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a></p></td>
15321 <td class="parameter_annotations"> </td>
15322 </tr>
15323 <tr>
15324 <td class="parameter_name"><p>oid</p></td>
15325 <td class="parameter_description"><p>holds an Object Identifier in null terminated string</p></td>
15326 <td class="parameter_annotations"> </td>
15327 </tr>
15328 <tr>
15329 <td class="parameter_name"><p>buf</p></td>
15330 <td class="parameter_description"><p>a pointer to a DER encoded data</p></td>
15331 <td class="parameter_annotations"> </td>
15332 </tr>
15333 <tr>
15334 <td class="parameter_name"><p>sizeof_buf</p></td>
15335 <td class="parameter_description"><p>holds the size of <em class="parameter"><code>buf</code></em>
15336 </p></td>
15337 <td class="parameter_annotations"> </td>
15338 </tr>
15339 <tr>
15340 <td class="parameter_name"><p>critical</p></td>
15341 <td class="parameter_description"><p>should be non-zero if the extension is to be marked as critical</p></td>
15342 <td class="parameter_annotations"> </td>
15343 </tr>
15344 </tbody>
15345 </table></div>
15346 </div>
15347 <div class="refsect3">
15348 <a name="gnutls-x509-crq-set-extension-by-oid.returns"></a><h4>Returns</h4>
15349 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15350 negative error value.</p>
15351 </div>
15352 </div>
15353 <hr>
15354 <div class="refsect2">
15355 <a name="gnutls-x509-crq-set-challenge-password"></a><h3>gnutls_x509_crq_set_challenge_password ()</h3>
15356 <pre class="programlisting"><span class="returnvalue">int</span>
15357 gnutls_x509_crq_set_challenge_password
15358 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15359 <em class="parameter"><code>const <span class="type">char</span> *pass</code></em>);</pre>
15360 <p>This function will set a challenge password to be used when
15361 revoking the request.</p>
15362 <div class="refsect3">
15363 <a name="gnutls-x509-crq-set-challenge-password.parameters"></a><h4>Parameters</h4>
15364 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15365 <colgroup>
15366 <col width="150px" class="parameters_name">
15367 <col class="parameters_description">
15368 <col width="200px" class="parameters_annotations">
15369 </colgroup>
15370 <tbody>
15371 <tr>
15372 <td class="parameter_name"><p>crq</p></td>
15373 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
15374 <td class="parameter_annotations"> </td>
15375 </tr>
15376 <tr>
15377 <td class="parameter_name"><p>pass</p></td>
15378 <td class="parameter_description"><p>holds a (0)-terminated password</p></td>
15379 <td class="parameter_annotations"> </td>
15380 </tr>
15381 </tbody>
15382 </table></div>
15383 </div>
15384 <div class="refsect3">
15385 <a name="gnutls-x509-crq-set-challenge-password.returns"></a><h4>Returns</h4>
15386 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15387 negative error value.</p>
15388 </div>
15389 </div>
15390 <hr>
15391 <div class="refsect2">
15392 <a name="gnutls-x509-crq-get-challenge-password"></a><h3>gnutls_x509_crq_get_challenge_password ()</h3>
15393 <pre class="programlisting"><span class="returnvalue">int</span>
15394 gnutls_x509_crq_get_challenge_password
15395 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15396 <em class="parameter"><code><span class="type">char</span> *pass</code></em>,
15397 <em class="parameter"><code><span class="type">size_t</span> *sizeof_pass</code></em>);</pre>
15398 <p>This function will return the challenge password in the request.
15399 The challenge password is intended to be used for requesting a
15400 revocation of the certificate.</p>
15401 <div class="refsect3">
15402 <a name="gnutls-x509-crq-get-challenge-password.parameters"></a><h4>Parameters</h4>
15403 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15404 <colgroup>
15405 <col width="150px" class="parameters_name">
15406 <col class="parameters_description">
15407 <col width="200px" class="parameters_annotations">
15408 </colgroup>
15409 <tbody>
15410 <tr>
15411 <td class="parameter_name"><p>crq</p></td>
15412 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
15413 <td class="parameter_annotations"> </td>
15414 </tr>
15415 <tr>
15416 <td class="parameter_name"><p>pass</p></td>
15417 <td class="parameter_description"><p>will hold a (0)-terminated password string</p></td>
15418 <td class="parameter_annotations"> </td>
15419 </tr>
15420 <tr>
15421 <td class="parameter_name"><p>pass_size</p></td>
15422 <td class="parameter_description"><p>Initially holds the size of <em class="parameter"><code>pass</code></em>
15423 .</p></td>
15424 <td class="parameter_annotations"> </td>
15425 </tr>
15426 </tbody>
15427 </table></div>
15428 </div>
15429 <div class="refsect3">
15430 <a name="gnutls-x509-crq-get-challenge-password.returns"></a><h4>Returns</h4>
15431 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15432 negative error value.</p>
15433 </div>
15434 </div>
15435 <hr>
15436 <div class="refsect2">
15437 <a name="gnutls-x509-crq-set-attribute-by-oid"></a><h3>gnutls_x509_crq_set_attribute_by_oid ()</h3>
15438 <pre class="programlisting"><span class="returnvalue">int</span>
15439 gnutls_x509_crq_set_attribute_by_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15440 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
15441 <em class="parameter"><code><span class="type">void</span> *buf</code></em>,
15442 <em class="parameter"><code><span class="type">size_t</span> sizeof_buf</code></em>);</pre>
15443 <p>This function will set the attribute in the certificate request
15444 specified by the given Object ID. The provided attribute must be be DER
15445 encoded.</p>
15446 <p>Attributes in a certificate request is an optional set of data
15447 appended to the request. Their interpretation depends on the CA policy.</p>
15448 <div class="refsect3">
15449 <a name="gnutls-x509-crq-set-attribute-by-oid.parameters"></a><h4>Parameters</h4>
15450 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15451 <colgroup>
15452 <col width="150px" class="parameters_name">
15453 <col class="parameters_description">
15454 <col width="200px" class="parameters_annotations">
15455 </colgroup>
15456 <tbody>
15457 <tr>
15458 <td class="parameter_name"><p>crq</p></td>
15459 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
15460 <td class="parameter_annotations"> </td>
15461 </tr>
15462 <tr>
15463 <td class="parameter_name"><p>oid</p></td>
15464 <td class="parameter_description"><p>holds an Object Identifier in a null-terminated string</p></td>
15465 <td class="parameter_annotations"> </td>
15466 </tr>
15467 <tr>
15468 <td class="parameter_name"><p>buf</p></td>
15469 <td class="parameter_description"><p>a pointer to a structure that holds the attribute data</p></td>
15470 <td class="parameter_annotations"> </td>
15471 </tr>
15472 <tr>
15473 <td class="parameter_name"><p>buf_size</p></td>
15474 <td class="parameter_description"><p>holds the size of <em class="parameter"><code>buf</code></em>
15475 </p></td>
15476 <td class="parameter_annotations"> </td>
15477 </tr>
15478 </tbody>
15479 </table></div>
15480 </div>
15481 <div class="refsect3">
15482 <a name="gnutls-x509-crq-set-attribute-by-oid.returns"></a><h4>Returns</h4>
15483 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15484 negative error value.</p>
15485 </div>
15486 </div>
15487 <hr>
15488 <div class="refsect2">
15489 <a name="gnutls-x509-crq-get-attribute-by-oid"></a><h3>gnutls_x509_crq_get_attribute_by_oid ()</h3>
15490 <pre class="programlisting"><span class="returnvalue">int</span>
15491 gnutls_x509_crq_get_attribute_by_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15492 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
15493 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
15494 <em class="parameter"><code><span class="type">void</span> *buf</code></em>,
15495 <em class="parameter"><code><span class="type">size_t</span> *sizeof_buf</code></em>);</pre>
15496 <p>This function will return the attribute in the certificate request
15497 specified by the given Object ID. The attribute will be DER
15498 encoded.</p>
15499 <p>Attributes in a certificate request is an optional set of data
15500 appended to the request. Their interpretation depends on the CA policy.</p>
15501 <div class="refsect3">
15502 <a name="gnutls-x509-crq-get-attribute-by-oid.parameters"></a><h4>Parameters</h4>
15503 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15504 <colgroup>
15505 <col width="150px" class="parameters_name">
15506 <col class="parameters_description">
15507 <col width="200px" class="parameters_annotations">
15508 </colgroup>
15509 <tbody>
15510 <tr>
15511 <td class="parameter_name"><p>crq</p></td>
15512 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
15513 <td class="parameter_annotations"> </td>
15514 </tr>
15515 <tr>
15516 <td class="parameter_name"><p>oid</p></td>
15517 <td class="parameter_description"><p>holds an Object Identifier in null-terminated string</p></td>
15518 <td class="parameter_annotations"> </td>
15519 </tr>
15520 <tr>
15521 <td class="parameter_name"><p>indx</p></td>
15522 <td class="parameter_description"><p>In case multiple same OIDs exist in the attribute list, this
15523 specifies which to get, use (0) to get the first one</p></td>
15524 <td class="parameter_annotations"> </td>
15525 </tr>
15526 <tr>
15527 <td class="parameter_name"><p>buf</p></td>
15528 <td class="parameter_description"><p>a pointer to a structure to hold the attribute data (may be <code class="literal">NULL</code>)</p></td>
15529 <td class="parameter_annotations"> </td>
15530 </tr>
15531 <tr>
15532 <td class="parameter_name"><p>buf_size</p></td>
15533 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>buf</code></em>
15534 </p></td>
15535 <td class="parameter_annotations"> </td>
15536 </tr>
15537 </tbody>
15538 </table></div>
15539 </div>
15540 <div class="refsect3">
15541 <a name="gnutls-x509-crq-get-attribute-by-oid.returns"></a><h4>Returns</h4>
15542 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15543 negative error value.</p>
15544 </div>
15545 </div>
15546 <hr>
15547 <div class="refsect2">
15548 <a name="gnutls-x509-crq-export"></a><h3>gnutls_x509_crq_export ()</h3>
15549 <pre class="programlisting"><span class="returnvalue">int</span>
15550 gnutls_x509_crq_export (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15551 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
15552 <em class="parameter"><code><span class="type">void</span> *output_data</code></em>,
15553 <em class="parameter"><code><span class="type">size_t</span> *output_data_size</code></em>);</pre>
15554 <p>This function will export the certificate request to a PEM or DER
15555 encoded PKCS10 structure.</p>
15556 <p>If the buffer provided is not long enough to hold the output, then
15557 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> will be returned and
15558 *<em class="parameter"><code>output_data_size</code></em>
15559 will be updated.</p>
15560 <p>If the structure is PEM encoded, it will have a header of "BEGIN
15561 NEW CERTIFICATE REQUEST".</p>
15562 <div class="refsect3">
15563 <a name="gnutls-x509-crq-export.parameters"></a><h4>Parameters</h4>
15564 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15565 <colgroup>
15566 <col width="150px" class="parameters_name">
15567 <col class="parameters_description">
15568 <col width="200px" class="parameters_annotations">
15569 </colgroup>
15570 <tbody>
15571 <tr>
15572 <td class="parameter_name"><p>crq</p></td>
15573 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
15574 <td class="parameter_annotations"> </td>
15575 </tr>
15576 <tr>
15577 <td class="parameter_name"><p>format</p></td>
15578 <td class="parameter_description"><p>the format of output params. One of PEM or DER.</p></td>
15579 <td class="parameter_annotations"> </td>
15580 </tr>
15581 <tr>
15582 <td class="parameter_name"><p>output_data</p></td>
15583 <td class="parameter_description"><p>will contain a certificate request PEM or DER encoded</p></td>
15584 <td class="parameter_annotations"> </td>
15585 </tr>
15586 <tr>
15587 <td class="parameter_name"><p>output_data_size</p></td>
15588 <td class="parameter_description"><p>holds the size of output_data (and will be
15589 replaced by the actual size of parameters)</p></td>
15590 <td class="parameter_annotations"> </td>
15591 </tr>
15592 </tbody>
15593 </table></div>
15594 </div>
15595 <div class="refsect3">
15596 <a name="gnutls-x509-crq-export.returns"></a><h4>Returns</h4>
15597 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15598 negative error value.</p>
15599 </div>
15600 </div>
15601 <hr>
15602 <div class="refsect2">
15603 <a name="gnutls-x509-crq-export2"></a><h3>gnutls_x509_crq_export2 ()</h3>
15604 <pre class="programlisting"><span class="returnvalue">int</span>
15605 gnutls_x509_crq_export2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15606 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>,
15607 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>);</pre>
15608 <p>This function will export the certificate request to a PEM or DER
15609 encoded PKCS10 structure.</p>
15610 <p>The output buffer is allocated using <code class="function">gnutls_malloc()</code>.</p>
15611 <p>If the structure is PEM encoded, it will have a header of "BEGIN
15612 NEW CERTIFICATE REQUEST".</p>
15613 <div class="refsect3">
15614 <a name="gnutls-x509-crq-export2.parameters"></a><h4>Parameters</h4>
15615 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15616 <colgroup>
15617 <col width="150px" class="parameters_name">
15618 <col class="parameters_description">
15619 <col width="200px" class="parameters_annotations">
15620 </colgroup>
15621 <tbody>
15622 <tr>
15623 <td class="parameter_name"><p>crq</p></td>
15624 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
15625 <td class="parameter_annotations"> </td>
15626 </tr>
15627 <tr>
15628 <td class="parameter_name"><p>format</p></td>
15629 <td class="parameter_description"><p>the format of output params. One of PEM or DER.</p></td>
15630 <td class="parameter_annotations"> </td>
15631 </tr>
15632 <tr>
15633 <td class="parameter_name"><p>out</p></td>
15634 <td class="parameter_description"><p>will contain a certificate request PEM or DER encoded</p></td>
15635 <td class="parameter_annotations"> </td>
15636 </tr>
15637 </tbody>
15638 </table></div>
15639 </div>
15640 <div class="refsect3">
15641 <a name="gnutls-x509-crq-export2.returns"></a><h4>Returns</h4>
15642 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15643 negative error value.</p>
15644 <p>Since 3.1.3</p>
15645 </div>
15646 </div>
15647 <hr>
15648 <div class="refsect2">
15649 <a name="gnutls-x509-crt-set-crq"></a><h3>gnutls_x509_crt_set_crq ()</h3>
15650 <pre class="programlisting"><span class="returnvalue">int</span>
15651 gnutls_x509_crt_set_crq (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
15652 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>);</pre>
15653 <p>This function will set the name and public parameters as well as
15654 the extensions from the given certificate request to the certificate.
15655 Only RSA keys are currently supported.</p>
15656 <p>Note that this function will only set the <em class="parameter"><code>crq</code></em>
15657 if it is self
15658 signed and the signature is correct. See <a class="link" href="gnutls-x509.html#gnutls-x509-crq-sign2" title="gnutls_x509_crq_sign2 ()"><code class="function">gnutls_x509_crq_sign2()</code></a>.</p>
15659 <div class="refsect3">
15660 <a name="gnutls-x509-crt-set-crq.parameters"></a><h4>Parameters</h4>
15661 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15662 <colgroup>
15663 <col width="150px" class="parameters_name">
15664 <col class="parameters_description">
15665 <col width="200px" class="parameters_annotations">
15666 </colgroup>
15667 <tbody>
15668 <tr>
15669 <td class="parameter_name"><p>crt</p></td>
15670 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
15671 <td class="parameter_annotations"> </td>
15672 </tr>
15673 <tr>
15674 <td class="parameter_name"><p>crq</p></td>
15675 <td class="parameter_description"><p>holds a certificate request</p></td>
15676 <td class="parameter_annotations"> </td>
15677 </tr>
15678 </tbody>
15679 </table></div>
15680 </div>
15681 <div class="refsect3">
15682 <a name="gnutls-x509-crt-set-crq.returns"></a><h4>Returns</h4>
15683 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15684 negative error value.</p>
15685 </div>
15686 </div>
15687 <hr>
15688 <div class="refsect2">
15689 <a name="gnutls-x509-crt-set-crq-extensions"></a><h3>gnutls_x509_crt_set_crq_extensions ()</h3>
15690 <pre class="programlisting"><span class="returnvalue">int</span>
15691 gnutls_x509_crt_set_crq_extensions (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
15692 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>);</pre>
15693 <p>This function will set the extensions from the given request to the
15694 certificate.</p>
15695 <div class="refsect3">
15696 <a name="gnutls-x509-crt-set-crq-extensions.parameters"></a><h4>Parameters</h4>
15697 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15698 <colgroup>
15699 <col width="150px" class="parameters_name">
15700 <col class="parameters_description">
15701 <col width="200px" class="parameters_annotations">
15702 </colgroup>
15703 <tbody>
15704 <tr>
15705 <td class="parameter_name"><p>crt</p></td>
15706 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
15707 <td class="parameter_annotations"> </td>
15708 </tr>
15709 <tr>
15710 <td class="parameter_name"><p>crq</p></td>
15711 <td class="parameter_description"><p>holds a certificate request</p></td>
15712 <td class="parameter_annotations"> </td>
15713 </tr>
15714 </tbody>
15715 </table></div>
15716 </div>
15717 <div class="refsect3">
15718 <a name="gnutls-x509-crt-set-crq-extensions.returns"></a><h4>Returns</h4>
15719 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15720 negative error value.</p>
15721 </div>
15722 <p class="since">Since: 2.8.0</p>
15723 </div>
15724 <hr>
15725 <div class="refsect2">
15726 <a name="gnutls-x509-crt-set-crq-extension-by-oid"></a><h3>gnutls_x509_crt_set_crq_extension_by_oid ()</h3>
15727 <pre class="programlisting"><span class="returnvalue">int</span>
15728 gnutls_x509_crt_set_crq_extension_by_oid
15729 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>,
15730 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15731 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
15732 <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre>
15733 <p>This function will set the extension specify by <em class="parameter"><code>oid</code></em>
15734 from the given request to the
15735 certificate.</p>
15736 <div class="refsect3">
15737 <a name="gnutls-x509-crt-set-crq-extension-by-oid.parameters"></a><h4>Parameters</h4>
15738 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15739 <colgroup>
15740 <col width="150px" class="parameters_name">
15741 <col class="parameters_description">
15742 <col width="200px" class="parameters_annotations">
15743 </colgroup>
15744 <tbody>
15745 <tr>
15746 <td class="parameter_name"><p>crt</p></td>
15747 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td>
15748 <td class="parameter_annotations"> </td>
15749 </tr>
15750 <tr>
15751 <td class="parameter_name"><p>crq</p></td>
15752 <td class="parameter_description"><p>holds a certificate request</p></td>
15753 <td class="parameter_annotations"> </td>
15754 </tr>
15755 <tr>
15756 <td class="parameter_name"><p>oid</p></td>
15757 <td class="parameter_description"><p>the object identifier of the OID to copy</p></td>
15758 <td class="parameter_annotations"> </td>
15759 </tr>
15760 <tr>
15761 <td class="parameter_name"><p>flags</p></td>
15762 <td class="parameter_description"><p>should be zero</p></td>
15763 <td class="parameter_annotations"> </td>
15764 </tr>
15765 </tbody>
15766 </table></div>
15767 </div>
15768 <div class="refsect3">
15769 <a name="gnutls-x509-crt-set-crq-extension-by-oid.returns"></a><h4>Returns</h4>
15770 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15771 negative error value.</p>
15772 </div>
15773 <p class="since">Since: 3.5.1</p>
15774 </div>
15775 <hr>
15776 <div class="refsect2">
15777 <a name="gnutls-x509-crq-set-private-key-usage-period"></a><h3>gnutls_x509_crq_set_private_key_usage_period ()</h3>
15778 <pre class="programlisting"><span class="returnvalue">int</span>
15779 gnutls_x509_crq_set_private_key_usage_period
15780 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15781 <em class="parameter"><code><span class="type">time_t</span> activation</code></em>,
15782 <em class="parameter"><code><span class="type">time_t</span> expiration</code></em>);</pre>
15783 <p>This function will set the private key usage period extension (2.5.29.16).</p>
15784 <div class="refsect3">
15785 <a name="gnutls-x509-crq-set-private-key-usage-period.parameters"></a><h4>Parameters</h4>
15786 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15787 <colgroup>
15788 <col width="150px" class="parameters_name">
15789 <col class="parameters_description">
15790 <col width="200px" class="parameters_annotations">
15791 </colgroup>
15792 <tbody>
15793 <tr>
15794 <td class="parameter_name"><p>crq</p></td>
15795 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a></p></td>
15796 <td class="parameter_annotations"> </td>
15797 </tr>
15798 <tr>
15799 <td class="parameter_name"><p>activation</p></td>
15800 <td class="parameter_description"><p>The activation time</p></td>
15801 <td class="parameter_annotations"> </td>
15802 </tr>
15803 <tr>
15804 <td class="parameter_name"><p>expiration</p></td>
15805 <td class="parameter_description"><p>The expiration time</p></td>
15806 <td class="parameter_annotations"> </td>
15807 </tr>
15808 </tbody>
15809 </table></div>
15810 </div>
15811 <div class="refsect3">
15812 <a name="gnutls-x509-crq-set-private-key-usage-period.returns"></a><h4>Returns</h4>
15813 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15814 negative error value.</p>
15815 </div>
15816 </div>
15817 <hr>
15818 <div class="refsect2">
15819 <a name="gnutls-x509-crq-set-key-rsa-raw"></a><h3>gnutls_x509_crq_set_key_rsa_raw ()</h3>
15820 <pre class="programlisting"><span class="returnvalue">int</span>
15821 gnutls_x509_crq_set_key_rsa_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15822 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *m</code></em>,
15823 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *e</code></em>);</pre>
15824 <p>This function will set the public parameters from the given private
15825 key to the request. Only RSA keys are currently supported.</p>
15826 <div class="refsect3">
15827 <a name="gnutls-x509-crq-set-key-rsa-raw.parameters"></a><h4>Parameters</h4>
15828 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15829 <colgroup>
15830 <col width="150px" class="parameters_name">
15831 <col class="parameters_description">
15832 <col width="200px" class="parameters_annotations">
15833 </colgroup>
15834 <tbody>
15835 <tr>
15836 <td class="parameter_name"><p>crq</p></td>
15837 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
15838 <td class="parameter_annotations"> </td>
15839 </tr>
15840 <tr>
15841 <td class="parameter_name"><p>m</p></td>
15842 <td class="parameter_description"><p>holds the modulus</p></td>
15843 <td class="parameter_annotations"> </td>
15844 </tr>
15845 <tr>
15846 <td class="parameter_name"><p>e</p></td>
15847 <td class="parameter_description"><p>holds the public exponent</p></td>
15848 <td class="parameter_annotations"> </td>
15849 </tr>
15850 </tbody>
15851 </table></div>
15852 </div>
15853 <div class="refsect3">
15854 <a name="gnutls-x509-crq-set-key-rsa-raw.returns"></a><h4>Returns</h4>
15855 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15856 negative error value.</p>
15857 </div>
15858 <p class="since">Since: 2.6.0</p>
15859 </div>
15860 <hr>
15861 <div class="refsect2">
15862 <a name="gnutls-x509-crq-set-subject-alt-name"></a><h3>gnutls_x509_crq_set_subject_alt_name ()</h3>
15863 <pre class="programlisting"><span class="returnvalue">int</span>
15864 gnutls_x509_crq_set_subject_alt_name (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15865 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a> nt</code></em>,
15866 <em class="parameter"><code>const <span class="type">void</span> *data</code></em>,
15867 <em class="parameter"><code>unsigned <span class="type">int</span> data_size</code></em>,
15868 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
15869 <p>This function will set the subject alternative name certificate
15870 extension. It can set the following types:</p>
15871 <p><a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-DNSNAME:CAPS"><code class="literal">GNUTLS_SAN_DNSNAME</code></a>: as a text string</p>
15872 <p><a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-RFC822NAME:CAPS"><code class="literal">GNUTLS_SAN_RFC822NAME</code></a>: as a text string</p>
15873 <p><a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-URI:CAPS"><code class="literal">GNUTLS_SAN_URI</code></a>: as a text string</p>
15874 <p><a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-IPADDRESS:CAPS"><code class="literal">GNUTLS_SAN_IPADDRESS</code></a>: as a binary IP address (4 or 16 bytes)</p>
15875 <p><a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME-XMPP:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME_XMPP</code></a>: as a UTF8 string</p>
15876 <p>Since version 3.5.7 the <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-RFC822NAME:CAPS"><code class="literal">GNUTLS_SAN_RFC822NAME</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-DNSNAME:CAPS"><code class="literal">GNUTLS_SAN_DNSNAME</code></a>, and
15877 <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME-XMPP:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME_XMPP</code></a> are converted to ACE format when necessary.</p>
15878 <div class="refsect3">
15879 <a name="gnutls-x509-crq-set-subject-alt-name.parameters"></a><h4>Parameters</h4>
15880 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15881 <colgroup>
15882 <col width="150px" class="parameters_name">
15883 <col class="parameters_description">
15884 <col width="200px" class="parameters_annotations">
15885 </colgroup>
15886 <tbody>
15887 <tr>
15888 <td class="parameter_name"><p>crq</p></td>
15889 <td class="parameter_description"><p>a certificate request of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a></p></td>
15890 <td class="parameter_annotations"> </td>
15891 </tr>
15892 <tr>
15893 <td class="parameter_name"><p>nt</p></td>
15894 <td class="parameter_description"><p>is one of the <a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a> enumerations</p></td>
15895 <td class="parameter_annotations"> </td>
15896 </tr>
15897 <tr>
15898 <td class="parameter_name"><p>data</p></td>
15899 <td class="parameter_description"><p>The data to be set</p></td>
15900 <td class="parameter_annotations"> </td>
15901 </tr>
15902 <tr>
15903 <td class="parameter_name"><p>data_size</p></td>
15904 <td class="parameter_description"><p>The size of data to be set</p></td>
15905 <td class="parameter_annotations"> </td>
15906 </tr>
15907 <tr>
15908 <td class="parameter_name"><p>flags</p></td>
15909 <td class="parameter_description"><p><a class="link" href="gnutls-x509.html#GNUTLS-FSAN-SET:CAPS" title="GNUTLS_FSAN_SET"><code class="literal">GNUTLS_FSAN_SET</code></a> to clear previous data or
15910 <a class="link" href="gnutls-x509.html#GNUTLS-FSAN-APPEND:CAPS" title="GNUTLS_FSAN_APPEND"><code class="literal">GNUTLS_FSAN_APPEND</code></a> to append.</p></td>
15911 <td class="parameter_annotations"> </td>
15912 </tr>
15913 </tbody>
15914 </table></div>
15915 </div>
15916 <div class="refsect3">
15917 <a name="gnutls-x509-crq-set-subject-alt-name.returns"></a><h4>Returns</h4>
15918 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15919 negative error value.</p>
15920 </div>
15921 <p class="since">Since: 2.8.0</p>
15922 </div>
15923 <hr>
15924 <div class="refsect2">
15925 <a name="gnutls-x509-crq-set-subject-alt-othername"></a><h3>gnutls_x509_crq_set_subject_alt_othername ()</h3>
15926 <pre class="programlisting"><span class="returnvalue">int</span>
15927 gnutls_x509_crq_set_subject_alt_othername
15928 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15929 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
15930 <em class="parameter"><code>const <span class="type">void</span> *data</code></em>,
15931 <em class="parameter"><code>unsigned <span class="type">int</span> data_size</code></em>,
15932 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
15933 <p>This function will set the subject alternative name certificate
15934 extension. It can set the following types:</p>
15935 <p>The values set must be binary values and must be properly DER encoded.</p>
15936 <div class="refsect3">
15937 <a name="gnutls-x509-crq-set-subject-alt-othername.parameters"></a><h4>Parameters</h4>
15938 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15939 <colgroup>
15940 <col width="150px" class="parameters_name">
15941 <col class="parameters_description">
15942 <col width="200px" class="parameters_annotations">
15943 </colgroup>
15944 <tbody>
15945 <tr>
15946 <td class="parameter_name"><p>crq</p></td>
15947 <td class="parameter_description"><p>a certificate request of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a></p></td>
15948 <td class="parameter_annotations"> </td>
15949 </tr>
15950 <tr>
15951 <td class="parameter_name"><p>oid</p></td>
15952 <td class="parameter_description"><p>is the othername OID</p></td>
15953 <td class="parameter_annotations"> </td>
15954 </tr>
15955 <tr>
15956 <td class="parameter_name"><p>data</p></td>
15957 <td class="parameter_description"><p>The data to be set</p></td>
15958 <td class="parameter_annotations"> </td>
15959 </tr>
15960 <tr>
15961 <td class="parameter_name"><p>data_size</p></td>
15962 <td class="parameter_description"><p>The size of data to be set</p></td>
15963 <td class="parameter_annotations"> </td>
15964 </tr>
15965 <tr>
15966 <td class="parameter_name"><p>flags</p></td>
15967 <td class="parameter_description"><p><a class="link" href="gnutls-x509.html#GNUTLS-FSAN-SET:CAPS" title="GNUTLS_FSAN_SET"><code class="literal">GNUTLS_FSAN_SET</code></a> to clear previous data or
15968 <a class="link" href="gnutls-x509.html#GNUTLS-FSAN-APPEND:CAPS" title="GNUTLS_FSAN_APPEND"><code class="literal">GNUTLS_FSAN_APPEND</code></a> to append.</p></td>
15969 <td class="parameter_annotations"> </td>
15970 </tr>
15971 </tbody>
15972 </table></div>
15973 </div>
15974 <div class="refsect3">
15975 <a name="gnutls-x509-crq-set-subject-alt-othername.returns"></a><h4>Returns</h4>
15976 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
15977 negative error value.</p>
15978 </div>
15979 <p class="since">Since: 3.5.0</p>
15980 </div>
15981 <hr>
15982 <div class="refsect2">
15983 <a name="gnutls-x509-crq-set-key-usage"></a><h3>gnutls_x509_crq_set_key_usage ()</h3>
15984 <pre class="programlisting"><span class="returnvalue">int</span>
15985 gnutls_x509_crq_set_key_usage (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
15986 <em class="parameter"><code>unsigned <span class="type">int</span> usage</code></em>);</pre>
15987 <p>This function will set the keyUsage certificate extension.</p>
15988 <div class="refsect3">
15989 <a name="gnutls-x509-crq-set-key-usage.parameters"></a><h4>Parameters</h4>
15990 <div class="informaltable"><table class="informaltable" width="100%" border="0">
15991 <colgroup>
15992 <col width="150px" class="parameters_name">
15993 <col class="parameters_description">
15994 <col width="200px" class="parameters_annotations">
15995 </colgroup>
15996 <tbody>
15997 <tr>
15998 <td class="parameter_name"><p>crq</p></td>
15999 <td class="parameter_description"><p>a certificate request of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a></p></td>
16000 <td class="parameter_annotations"> </td>
16001 </tr>
16002 <tr>
16003 <td class="parameter_name"><p>usage</p></td>
16004 <td class="parameter_description"><p>an ORed sequence of the GNUTLS_KEY_* elements.</p></td>
16005 <td class="parameter_annotations"> </td>
16006 </tr>
16007 </tbody>
16008 </table></div>
16009 </div>
16010 <div class="refsect3">
16011 <a name="gnutls-x509-crq-set-key-usage.returns"></a><h4>Returns</h4>
16012 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
16013 negative error value.</p>
16014 </div>
16015 <p class="since">Since: 2.8.0</p>
16016 </div>
16017 <hr>
16018 <div class="refsect2">
16019 <a name="gnutls-x509-crq-set-basic-constraints"></a><h3>gnutls_x509_crq_set_basic_constraints ()</h3>
16020 <pre class="programlisting"><span class="returnvalue">int</span>
16021 gnutls_x509_crq_set_basic_constraints (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16022 <em class="parameter"><code>unsigned <span class="type">int</span> ca</code></em>,
16023 <em class="parameter"><code><span class="type">int</span> pathLenConstraint</code></em>);</pre>
16024 <p>This function will set the basicConstraints certificate extension.</p>
16025 <div class="refsect3">
16026 <a name="gnutls-x509-crq-set-basic-constraints.parameters"></a><h4>Parameters</h4>
16027 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16028 <colgroup>
16029 <col width="150px" class="parameters_name">
16030 <col class="parameters_description">
16031 <col width="200px" class="parameters_annotations">
16032 </colgroup>
16033 <tbody>
16034 <tr>
16035 <td class="parameter_name"><p>crq</p></td>
16036 <td class="parameter_description"><p>a certificate request of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a></p></td>
16037 <td class="parameter_annotations"> </td>
16038 </tr>
16039 <tr>
16040 <td class="parameter_name"><p>ca</p></td>
16041 <td class="parameter_description"><p>true(1) or false(0) depending on the Certificate authority status.</p></td>
16042 <td class="parameter_annotations"> </td>
16043 </tr>
16044 <tr>
16045 <td class="parameter_name"><p>pathLenConstraint</p></td>
16046 <td class="parameter_description"><p>non-negative error codes indicate maximum length of path,
16047 and negative error codes indicate that the pathLenConstraints field should
16048 not be present.</p></td>
16049 <td class="parameter_annotations"> </td>
16050 </tr>
16051 </tbody>
16052 </table></div>
16053 </div>
16054 <div class="refsect3">
16055 <a name="gnutls-x509-crq-set-basic-constraints.returns"></a><h4>Returns</h4>
16056 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
16057 negative error value.</p>
16058 </div>
16059 <p class="since">Since: 2.8.0</p>
16060 </div>
16061 <hr>
16062 <div class="refsect2">
16063 <a name="gnutls-x509-crq-set-key-purpose-oid"></a><h3>gnutls_x509_crq_set_key_purpose_oid ()</h3>
16064 <pre class="programlisting"><span class="returnvalue">int</span>
16065 gnutls_x509_crq_set_key_purpose_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16066 <em class="parameter"><code>const <span class="type">void</span> *oid</code></em>,
16067 <em class="parameter"><code>unsigned <span class="type">int</span> critical</code></em>);</pre>
16068 <p>This function will set the key purpose OIDs of the Certificate.
16069 These are stored in the Extended Key Usage extension (2.5.29.37)
16070 See the GNUTLS_KP_* definitions for human readable names.</p>
16071 <p>Subsequent calls to this function will append OIDs to the OID list.</p>
16072 <div class="refsect3">
16073 <a name="gnutls-x509-crq-set-key-purpose-oid.parameters"></a><h4>Parameters</h4>
16074 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16075 <colgroup>
16076 <col width="150px" class="parameters_name">
16077 <col class="parameters_description">
16078 <col width="200px" class="parameters_annotations">
16079 </colgroup>
16080 <tbody>
16081 <tr>
16082 <td class="parameter_name"><p>crq</p></td>
16083 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a></p></td>
16084 <td class="parameter_annotations"> </td>
16085 </tr>
16086 <tr>
16087 <td class="parameter_name"><p>oid</p></td>
16088 <td class="parameter_description"><p>a pointer to a null-terminated string that holds the OID</p></td>
16089 <td class="parameter_annotations"> </td>
16090 </tr>
16091 <tr>
16092 <td class="parameter_name"><p>critical</p></td>
16093 <td class="parameter_description"><p>Whether this extension will be critical or not</p></td>
16094 <td class="parameter_annotations"> </td>
16095 </tr>
16096 </tbody>
16097 </table></div>
16098 </div>
16099 <div class="refsect3">
16100 <a name="gnutls-x509-crq-set-key-purpose-oid.returns"></a><h4>Returns</h4>
16101 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
16102 negative error value.</p>
16103 </div>
16104 <p class="since">Since: 2.8.0</p>
16105 </div>
16106 <hr>
16107 <div class="refsect2">
16108 <a name="gnutls-x509-crq-get-key-purpose-oid"></a><h3>gnutls_x509_crq_get_key_purpose_oid ()</h3>
16109 <pre class="programlisting"><span class="returnvalue">int</span>
16110 gnutls_x509_crq_get_key_purpose_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16111 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
16112 <em class="parameter"><code><span class="type">void</span> *oid</code></em>,
16113 <em class="parameter"><code><span class="type">size_t</span> *sizeof_oid</code></em>,
16114 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
16115 <p>This function will extract the key purpose OIDs of the Certificate
16116 specified by the given index. These are stored in the Extended Key
16117 Usage extension (2.5.29.37). See the GNUTLS_KP_* definitions for
16118 human readable names.</p>
16119 <div class="refsect3">
16120 <a name="gnutls-x509-crq-get-key-purpose-oid.parameters"></a><h4>Parameters</h4>
16121 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16122 <colgroup>
16123 <col width="150px" class="parameters_name">
16124 <col class="parameters_description">
16125 <col width="200px" class="parameters_annotations">
16126 </colgroup>
16127 <tbody>
16128 <tr>
16129 <td class="parameter_name"><p>crq</p></td>
16130 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
16131 <td class="parameter_annotations"> </td>
16132 </tr>
16133 <tr>
16134 <td class="parameter_name"><p>indx</p></td>
16135 <td class="parameter_description"><p>This specifies which OID to return, use (0) to get the first one</p></td>
16136 <td class="parameter_annotations"> </td>
16137 </tr>
16138 <tr>
16139 <td class="parameter_name"><p>oid</p></td>
16140 <td class="parameter_description"><p>a pointer to store the OID (may be <code class="literal">NULL</code>)</p></td>
16141 <td class="parameter_annotations"> </td>
16142 </tr>
16143 <tr>
16144 <td class="parameter_name"><p>sizeof_oid</p></td>
16145 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>oid</code></em>
16146 </p></td>
16147 <td class="parameter_annotations"> </td>
16148 </tr>
16149 <tr>
16150 <td class="parameter_name"><p>critical</p></td>
16151 <td class="parameter_description"><p>output variable with critical flag, may be <code class="literal">NULL</code>.</p></td>
16152 <td class="parameter_annotations"> </td>
16153 </tr>
16154 </tbody>
16155 </table></div>
16156 </div>
16157 <div class="refsect3">
16158 <a name="gnutls-x509-crq-get-key-purpose-oid.returns"></a><h4>Returns</h4>
16159 <p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the provided buffer is
16160 not long enough, and in that case the *<em class="parameter"><code>sizeof_oid</code></em>
16161 will be
16162 updated with the required size. On success 0 is returned.</p>
16163 </div>
16164 <p class="since">Since: 2.8.0</p>
16165 </div>
16166 <hr>
16167 <div class="refsect2">
16168 <a name="gnutls-x509-crq-get-extension-data"></a><h3>gnutls_x509_crq_get_extension_data ()</h3>
16169 <pre class="programlisting"><span class="returnvalue">int</span>
16170 gnutls_x509_crq_get_extension_data (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16171 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
16172 <em class="parameter"><code><span class="type">void</span> *data</code></em>,
16173 <em class="parameter"><code><span class="type">size_t</span> *sizeof_data</code></em>);</pre>
16174 <p>This function will return the requested extension data in the
16175 certificate. The extension data will be stored as a string in the
16176 provided buffer.</p>
16177 <p>Use <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-extension-info" title="gnutls_x509_crq_get_extension_info ()"><code class="function">gnutls_x509_crq_get_extension_info()</code></a> to extract the OID and
16178 critical flag. Use <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-extension-by-oid" title="gnutls_x509_crq_get_extension_by_oid ()"><code class="function">gnutls_x509_crq_get_extension_by_oid()</code></a> instead,
16179 if you want to get data indexed by the extension OID rather than
16180 sequence.</p>
16181 <div class="refsect3">
16182 <a name="gnutls-x509-crq-get-extension-data.parameters"></a><h4>Parameters</h4>
16183 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16184 <colgroup>
16185 <col width="150px" class="parameters_name">
16186 <col class="parameters_description">
16187 <col width="200px" class="parameters_annotations">
16188 </colgroup>
16189 <tbody>
16190 <tr>
16191 <td class="parameter_name"><p>crq</p></td>
16192 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
16193 <td class="parameter_annotations"> </td>
16194 </tr>
16195 <tr>
16196 <td class="parameter_name"><p>indx</p></td>
16197 <td class="parameter_description"><p>Specifies which extension number to get. Use (0) to get the first one.</p></td>
16198 <td class="parameter_annotations"> </td>
16199 </tr>
16200 <tr>
16201 <td class="parameter_name"><p>data</p></td>
16202 <td class="parameter_description"><p>a pointer to a structure to hold the data (may be null)</p></td>
16203 <td class="parameter_annotations"> </td>
16204 </tr>
16205 <tr>
16206 <td class="parameter_name"><p>sizeof_data</p></td>
16207 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>oid</code></em>
16208 </p></td>
16209 <td class="parameter_annotations"> </td>
16210 </tr>
16211 </tbody>
16212 </table></div>
16213 </div>
16214 <div class="refsect3">
16215 <a name="gnutls-x509-crq-get-extension-data.returns"></a><h4>Returns</h4>
16216 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
16217 negative error code in case of an error. If your have reached the
16218 last extension available <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
16219 will be returned.</p>
16220 </div>
16221 <p class="since">Since: 2.8.0</p>
16222 </div>
16223 <hr>
16224 <div class="refsect2">
16225 <a name="gnutls-x509-crq-get-extension-data2"></a><h3>gnutls_x509_crq_get_extension_data2 ()</h3>
16226 <pre class="programlisting"><span class="returnvalue">int</span>
16227 gnutls_x509_crq_get_extension_data2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16228 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
16229 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>);</pre>
16230 <p>This function will return the requested extension data in the
16231 certificate request. The extension data will be allocated using
16232 <code class="function">gnutls_malloc()</code>.</p>
16233 <p>Use <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-extension-info" title="gnutls_x509_crq_get_extension_info ()"><code class="function">gnutls_x509_crq_get_extension_info()</code></a> to extract the OID.</p>
16234 <div class="refsect3">
16235 <a name="gnutls-x509-crq-get-extension-data2.parameters"></a><h4>Parameters</h4>
16236 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16237 <colgroup>
16238 <col width="150px" class="parameters_name">
16239 <col class="parameters_description">
16240 <col width="200px" class="parameters_annotations">
16241 </colgroup>
16242 <tbody>
16243 <tr>
16244 <td class="parameter_name"><p>crq</p></td>
16245 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
16246 <td class="parameter_annotations"> </td>
16247 </tr>
16248 <tr>
16249 <td class="parameter_name"><p>extension_id</p></td>
16250 <td class="parameter_description"><p>An X.509 extension OID.</p></td>
16251 <td class="parameter_annotations"> </td>
16252 </tr>
16253 <tr>
16254 <td class="parameter_name"><p>indx</p></td>
16255 <td class="parameter_description"><p>Specifies which extension OID to read. Use (0) to get the first one.</p></td>
16256 <td class="parameter_annotations"> </td>
16257 </tr>
16258 <tr>
16259 <td class="parameter_name"><p>data</p></td>
16260 <td class="parameter_description"><p>will contain the extension DER-encoded data</p></td>
16261 <td class="parameter_annotations"> </td>
16262 </tr>
16263 </tbody>
16264 </table></div>
16265 </div>
16266 <div class="refsect3">
16267 <a name="gnutls-x509-crq-get-extension-data2.returns"></a><h4>Returns</h4>
16268 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned,
16269 otherwise a negative error code is returned. If you have reached the
16270 last extension available <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
16271 will be returned.</p>
16272 </div>
16273 <p class="since">Since: 3.3.0</p>
16274 </div>
16275 <hr>
16276 <div class="refsect2">
16277 <a name="gnutls-x509-crq-get-extension-info"></a><h3>gnutls_x509_crq_get_extension_info ()</h3>
16278 <pre class="programlisting"><span class="returnvalue">int</span>
16279 gnutls_x509_crq_get_extension_info (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16280 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
16281 <em class="parameter"><code><span class="type">void</span> *oid</code></em>,
16282 <em class="parameter"><code><span class="type">size_t</span> *sizeof_oid</code></em>,
16283 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
16284 <p>This function will return the requested extension OID in the
16285 certificate, and the critical flag for it. The extension OID will
16286 be stored as a string in the provided buffer. Use
16287 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-extension-data" title="gnutls_x509_crq_get_extension_data ()"><code class="function">gnutls_x509_crq_get_extension_data()</code></a> to extract the data.</p>
16288 <p>If the buffer provided is not long enough to hold the output, then
16289 *<em class="parameter"><code>sizeof_oid</code></em>
16290 is updated and <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> will be
16291 returned.</p>
16292 <div class="refsect3">
16293 <a name="gnutls-x509-crq-get-extension-info.parameters"></a><h4>Parameters</h4>
16294 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16295 <colgroup>
16296 <col width="150px" class="parameters_name">
16297 <col class="parameters_description">
16298 <col width="200px" class="parameters_annotations">
16299 </colgroup>
16300 <tbody>
16301 <tr>
16302 <td class="parameter_name"><p>crq</p></td>
16303 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
16304 <td class="parameter_annotations"> </td>
16305 </tr>
16306 <tr>
16307 <td class="parameter_name"><p>indx</p></td>
16308 <td class="parameter_description"><p>Specifies which extension number to get. Use (0) to get the first one.</p></td>
16309 <td class="parameter_annotations"> </td>
16310 </tr>
16311 <tr>
16312 <td class="parameter_name"><p>oid</p></td>
16313 <td class="parameter_description"><p>a pointer to store the OID</p></td>
16314 <td class="parameter_annotations"> </td>
16315 </tr>
16316 <tr>
16317 <td class="parameter_name"><p>sizeof_oid</p></td>
16318 <td class="parameter_description"><p>initially holds the maximum size of <em class="parameter"><code>oid</code></em>
16319 , on return
16320 holds actual size of <em class="parameter"><code>oid</code></em>
16321 .</p></td>
16322 <td class="parameter_annotations"> </td>
16323 </tr>
16324 <tr>
16325 <td class="parameter_name"><p>critical</p></td>
16326 <td class="parameter_description"><p>output variable with critical flag, may be NULL.</p></td>
16327 <td class="parameter_annotations"> </td>
16328 </tr>
16329 </tbody>
16330 </table></div>
16331 </div>
16332 <div class="refsect3">
16333 <a name="gnutls-x509-crq-get-extension-info.returns"></a><h4>Returns</h4>
16334 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
16335 negative error code in case of an error. If your have reached the
16336 last extension available <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
16337 will be returned.</p>
16338 </div>
16339 <p class="since">Since: 2.8.0</p>
16340 </div>
16341 <hr>
16342 <div class="refsect2">
16343 <a name="gnutls-x509-crq-get-attribute-data"></a><h3>gnutls_x509_crq_get_attribute_data ()</h3>
16344 <pre class="programlisting"><span class="returnvalue">int</span>
16345 gnutls_x509_crq_get_attribute_data (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16346 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
16347 <em class="parameter"><code><span class="type">void</span> *data</code></em>,
16348 <em class="parameter"><code><span class="type">size_t</span> *sizeof_data</code></em>);</pre>
16349 <p>This function will return the requested attribute data in the
16350 certificate request. The attribute data will be stored as a string in the
16351 provided buffer.</p>
16352 <p>Use <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-attribute-info" title="gnutls_x509_crq_get_attribute_info ()"><code class="function">gnutls_x509_crq_get_attribute_info()</code></a> to extract the OID.
16353 Use <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-attribute-by-oid" title="gnutls_x509_crq_get_attribute_by_oid ()"><code class="function">gnutls_x509_crq_get_attribute_by_oid()</code></a> instead,
16354 if you want to get data indexed by the attribute OID rather than
16355 sequence.</p>
16356 <div class="refsect3">
16357 <a name="gnutls-x509-crq-get-attribute-data.parameters"></a><h4>Parameters</h4>
16358 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16359 <colgroup>
16360 <col width="150px" class="parameters_name">
16361 <col class="parameters_description">
16362 <col width="200px" class="parameters_annotations">
16363 </colgroup>
16364 <tbody>
16365 <tr>
16366 <td class="parameter_name"><p>crq</p></td>
16367 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
16368 <td class="parameter_annotations"> </td>
16369 </tr>
16370 <tr>
16371 <td class="parameter_name"><p>indx</p></td>
16372 <td class="parameter_description"><p>Specifies which attribute number to get. Use (0) to get the first one.</p></td>
16373 <td class="parameter_annotations"> </td>
16374 </tr>
16375 <tr>
16376 <td class="parameter_name"><p>data</p></td>
16377 <td class="parameter_description"><p>a pointer to a structure to hold the data (may be null)</p></td>
16378 <td class="parameter_annotations"> </td>
16379 </tr>
16380 <tr>
16381 <td class="parameter_name"><p>sizeof_data</p></td>
16382 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>oid</code></em>
16383 </p></td>
16384 <td class="parameter_annotations"> </td>
16385 </tr>
16386 </tbody>
16387 </table></div>
16388 </div>
16389 <div class="refsect3">
16390 <a name="gnutls-x509-crq-get-attribute-data.returns"></a><h4>Returns</h4>
16391 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
16392 negative error code in case of an error. If your have reached the
16393 last extension available <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
16394 will be returned.</p>
16395 </div>
16396 <p class="since">Since: 2.8.0</p>
16397 </div>
16398 <hr>
16399 <div class="refsect2">
16400 <a name="gnutls-x509-crq-get-attribute-info"></a><h3>gnutls_x509_crq_get_attribute_info ()</h3>
16401 <pre class="programlisting"><span class="returnvalue">int</span>
16402 gnutls_x509_crq_get_attribute_info (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16403 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
16404 <em class="parameter"><code><span class="type">void</span> *oid</code></em>,
16405 <em class="parameter"><code><span class="type">size_t</span> *sizeof_oid</code></em>);</pre>
16406 <p>This function will return the requested attribute OID in the
16407 certificate, and the critical flag for it. The attribute OID will
16408 be stored as a string in the provided buffer. Use
16409 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-attribute-data" title="gnutls_x509_crq_get_attribute_data ()"><code class="function">gnutls_x509_crq_get_attribute_data()</code></a> to extract the data.</p>
16410 <p>If the buffer provided is not long enough to hold the output, then
16411 *<em class="parameter"><code>sizeof_oid</code></em>
16412 is updated and <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> will be
16413 returned.</p>
16414 <div class="refsect3">
16415 <a name="gnutls-x509-crq-get-attribute-info.parameters"></a><h4>Parameters</h4>
16416 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16417 <colgroup>
16418 <col width="150px" class="parameters_name">
16419 <col class="parameters_description">
16420 <col width="200px" class="parameters_annotations">
16421 </colgroup>
16422 <tbody>
16423 <tr>
16424 <td class="parameter_name"><p>crq</p></td>
16425 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
16426 <td class="parameter_annotations"> </td>
16427 </tr>
16428 <tr>
16429 <td class="parameter_name"><p>indx</p></td>
16430 <td class="parameter_description"><p>Specifies which attribute number to get. Use (0) to get the first one.</p></td>
16431 <td class="parameter_annotations"> </td>
16432 </tr>
16433 <tr>
16434 <td class="parameter_name"><p>oid</p></td>
16435 <td class="parameter_description"><p>a pointer to a structure to hold the OID</p></td>
16436 <td class="parameter_annotations"> </td>
16437 </tr>
16438 <tr>
16439 <td class="parameter_name"><p>sizeof_oid</p></td>
16440 <td class="parameter_description"><p>initially holds the maximum size of <em class="parameter"><code>oid</code></em>
16441 , on return
16442 holds actual size of <em class="parameter"><code>oid</code></em>
16443 .</p></td>
16444 <td class="parameter_annotations"> </td>
16445 </tr>
16446 </tbody>
16447 </table></div>
16448 </div>
16449 <div class="refsect3">
16450 <a name="gnutls-x509-crq-get-attribute-info.returns"></a><h4>Returns</h4>
16451 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
16452 negative error code in case of an error. If your have reached the
16453 last extension available <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
16454 will be returned.</p>
16455 </div>
16456 <p class="since">Since: 2.8.0</p>
16457 </div>
16458 <hr>
16459 <div class="refsect2">
16460 <a name="gnutls-x509-crq-get-pk-algorithm"></a><h3>gnutls_x509_crq_get_pk_algorithm ()</h3>
16461 <pre class="programlisting"><span class="returnvalue">int</span>
16462 gnutls_x509_crq_get_pk_algorithm (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16463 <em class="parameter"><code>unsigned <span class="type">int</span> *bits</code></em>);</pre>
16464 <p>This function will return the public key algorithm of a PKCS<span class="type">10</span>
16465 certificate request.</p>
16466 <p>If bits is non-<code class="literal">NULL</code>, it should have enough size to hold the
16467 parameters size in bits. For RSA the bits returned is the modulus.
16468 For DSA the bits returned are of the public exponent.</p>
16469 <div class="refsect3">
16470 <a name="gnutls-x509-crq-get-pk-algorithm.parameters"></a><h4>Parameters</h4>
16471 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16472 <colgroup>
16473 <col width="150px" class="parameters_name">
16474 <col class="parameters_description">
16475 <col width="200px" class="parameters_annotations">
16476 </colgroup>
16477 <tbody>
16478 <tr>
16479 <td class="parameter_name"><p>crq</p></td>
16480 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
16481 <td class="parameter_annotations"> </td>
16482 </tr>
16483 <tr>
16484 <td class="parameter_name"><p>bits</p></td>
16485 <td class="parameter_description"><p>if bits is non-<code class="literal">NULL</code> it will hold the size of the parameters' in bits</p></td>
16486 <td class="parameter_annotations"> </td>
16487 </tr>
16488 </tbody>
16489 </table></div>
16490 </div>
16491 <div class="refsect3">
16492 <a name="gnutls-x509-crq-get-pk-algorithm.returns"></a><h4>Returns</h4>
16493 <p> a member of the <a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t"><span class="type">gnutls_pk_algorithm_t</span></a> enumeration on
16494 success, or a negative error code on error.</p>
16495 </div>
16496 </div>
16497 <hr>
16498 <div class="refsect2">
16499 <a name="gnutls-x509-crq-get-spki"></a><h3>gnutls_x509_crq_get_spki ()</h3>
16500 <pre class="programlisting"><span class="returnvalue">int</span>
16501 gnutls_x509_crq_get_spki (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16502 <em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a> spki</code></em>,
16503 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
16504 </div>
16505 <hr>
16506 <div class="refsect2">
16507 <a name="gnutls-x509-crq-set-spki"></a><h3>gnutls_x509_crq_set_spki ()</h3>
16508 <pre class="programlisting"><span class="returnvalue">int</span>
16509 gnutls_x509_crq_set_spki (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16510 <em class="parameter"><code>const <a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a> spki</code></em>,
16511 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
16512 <p>This function will set the certificate request's subject public key
16513 information explicitly. This is intended to be used in the cases
16514 where a single public key (e.g., RSA) can be used for multiple
16515 signature algorithms (RSA PKCS1-1.5, and RSA-PSS).</p>
16516 <p>To export the public key (i.e., the SubjectPublicKeyInfo part), check
16517 <a class="link" href="gnutls-abstract.html#gnutls-pubkey-import-x509" title="gnutls_pubkey_import_x509 ()"><code class="function">gnutls_pubkey_import_x509()</code></a>.</p>
16518 <div class="refsect3">
16519 <a name="gnutls-x509-crq-set-spki.parameters"></a><h4>Parameters</h4>
16520 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16521 <colgroup>
16522 <col width="150px" class="parameters_name">
16523 <col class="parameters_description">
16524 <col width="200px" class="parameters_annotations">
16525 </colgroup>
16526 <tbody>
16527 <tr>
16528 <td class="parameter_name"><p>crq</p></td>
16529 <td class="parameter_description"><p>a certificate request of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a></p></td>
16530 <td class="parameter_annotations"> </td>
16531 </tr>
16532 <tr>
16533 <td class="parameter_name"><p>spki</p></td>
16534 <td class="parameter_description"><p>a SubjectPublicKeyInfo structure of type <a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><span class="type">gnutls_x509_spki_t</span></a></p></td>
16535 <td class="parameter_annotations"> </td>
16536 </tr>
16537 <tr>
16538 <td class="parameter_name"><p>flags</p></td>
16539 <td class="parameter_description"><p>must be zero</p></td>
16540 <td class="parameter_annotations"> </td>
16541 </tr>
16542 </tbody>
16543 </table></div>
16544 </div>
16545 <div class="refsect3">
16546 <a name="gnutls-x509-crq-set-spki.returns"></a><h4>Returns</h4>
16547 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
16548 negative error value.</p>
16549 </div>
16550 <p class="since">Since: 3.6.0</p>
16551 </div>
16552 <hr>
16553 <div class="refsect2">
16554 <a name="gnutls-x509-crq-get-signature-oid"></a><h3>gnutls_x509_crq_get_signature_oid ()</h3>
16555 <pre class="programlisting"><span class="returnvalue">int</span>
16556 gnutls_x509_crq_get_signature_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16557 <em class="parameter"><code><span class="type">char</span> *oid</code></em>,
16558 <em class="parameter"><code><span class="type">size_t</span> *oid_size</code></em>);</pre>
16559 <p>This function will return the OID of the signature algorithm
16560 that has been used to sign this certificate request. This function
16561 is useful in the case <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-signature-algorithm" title="gnutls_x509_crq_get_signature_algorithm ()"><code class="function">gnutls_x509_crq_get_signature_algorithm()</code></a>
16562 returned <a class="link" href="gnutls-gnutls.html#GNUTLS-SIGN-UNKNOWN:CAPS"><code class="literal">GNUTLS_SIGN_UNKNOWN</code></a>.</p>
16563 <div class="refsect3">
16564 <a name="gnutls-x509-crq-get-signature-oid.parameters"></a><h4>Parameters</h4>
16565 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16566 <colgroup>
16567 <col width="150px" class="parameters_name">
16568 <col class="parameters_description">
16569 <col width="200px" class="parameters_annotations">
16570 </colgroup>
16571 <tbody>
16572 <tr>
16573 <td class="parameter_name"><p>crq</p></td>
16574 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
16575 <td class="parameter_annotations"> </td>
16576 </tr>
16577 <tr>
16578 <td class="parameter_name"><p>oid</p></td>
16579 <td class="parameter_description"><p>a pointer to a buffer to hold the OID (may be null)</p></td>
16580 <td class="parameter_annotations"> </td>
16581 </tr>
16582 <tr>
16583 <td class="parameter_name"><p>oid_size</p></td>
16584 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>oid</code></em>
16585 </p></td>
16586 <td class="parameter_annotations"> </td>
16587 </tr>
16588 </tbody>
16589 </table></div>
16590 </div>
16591 <div class="refsect3">
16592 <a name="gnutls-x509-crq-get-signature-oid.returns"></a><h4>Returns</h4>
16593 <p> zero or a negative error code on error.</p>
16594 </div>
16595 <p class="since">Since: 3.5.0</p>
16596 </div>
16597 <hr>
16598 <div class="refsect2">
16599 <a name="gnutls-x509-crq-get-pk-oid"></a><h3>gnutls_x509_crq_get_pk_oid ()</h3>
16600 <pre class="programlisting"><span class="returnvalue">int</span>
16601 gnutls_x509_crq_get_pk_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16602 <em class="parameter"><code><span class="type">char</span> *oid</code></em>,
16603 <em class="parameter"><code><span class="type">size_t</span> *oid_size</code></em>);</pre>
16604 <p>This function will return the OID of the public key algorithm
16605 on that certificate request. This function
16606 is useful in the case <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-pk-algorithm" title="gnutls_x509_crq_get_pk_algorithm ()"><code class="function">gnutls_x509_crq_get_pk_algorithm()</code></a>
16607 returned <a class="link" href="gnutls-gnutls.html#GNUTLS-PK-UNKNOWN:CAPS"><code class="literal">GNUTLS_PK_UNKNOWN</code></a>.</p>
16608 <div class="refsect3">
16609 <a name="gnutls-x509-crq-get-pk-oid.parameters"></a><h4>Parameters</h4>
16610 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16611 <colgroup>
16612 <col width="150px" class="parameters_name">
16613 <col class="parameters_description">
16614 <col width="200px" class="parameters_annotations">
16615 </colgroup>
16616 <tbody>
16617 <tr>
16618 <td class="parameter_name"><p>crq</p></td>
16619 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
16620 <td class="parameter_annotations"> </td>
16621 </tr>
16622 <tr>
16623 <td class="parameter_name"><p>oid</p></td>
16624 <td class="parameter_description"><p>a pointer to a buffer to hold the OID (may be null)</p></td>
16625 <td class="parameter_annotations"> </td>
16626 </tr>
16627 <tr>
16628 <td class="parameter_name"><p>oid_size</p></td>
16629 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>oid</code></em>
16630 </p></td>
16631 <td class="parameter_annotations"> </td>
16632 </tr>
16633 </tbody>
16634 </table></div>
16635 </div>
16636 <div class="refsect3">
16637 <a name="gnutls-x509-crq-get-pk-oid.returns"></a><h4>Returns</h4>
16638 <p> zero or a negative error code on error.</p>
16639 </div>
16640 <p class="since">Since: 3.5.0</p>
16641 </div>
16642 <hr>
16643 <div class="refsect2">
16644 <a name="gnutls-x509-crq-get-key-id"></a><h3>gnutls_x509_crq_get_key_id ()</h3>
16645 <pre class="programlisting"><span class="returnvalue">int</span>
16646 gnutls_x509_crq_get_key_id (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16647 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
16648 <em class="parameter"><code>unsigned <span class="type">char</span> *output_data</code></em>,
16649 <em class="parameter"><code><span class="type">size_t</span> *output_data_size</code></em>);</pre>
16650 <p>This function will return a unique ID that depends on the public key
16651 parameters. This ID can be used in checking whether a certificate
16652 corresponds to the given private key.</p>
16653 <p>If the buffer provided is not long enough to hold the output, then
16654 *<em class="parameter"><code>output_data_size</code></em>
16655 is updated and GNUTLS_E_SHORT_MEMORY_BUFFER will
16656 be returned. The output will normally be a SHA-1 hash output,
16657 which is 20 bytes.</p>
16658 <div class="refsect3">
16659 <a name="gnutls-x509-crq-get-key-id.parameters"></a><h4>Parameters</h4>
16660 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16661 <colgroup>
16662 <col width="150px" class="parameters_name">
16663 <col class="parameters_description">
16664 <col width="200px" class="parameters_annotations">
16665 </colgroup>
16666 <tbody>
16667 <tr>
16668 <td class="parameter_name"><p>crq</p></td>
16669 <td class="parameter_description"><p>a certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a></p></td>
16670 <td class="parameter_annotations"> </td>
16671 </tr>
16672 <tr>
16673 <td class="parameter_name"><p>flags</p></td>
16674 <td class="parameter_description"><p>should be one of the flags from <a class="link" href="gnutls-x509.html#gnutls-keyid-flags-t" title="enum gnutls_keyid_flags_t"><code class="literal">gnutls_keyid_flags_t</code></a></p></td>
16675 <td class="parameter_annotations"> </td>
16676 </tr>
16677 <tr>
16678 <td class="parameter_name"><p>output_data</p></td>
16679 <td class="parameter_description"><p>will contain the key ID</p></td>
16680 <td class="parameter_annotations"> </td>
16681 </tr>
16682 <tr>
16683 <td class="parameter_name"><p>output_data_size</p></td>
16684 <td class="parameter_description"><p>holds the size of output_data (and will be
16685 replaced by the actual size of parameters)</p></td>
16686 <td class="parameter_annotations"> </td>
16687 </tr>
16688 </tbody>
16689 </table></div>
16690 </div>
16691 <div class="refsect3">
16692 <a name="gnutls-x509-crq-get-key-id.returns"></a><h4>Returns</h4>
16693 <p> In case of failure a negative error code will be
16694 returned, and 0 on success.</p>
16695 </div>
16696 <p class="since">Since: 2.8.0</p>
16697 </div>
16698 <hr>
16699 <div class="refsect2">
16700 <a name="gnutls-x509-crq-get-key-rsa-raw"></a><h3>gnutls_x509_crq_get_key_rsa_raw ()</h3>
16701 <pre class="programlisting"><span class="returnvalue">int</span>
16702 gnutls_x509_crq_get_key_rsa_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16703 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *m</code></em>,
16704 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *e</code></em>);</pre>
16705 <p>This function will export the RSA public key's parameters found in
16706 the given structure. The new parameters will be allocated using
16707 <code class="function">gnutls_malloc()</code> and will be stored in the appropriate datum.</p>
16708 <div class="refsect3">
16709 <a name="gnutls-x509-crq-get-key-rsa-raw.parameters"></a><h4>Parameters</h4>
16710 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16711 <colgroup>
16712 <col width="150px" class="parameters_name">
16713 <col class="parameters_description">
16714 <col width="200px" class="parameters_annotations">
16715 </colgroup>
16716 <tbody>
16717 <tr>
16718 <td class="parameter_name"><p>crq</p></td>
16719 <td class="parameter_description"><p>Holds the certificate</p></td>
16720 <td class="parameter_annotations"> </td>
16721 </tr>
16722 <tr>
16723 <td class="parameter_name"><p>m</p></td>
16724 <td class="parameter_description"><p>will hold the modulus</p></td>
16725 <td class="parameter_annotations"> </td>
16726 </tr>
16727 <tr>
16728 <td class="parameter_name"><p>e</p></td>
16729 <td class="parameter_description"><p>will hold the public exponent</p></td>
16730 <td class="parameter_annotations"> </td>
16731 </tr>
16732 </tbody>
16733 </table></div>
16734 </div>
16735 <div class="refsect3">
16736 <a name="gnutls-x509-crq-get-key-rsa-raw.returns"></a><h4>Returns</h4>
16737 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
16738 negative error value.</p>
16739 </div>
16740 <p class="since">Since: 2.8.0</p>
16741 </div>
16742 <hr>
16743 <div class="refsect2">
16744 <a name="gnutls-x509-crq-get-key-usage"></a><h3>gnutls_x509_crq_get_key_usage ()</h3>
16745 <pre class="programlisting"><span class="returnvalue">int</span>
16746 gnutls_x509_crq_get_key_usage (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16747 <em class="parameter"><code>unsigned <span class="type">int</span> *key_usage</code></em>,
16748 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
16749 <p>This function will return certificate's key usage, by reading the
16750 keyUsage X.509 extension (2.5.29.15). The key usage value will
16751 ORed values of the: <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-DIGITAL-SIGNATURE:CAPS" title="GNUTLS_KEY_DIGITAL_SIGNATURE"><code class="literal">GNUTLS_KEY_DIGITAL_SIGNATURE</code></a>,
16752 <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-NON-REPUDIATION:CAPS" title="GNUTLS_KEY_NON_REPUDIATION"><code class="literal">GNUTLS_KEY_NON_REPUDIATION</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-KEY-ENCIPHERMENT:CAPS" title="GNUTLS_KEY_KEY_ENCIPHERMENT"><code class="literal">GNUTLS_KEY_KEY_ENCIPHERMENT</code></a>,
16753 <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-DATA-ENCIPHERMENT:CAPS" title="GNUTLS_KEY_DATA_ENCIPHERMENT"><code class="literal">GNUTLS_KEY_DATA_ENCIPHERMENT</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-KEY-AGREEMENT:CAPS" title="GNUTLS_KEY_KEY_AGREEMENT"><code class="literal">GNUTLS_KEY_KEY_AGREEMENT</code></a>,
16754 <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-KEY-CERT-SIGN:CAPS" title="GNUTLS_KEY_KEY_CERT_SIGN"><code class="literal">GNUTLS_KEY_KEY_CERT_SIGN</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-CRL-SIGN:CAPS" title="GNUTLS_KEY_CRL_SIGN"><code class="literal">GNUTLS_KEY_CRL_SIGN</code></a>,
16755 <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-ENCIPHER-ONLY:CAPS" title="GNUTLS_KEY_ENCIPHER_ONLY"><code class="literal">GNUTLS_KEY_ENCIPHER_ONLY</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-DECIPHER-ONLY:CAPS" title="GNUTLS_KEY_DECIPHER_ONLY"><code class="literal">GNUTLS_KEY_DECIPHER_ONLY</code></a>.</p>
16756 <div class="refsect3">
16757 <a name="gnutls-x509-crq-get-key-usage.parameters"></a><h4>Parameters</h4>
16758 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16759 <colgroup>
16760 <col width="150px" class="parameters_name">
16761 <col class="parameters_description">
16762 <col width="200px" class="parameters_annotations">
16763 </colgroup>
16764 <tbody>
16765 <tr>
16766 <td class="parameter_name"><p>crq</p></td>
16767 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
16768 <td class="parameter_annotations"> </td>
16769 </tr>
16770 <tr>
16771 <td class="parameter_name"><p>key_usage</p></td>
16772 <td class="parameter_description"><p>where the key usage bits will be stored</p></td>
16773 <td class="parameter_annotations"> </td>
16774 </tr>
16775 <tr>
16776 <td class="parameter_name"><p>critical</p></td>
16777 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical</p></td>
16778 <td class="parameter_annotations"> </td>
16779 </tr>
16780 </tbody>
16781 </table></div>
16782 </div>
16783 <div class="refsect3">
16784 <a name="gnutls-x509-crq-get-key-usage.returns"></a><h4>Returns</h4>
16785 <p> the certificate key usage, or a negative error code in case of
16786 parsing error. If the certificate does not contain the keyUsage
16787 extension <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> will be
16788 returned.</p>
16789 </div>
16790 <p class="since">Since: 2.8.0</p>
16791 </div>
16792 <hr>
16793 <div class="refsect2">
16794 <a name="gnutls-x509-crq-get-basic-constraints"></a><h3>gnutls_x509_crq_get_basic_constraints ()</h3>
16795 <pre class="programlisting"><span class="returnvalue">int</span>
16796 gnutls_x509_crq_get_basic_constraints (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16797 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>,
16798 <em class="parameter"><code>unsigned <span class="type">int</span> *ca</code></em>,
16799 <em class="parameter"><code><span class="type">int</span> *pathlen</code></em>);</pre>
16800 <p>This function will read the certificate's basic constraints, and
16801 return the certificates CA status. It reads the basicConstraints
16802 X.509 extension (2.5.29.19).</p>
16803 <div class="refsect3">
16804 <a name="gnutls-x509-crq-get-basic-constraints.parameters"></a><h4>Parameters</h4>
16805 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16806 <colgroup>
16807 <col width="150px" class="parameters_name">
16808 <col class="parameters_description">
16809 <col width="200px" class="parameters_annotations">
16810 </colgroup>
16811 <tbody>
16812 <tr>
16813 <td class="parameter_name"><p>crq</p></td>
16814 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
16815 <td class="parameter_annotations"> </td>
16816 </tr>
16817 <tr>
16818 <td class="parameter_name"><p>critical</p></td>
16819 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical</p></td>
16820 <td class="parameter_annotations"> </td>
16821 </tr>
16822 <tr>
16823 <td class="parameter_name"><p>ca</p></td>
16824 <td class="parameter_description"><p>pointer to output integer indicating CA status, may be NULL,
16825 value is 1 if the certificate CA flag is set, 0 otherwise.</p></td>
16826 <td class="parameter_annotations"> </td>
16827 </tr>
16828 <tr>
16829 <td class="parameter_name"><p>pathlen</p></td>
16830 <td class="parameter_description"><p>pointer to output integer indicating path length (may be
16831 NULL), non-negative error codes indicate a present pathLenConstraint
16832 field and the actual value, -1 indicate that the field is absent.</p></td>
16833 <td class="parameter_annotations"> </td>
16834 </tr>
16835 </tbody>
16836 </table></div>
16837 </div>
16838 <div class="refsect3">
16839 <a name="gnutls-x509-crq-get-basic-constraints.returns"></a><h4>Returns</h4>
16840 <p> If the certificate is a CA a positive value will be
16841 returned, or (0) if the certificate does not have CA flag set.
16842 A negative error code may be returned in case of errors. If the
16843 certificate does not contain the basicConstraints extension
16844 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> will be returned.</p>
16845 </div>
16846 <p class="since">Since: 2.8.0</p>
16847 </div>
16848 <hr>
16849 <div class="refsect2">
16850 <a name="gnutls-x509-crq-get-subject-alt-name"></a><h3>gnutls_x509_crq_get_subject_alt_name ()</h3>
16851 <pre class="programlisting"><span class="returnvalue">int</span>
16852 gnutls_x509_crq_get_subject_alt_name (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16853 <em class="parameter"><code>unsigned <span class="type">int</span> seq</code></em>,
16854 <em class="parameter"><code><span class="type">void</span> *ret</code></em>,
16855 <em class="parameter"><code><span class="type">size_t</span> *ret_size</code></em>,
16856 <em class="parameter"><code>unsigned <span class="type">int</span> *ret_type</code></em>,
16857 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
16858 <p>This function will return the alternative names, contained in the
16859 given certificate. It is the same as
16860 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-subject-alt-name" title="gnutls_x509_crq_get_subject_alt_name ()"><code class="function">gnutls_x509_crq_get_subject_alt_name()</code></a> except for the fact that it
16861 will return the type of the alternative name in <em class="parameter"><code>ret_type</code></em>
16862 even if
16863 the function fails for some reason (i.e. the buffer provided is
16864 not enough).</p>
16865 <div class="refsect3">
16866 <a name="gnutls-x509-crq-get-subject-alt-name.parameters"></a><h4>Parameters</h4>
16867 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16868 <colgroup>
16869 <col width="150px" class="parameters_name">
16870 <col class="parameters_description">
16871 <col width="200px" class="parameters_annotations">
16872 </colgroup>
16873 <tbody>
16874 <tr>
16875 <td class="parameter_name"><p>crq</p></td>
16876 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
16877 <td class="parameter_annotations"> </td>
16878 </tr>
16879 <tr>
16880 <td class="parameter_name"><p>seq</p></td>
16881 <td class="parameter_description"><p>specifies the sequence number of the alt name, 0 for the
16882 first one, 1 for the second etc.</p></td>
16883 <td class="parameter_annotations"> </td>
16884 </tr>
16885 <tr>
16886 <td class="parameter_name"><p>ret</p></td>
16887 <td class="parameter_description"><p>is the place where the alternative name will be copied to</p></td>
16888 <td class="parameter_annotations"> </td>
16889 </tr>
16890 <tr>
16891 <td class="parameter_name"><p>ret_size</p></td>
16892 <td class="parameter_description"><p>holds the size of ret.</p></td>
16893 <td class="parameter_annotations"> </td>
16894 </tr>
16895 <tr>
16896 <td class="parameter_name"><p>ret_type</p></td>
16897 <td class="parameter_description"><p>holds the <a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a> name type</p></td>
16898 <td class="parameter_annotations"> </td>
16899 </tr>
16900 <tr>
16901 <td class="parameter_name"><p>critical</p></td>
16902 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical
16903 (may be null)</p></td>
16904 <td class="parameter_annotations"> </td>
16905 </tr>
16906 </tbody>
16907 </table></div>
16908 </div>
16909 <div class="refsect3">
16910 <a name="gnutls-x509-crq-get-subject-alt-name.returns"></a><h4>Returns</h4>
16911 <p> the alternative subject name type on success, one of the
16912 enumerated <a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t"><span class="type">gnutls_x509_subject_alt_name_t</span></a>. It will return
16913 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if <em class="parameter"><code>ret_size</code></em>
16914 is not large enough to
16915 hold the value. In that case <em class="parameter"><code>ret_size</code></em>
16916 will be updated with the
16917 required size. If the certificate request does not have an
16918 Alternative name with the specified sequence number then
16919 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> is returned.</p>
16920 </div>
16921 <p class="since">Since: 2.8.0</p>
16922 </div>
16923 <hr>
16924 <div class="refsect2">
16925 <a name="gnutls-x509-crq-get-subject-alt-othername-oid"></a><h3>gnutls_x509_crq_get_subject_alt_othername_oid ()</h3>
16926 <pre class="programlisting"><span class="returnvalue">int</span>
16927 gnutls_x509_crq_get_subject_alt_othername_oid
16928 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16929 <em class="parameter"><code>unsigned <span class="type">int</span> seq</code></em>,
16930 <em class="parameter"><code><span class="type">void</span> *ret</code></em>,
16931 <em class="parameter"><code><span class="type">size_t</span> *ret_size</code></em>);</pre>
16932 <p>This function will extract the type OID of an otherName Subject
16933 Alternative Name, contained in the given certificate, and return
16934 the type as an enumerated element.</p>
16935 <p>This function is only useful if
16936 <a class="link" href="gnutls-x509.html#gnutls-x509-crq-get-subject-alt-name" title="gnutls_x509_crq_get_subject_alt_name ()"><code class="function">gnutls_x509_crq_get_subject_alt_name()</code></a> returned
16937 <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME</code></a>.</p>
16938 <div class="refsect3">
16939 <a name="gnutls-x509-crq-get-subject-alt-othername-oid.parameters"></a><h4>Parameters</h4>
16940 <div class="informaltable"><table class="informaltable" width="100%" border="0">
16941 <colgroup>
16942 <col width="150px" class="parameters_name">
16943 <col class="parameters_description">
16944 <col width="200px" class="parameters_annotations">
16945 </colgroup>
16946 <tbody>
16947 <tr>
16948 <td class="parameter_name"><p>crq</p></td>
16949 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
16950 <td class="parameter_annotations"> </td>
16951 </tr>
16952 <tr>
16953 <td class="parameter_name"><p>seq</p></td>
16954 <td class="parameter_description"><p>specifies the sequence number of the alt name (0 for the first one, 1 for the second etc.)</p></td>
16955 <td class="parameter_annotations"> </td>
16956 </tr>
16957 <tr>
16958 <td class="parameter_name"><p>ret</p></td>
16959 <td class="parameter_description"><p>is the place where the otherName OID will be copied to</p></td>
16960 <td class="parameter_annotations"> </td>
16961 </tr>
16962 <tr>
16963 <td class="parameter_name"><p>ret_size</p></td>
16964 <td class="parameter_description"><p>holds the size of ret.</p></td>
16965 <td class="parameter_annotations"> </td>
16966 </tr>
16967 </tbody>
16968 </table></div>
16969 </div>
16970 <div class="refsect3">
16971 <a name="gnutls-x509-crq-get-subject-alt-othername-oid.returns"></a><h4>Returns</h4>
16972 <p> the alternative subject name type on success, one of the
16973 enumerated gnutls_x509_subject_alt_name_t. For supported OIDs,
16974 it will return one of the virtual (GNUTLS_SAN_OTHERNAME_*) types,
16975 e.g. <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME-XMPP:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME_XMPP</code></a>, and <a class="link" href="gnutls-gnutls.html#GNUTLS-SAN-OTHERNAME:CAPS"><code class="literal">GNUTLS_SAN_OTHERNAME</code></a> for
16976 unknown OIDs. It will return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if
16977 <em class="parameter"><code>ret_size</code></em>
16978 is not large enough to hold the value. In that case
16979 <em class="parameter"><code>ret_size</code></em>
16980 will be updated with the required size. If the
16981 certificate does not have an Alternative name with the specified
16982 sequence number and with the otherName type then
16983 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> is returned.</p>
16984 </div>
16985 <p class="since">Since: 2.8.0</p>
16986 </div>
16987 <hr>
16988 <div class="refsect2">
16989 <a name="gnutls-x509-crq-get-extension-by-oid"></a><h3>gnutls_x509_crq_get_extension_by_oid ()</h3>
16990 <pre class="programlisting"><span class="returnvalue">int</span>
16991 gnutls_x509_crq_get_extension_by_oid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
16992 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
16993 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
16994 <em class="parameter"><code><span class="type">void</span> *buf</code></em>,
16995 <em class="parameter"><code><span class="type">size_t</span> *sizeof_buf</code></em>,
16996 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
16997 <p>This function will return the extension specified by the OID in
16998 the certificate. The extensions will be returned as binary data
16999 DER encoded, in the provided buffer.</p>
17000 <div class="refsect3">
17001 <a name="gnutls-x509-crq-get-extension-by-oid.parameters"></a><h4>Parameters</h4>
17002 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17003 <colgroup>
17004 <col width="150px" class="parameters_name">
17005 <col class="parameters_description">
17006 <col width="200px" class="parameters_annotations">
17007 </colgroup>
17008 <tbody>
17009 <tr>
17010 <td class="parameter_name"><p>crq</p></td>
17011 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> type</p></td>
17012 <td class="parameter_annotations"> </td>
17013 </tr>
17014 <tr>
17015 <td class="parameter_name"><p>oid</p></td>
17016 <td class="parameter_description"><p>holds an Object Identifier in a null terminated string</p></td>
17017 <td class="parameter_annotations"> </td>
17018 </tr>
17019 <tr>
17020 <td class="parameter_name"><p>indx</p></td>
17021 <td class="parameter_description"><p>In case multiple same OIDs exist in the extensions, this
17022 specifies which to get. Use (0) to get the first one.</p></td>
17023 <td class="parameter_annotations"> </td>
17024 </tr>
17025 <tr>
17026 <td class="parameter_name"><p>buf</p></td>
17027 <td class="parameter_description"><p>a pointer to a structure to hold the name (may be null)</p></td>
17028 <td class="parameter_annotations"> </td>
17029 </tr>
17030 <tr>
17031 <td class="parameter_name"><p>buf_size</p></td>
17032 <td class="parameter_description"><p>initially holds the size of <em class="parameter"><code>buf</code></em>
17033 </p></td>
17034 <td class="parameter_annotations"> </td>
17035 </tr>
17036 <tr>
17037 <td class="parameter_name"><p>critical</p></td>
17038 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical</p></td>
17039 <td class="parameter_annotations"> </td>
17040 </tr>
17041 </tbody>
17042 </table></div>
17043 </div>
17044 <div class="refsect3">
17045 <a name="gnutls-x509-crq-get-extension-by-oid.returns"></a><h4>Returns</h4>
17046 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
17047 negative error code in case of an error. If the certificate does not
17048 contain the specified extension
17049 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> will be returned.</p>
17050 </div>
17051 <p class="since">Since: 2.8.0</p>
17052 </div>
17053 <hr>
17054 <div class="refsect2">
17055 <a name="gnutls-x509-crq-get-tlsfeatures"></a><h3>gnutls_x509_crq_get_tlsfeatures ()</h3>
17056 <pre class="programlisting"><span class="returnvalue">int</span>
17057 gnutls_x509_crq_get_tlsfeatures (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
17058 <em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-tlsfeatures-t" title="gnutls_x509_tlsfeatures_t"><span class="type">gnutls_x509_tlsfeatures_t</span></a> features</code></em>,
17059 <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>,
17060 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
17061 <p>This function will get the X.509 TLS features
17062 extension structure from the certificate request.
17063 The returned structure needs to be freed using
17064 <a class="link" href="gnutls-x509.html#gnutls-x509-tlsfeatures-deinit" title="gnutls_x509_tlsfeatures_deinit ()"><code class="function">gnutls_x509_tlsfeatures_deinit()</code></a>.</p>
17065 <p>When the <em class="parameter"><code>flags</code></em>
17066 is set to <a class="link" href="gnutls-x509.html#GNUTLS-EXT-FLAG-APPEND:CAPS" title="GNUTLS_EXT_FLAG_APPEND"><code class="literal">GNUTLS_EXT_FLAG_APPEND</code></a>,
17067 then if the <em class="parameter"><code>features</code></em>
17068 structure is empty this function will behave
17069 identically as if the flag was not set. Otherwise if there are elements
17070 in the <em class="parameter"><code>features</code></em>
17071 structure then they will be merged with.</p>
17072 <p>Note that <em class="parameter"><code>features</code></em>
17073 must be initialized prior to calling this function.</p>
17074 <div class="refsect3">
17075 <a name="gnutls-x509-crq-get-tlsfeatures.parameters"></a><h4>Parameters</h4>
17076 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17077 <colgroup>
17078 <col width="150px" class="parameters_name">
17079 <col class="parameters_description">
17080 <col width="200px" class="parameters_annotations">
17081 </colgroup>
17082 <tbody>
17083 <tr>
17084 <td class="parameter_name"><p>crq</p></td>
17085 <td class="parameter_description"><p>An X.509 certificate request</p></td>
17086 <td class="parameter_annotations"> </td>
17087 </tr>
17088 <tr>
17089 <td class="parameter_name"><p>features</p></td>
17090 <td class="parameter_description"><p>If the function succeeds, the
17091 features will be stored in this variable.</p></td>
17092 <td class="parameter_annotations"> </td>
17093 </tr>
17094 <tr>
17095 <td class="parameter_name"><p>flags</p></td>
17096 <td class="parameter_description"><p>zero or <a class="link" href="gnutls-x509.html#GNUTLS-EXT-FLAG-APPEND:CAPS" title="GNUTLS_EXT_FLAG_APPEND"><code class="literal">GNUTLS_EXT_FLAG_APPEND</code></a></p></td>
17097 <td class="parameter_annotations"> </td>
17098 </tr>
17099 <tr>
17100 <td class="parameter_name"><p>critical</p></td>
17101 <td class="parameter_description"><p>the extension status</p></td>
17102 <td class="parameter_annotations"> </td>
17103 </tr>
17104 </tbody>
17105 </table></div>
17106 </div>
17107 <div class="refsect3">
17108 <a name="gnutls-x509-crq-get-tlsfeatures.returns"></a><h4>Returns</h4>
17109 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned,
17110 otherwise a negative error value.</p>
17111 </div>
17112 <p class="since">Since: 3.5.1</p>
17113 </div>
17114 <hr>
17115 <div class="refsect2">
17116 <a name="gnutls-x509-crq-set-tlsfeatures"></a><h3>gnutls_x509_crq_set_tlsfeatures ()</h3>
17117 <pre class="programlisting"><span class="returnvalue">int</span>
17118 gnutls_x509_crq_set_tlsfeatures (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t"><span class="type">gnutls_x509_crq_t</span></a> crq</code></em>,
17119 <em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-tlsfeatures-t" title="gnutls_x509_tlsfeatures_t"><span class="type">gnutls_x509_tlsfeatures_t</span></a> features</code></em>);</pre>
17120 <p>This function will set the certificate request's
17121 X.509 TLS extension from the given structure.</p>
17122 <div class="refsect3">
17123 <a name="gnutls-x509-crq-set-tlsfeatures.parameters"></a><h4>Parameters</h4>
17124 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17125 <colgroup>
17126 <col width="150px" class="parameters_name">
17127 <col class="parameters_description">
17128 <col width="200px" class="parameters_annotations">
17129 </colgroup>
17130 <tbody>
17131 <tr>
17132 <td class="parameter_name"><p>crq</p></td>
17133 <td class="parameter_description"><p>An X.509 certificate request</p></td>
17134 <td class="parameter_annotations"> </td>
17135 </tr>
17136 <tr>
17137 <td class="parameter_name"><p>features</p></td>
17138 <td class="parameter_description"><p>If the function succeeds, the
17139 features will be added to the certificate
17140 request.</p></td>
17141 <td class="parameter_annotations"> </td>
17142 </tr>
17143 </tbody>
17144 </table></div>
17145 </div>
17146 <div class="refsect3">
17147 <a name="gnutls-x509-crq-set-tlsfeatures.returns"></a><h4>Returns</h4>
17148 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned,
17149 otherwise a negative error value.</p>
17150 </div>
17151 <p class="since">Since: 3.5.1</p>
17152 </div>
17153 <hr>
17154 <div class="refsect2">
17155 <a name="gnutls-x509-crt-get-extension-by-oid2"></a><h3>gnutls_x509_crt_get_extension_by_oid2 ()</h3>
17156 <pre class="programlisting"><span class="returnvalue">int</span>
17157 gnutls_x509_crt_get_extension_by_oid2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
17158 <em class="parameter"><code>const <span class="type">char</span> *oid</code></em>,
17159 <em class="parameter"><code><span class="type">unsigned </span> indx</code></em>,
17160 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *output</code></em>,
17161 <em class="parameter"><code>unsigned <span class="type">int</span> *critical</code></em>);</pre>
17162 <p>This function will return the extension specified by the OID in the
17163 certificate. The extensions will be returned as binary data DER
17164 encoded, in the provided buffer.</p>
17165 <div class="refsect3">
17166 <a name="gnutls-x509-crt-get-extension-by-oid2.parameters"></a><h4>Parameters</h4>
17167 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17168 <colgroup>
17169 <col width="150px" class="parameters_name">
17170 <col class="parameters_description">
17171 <col width="200px" class="parameters_annotations">
17172 </colgroup>
17173 <tbody>
17174 <tr>
17175 <td class="parameter_name"><p>cert</p></td>
17176 <td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type</p></td>
17177 <td class="parameter_annotations"> </td>
17178 </tr>
17179 <tr>
17180 <td class="parameter_name"><p>oid</p></td>
17181 <td class="parameter_description"><p>holds an Object Identified in null terminated string</p></td>
17182 <td class="parameter_annotations"> </td>
17183 </tr>
17184 <tr>
17185 <td class="parameter_name"><p>indx</p></td>
17186 <td class="parameter_description"><p>In case multiple same OIDs exist in the extensions, this specifies which to send. Use (0) to get the first one.</p></td>
17187 <td class="parameter_annotations"> </td>
17188 </tr>
17189 <tr>
17190 <td class="parameter_name"><p>output</p></td>
17191 <td class="parameter_description"><p>will hold the allocated extension data</p></td>
17192 <td class="parameter_annotations"> </td>
17193 </tr>
17194 <tr>
17195 <td class="parameter_name"><p>critical</p></td>
17196 <td class="parameter_description"><p>will be non-zero if the extension is marked as critical</p></td>
17197 <td class="parameter_annotations"> </td>
17198 </tr>
17199 </tbody>
17200 </table></div>
17201 </div>
17202 <div class="refsect3">
17203 <a name="gnutls-x509-crt-get-extension-by-oid2.returns"></a><h4>Returns</h4>
17204 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned,
17205 otherwise a negative error code is returned. If the certificate does not
17206 contain the specified extension
17207 GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned.</p>
17208 </div>
17209 <p class="since">Since: 3.3.8</p>
17210 </div>
17211 <hr>
17212 <div class="refsect2">
17213 <a name="gnutls-x509-trust-list-init"></a><h3>gnutls_x509_trust_list_init ()</h3>
17214 <pre class="programlisting"><span class="returnvalue">int</span>
17215 gnutls_x509_trust_list_init (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> *list</code></em>,
17216 <em class="parameter"><code>unsigned <span class="type">int</span> size</code></em>);</pre>
17217 <p>This function will initialize an X.509 trust list structure.</p>
17218 <div class="refsect3">
17219 <a name="gnutls-x509-trust-list-init.parameters"></a><h4>Parameters</h4>
17220 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17221 <colgroup>
17222 <col width="150px" class="parameters_name">
17223 <col class="parameters_description">
17224 <col width="200px" class="parameters_annotations">
17225 </colgroup>
17226 <tbody>
17227 <tr>
17228 <td class="parameter_name"><p>list</p></td>
17229 <td class="parameter_description"><p>A pointer to the type to be initialized</p></td>
17230 <td class="parameter_annotations"> </td>
17231 </tr>
17232 <tr>
17233 <td class="parameter_name"><p>size</p></td>
17234 <td class="parameter_description"><p>The size of the internal hash table. Use (0) for default size.</p></td>
17235 <td class="parameter_annotations"> </td>
17236 </tr>
17237 </tbody>
17238 </table></div>
17239 </div>
17240 <div class="refsect3">
17241 <a name="gnutls-x509-trust-list-init.returns"></a><h4>Returns</h4>
17242 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
17243 negative error value.</p>
17244 </div>
17245 <p class="since">Since: 3.0.0</p>
17246 </div>
17247 <hr>
17248 <div class="refsect2">
17249 <a name="gnutls-x509-trust-list-deinit"></a><h3>gnutls_x509_trust_list_deinit ()</h3>
17250 <pre class="programlisting"><span class="returnvalue">void</span>
17251 gnutls_x509_trust_list_deinit (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
17252 <em class="parameter"><code>unsigned <span class="type">int</span> all</code></em>);</pre>
17253 <p>This function will deinitialize a trust list. Note that the
17254 <em class="parameter"><code>all</code></em>
17255 flag should be typically non-zero unless you have specified
17256 your certificates using <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-add-cas" title="gnutls_x509_trust_list_add_cas ()"><code class="function">gnutls_x509_trust_list_add_cas()</code></a> and you
17257 want to prevent them from being deinitialized by this function.</p>
17258 <div class="refsect3">
17259 <a name="gnutls-x509-trust-list-deinit.parameters"></a><h4>Parameters</h4>
17260 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17261 <colgroup>
17262 <col width="150px" class="parameters_name">
17263 <col class="parameters_description">
17264 <col width="200px" class="parameters_annotations">
17265 </colgroup>
17266 <tbody>
17267 <tr>
17268 <td class="parameter_name"><p>list</p></td>
17269 <td class="parameter_description"><p>The list to be deinitialized</p></td>
17270 <td class="parameter_annotations"> </td>
17271 </tr>
17272 <tr>
17273 <td class="parameter_name"><p>all</p></td>
17274 <td class="parameter_description"><p>if non-zero it will deinitialize all the certificates and CRLs contained in the structure.</p></td>
17275 <td class="parameter_annotations"> </td>
17276 </tr>
17277 </tbody>
17278 </table></div>
17279 </div>
17280 <p class="since">Since: 3.0.0</p>
17281 </div>
17282 <hr>
17283 <div class="refsect2">
17284 <a name="gnutls-x509-trust-list-get-issuer"></a><h3>gnutls_x509_trust_list_get_issuer ()</h3>
17285 <pre class="programlisting"><span class="returnvalue">int</span>
17286 gnutls_x509_trust_list_get_issuer (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
17287 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
17288 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *issuer</code></em>,
17289 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
17290 <p>This function will find the issuer of the given certificate.
17291 If the flag <a class="link" href="gnutls-x509.html#GNUTLS-TL-GET-COPY:CAPS"><code class="literal">GNUTLS_TL_GET_COPY</code></a> is specified a copy of the issuer
17292 will be returned which must be freed using <a class="link" href="gnutls-x509.html#gnutls-x509-crt-deinit" title="gnutls_x509_crt_deinit ()"><code class="function">gnutls_x509_crt_deinit()</code></a>.
17293 In that case the provided <em class="parameter"><code>issuer</code></em>
17294 must not be initialized.</p>
17295 <p>Note that the flag <a class="link" href="gnutls-x509.html#GNUTLS-TL-GET-COPY:CAPS"><code class="literal">GNUTLS_TL_GET_COPY</code></a> is required for this function
17296 to work with PKCS<span class="type">11</span> trust lists in a thread-safe way.</p>
17297 <div class="refsect3">
17298 <a name="gnutls-x509-trust-list-get-issuer.parameters"></a><h4>Parameters</h4>
17299 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17300 <colgroup>
17301 <col width="150px" class="parameters_name">
17302 <col class="parameters_description">
17303 <col width="200px" class="parameters_annotations">
17304 </colgroup>
17305 <tbody>
17306 <tr>
17307 <td class="parameter_name"><p>list</p></td>
17308 <td class="parameter_description"><p>The list</p></td>
17309 <td class="parameter_annotations"> </td>
17310 </tr>
17311 <tr>
17312 <td class="parameter_name"><p>cert</p></td>
17313 <td class="parameter_description"><p>is the certificate to find issuer for</p></td>
17314 <td class="parameter_annotations"> </td>
17315 </tr>
17316 <tr>
17317 <td class="parameter_name"><p>issuer</p></td>
17318 <td class="parameter_description"><p>Will hold the issuer if any. Should be treated as constant
17319 unless <a class="link" href="gnutls-x509.html#GNUTLS-TL-GET-COPY:CAPS"><code class="literal">GNUTLS_TL_GET_COPY</code></a> is set in <em class="parameter"><code>flags</code></em>
17320 .</p></td>
17321 <td class="parameter_annotations"> </td>
17322 </tr>
17323 <tr>
17324 <td class="parameter_name"><p>flags</p></td>
17325 <td class="parameter_description"><p>flags from <a class="link" href="gnutls-x509.html#gnutls-trust-list-flags-t" title="enum gnutls_trust_list_flags_t"><code class="literal">gnutls_trust_list_flags_t</code></a> (<a class="link" href="gnutls-x509.html#GNUTLS-TL-GET-COPY:CAPS"><code class="literal">GNUTLS_TL_GET_COPY</code></a> is applicable)</p></td>
17326 <td class="parameter_annotations"> </td>
17327 </tr>
17328 </tbody>
17329 </table></div>
17330 </div>
17331 <div class="refsect3">
17332 <a name="gnutls-x509-trust-list-get-issuer.returns"></a><h4>Returns</h4>
17333 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
17334 negative error value.</p>
17335 </div>
17336 <p class="since">Since: 3.0</p>
17337 </div>
17338 <hr>
17339 <div class="refsect2">
17340 <a name="gnutls-x509-trust-list-get-issuer-by-dn"></a><h3>gnutls_x509_trust_list_get_issuer_by_dn ()</h3>
17341 <pre class="programlisting"><span class="returnvalue">int</span>
17342 gnutls_x509_trust_list_get_issuer_by_dn
17343 (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
17344 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *dn</code></em>,
17345 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *issuer</code></em>,
17346 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
17347 <p>This function will find the issuer with the given name, and
17348 return a copy of the issuer, which must be freed using <a class="link" href="gnutls-x509.html#gnutls-x509-crt-deinit" title="gnutls_x509_crt_deinit ()"><code class="function">gnutls_x509_crt_deinit()</code></a>.</p>
17349 <div class="refsect3">
17350 <a name="gnutls-x509-trust-list-get-issuer-by-dn.parameters"></a><h4>Parameters</h4>
17351 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17352 <colgroup>
17353 <col width="150px" class="parameters_name">
17354 <col class="parameters_description">
17355 <col width="200px" class="parameters_annotations">
17356 </colgroup>
17357 <tbody>
17358 <tr>
17359 <td class="parameter_name"><p>list</p></td>
17360 <td class="parameter_description"><p>The list</p></td>
17361 <td class="parameter_annotations"> </td>
17362 </tr>
17363 <tr>
17364 <td class="parameter_name"><p>dn</p></td>
17365 <td class="parameter_description"><p>is the issuer's DN</p></td>
17366 <td class="parameter_annotations"> </td>
17367 </tr>
17368 <tr>
17369 <td class="parameter_name"><p>issuer</p></td>
17370 <td class="parameter_description"><p>Will hold the issuer if any. Should be deallocated after use.</p></td>
17371 <td class="parameter_annotations"> </td>
17372 </tr>
17373 <tr>
17374 <td class="parameter_name"><p>flags</p></td>
17375 <td class="parameter_description"><p>Use zero</p></td>
17376 <td class="parameter_annotations"> </td>
17377 </tr>
17378 </tbody>
17379 </table></div>
17380 </div>
17381 <div class="refsect3">
17382 <a name="gnutls-x509-trust-list-get-issuer-by-dn.returns"></a><h4>Returns</h4>
17383 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
17384 negative error value.</p>
17385 </div>
17386 <p class="since">Since: 3.4.0</p>
17387 </div>
17388 <hr>
17389 <div class="refsect2">
17390 <a name="gnutls-x509-trust-list-get-issuer-by-subject-key-id"></a><h3>gnutls_x509_trust_list_get_issuer_by_subject_key_id ()</h3>
17391 <pre class="programlisting"><span class="returnvalue">int</span>
17392 gnutls_x509_trust_list_get_issuer_by_subject_key_id
17393 (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
17394 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *dn</code></em>,
17395 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *spki</code></em>,
17396 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *issuer</code></em>,
17397 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
17398 <p>This function will find the issuer with the given name and subject key ID, and
17399 return a copy of the issuer, which must be freed using <a class="link" href="gnutls-x509.html#gnutls-x509-crt-deinit" title="gnutls_x509_crt_deinit ()"><code class="function">gnutls_x509_crt_deinit()</code></a>.</p>
17400 <div class="refsect3">
17401 <a name="gnutls-x509-trust-list-get-issuer-by-subject-key-id.parameters"></a><h4>Parameters</h4>
17402 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17403 <colgroup>
17404 <col width="150px" class="parameters_name">
17405 <col class="parameters_description">
17406 <col width="200px" class="parameters_annotations">
17407 </colgroup>
17408 <tbody>
17409 <tr>
17410 <td class="parameter_name"><p>list</p></td>
17411 <td class="parameter_description"><p>The list</p></td>
17412 <td class="parameter_annotations"> </td>
17413 </tr>
17414 <tr>
17415 <td class="parameter_name"><p>dn</p></td>
17416 <td class="parameter_description"><p>is the issuer's DN (may be <code class="literal">NULL</code>)</p></td>
17417 <td class="parameter_annotations"> </td>
17418 </tr>
17419 <tr>
17420 <td class="parameter_name"><p>spki</p></td>
17421 <td class="parameter_description"><p>is the subject key ID</p></td>
17422 <td class="parameter_annotations"> </td>
17423 </tr>
17424 <tr>
17425 <td class="parameter_name"><p>issuer</p></td>
17426 <td class="parameter_description"><p>Will hold the issuer if any. Should be deallocated after use.</p></td>
17427 <td class="parameter_annotations"> </td>
17428 </tr>
17429 <tr>
17430 <td class="parameter_name"><p>flags</p></td>
17431 <td class="parameter_description"><p>Use zero</p></td>
17432 <td class="parameter_annotations"> </td>
17433 </tr>
17434 </tbody>
17435 </table></div>
17436 </div>
17437 <div class="refsect3">
17438 <a name="gnutls-x509-trust-list-get-issuer-by-subject-key-id.returns"></a><h4>Returns</h4>
17439 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
17440 negative error value.</p>
17441 </div>
17442 <p class="since">Since: 3.4.2</p>
17443 </div>
17444 <hr>
17445 <div class="refsect2">
17446 <a name="gnutls-x509-trust-list-add-cas"></a><h3>gnutls_x509_trust_list_add_cas ()</h3>
17447 <pre class="programlisting"><span class="returnvalue">int</span>
17448 gnutls_x509_trust_list_add_cas (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
17449 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *clist</code></em>,
17450 <em class="parameter"><code><span class="type">unsigned </span> clist_size</code></em>,
17451 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
17452 <p>This function will add the given certificate authorities
17453 to the trusted list. The CAs in <em class="parameter"><code>clist</code></em>
17454 must not be deinitialized
17455 during the lifetime of <em class="parameter"><code>list</code></em>
17456 .</p>
17457 <p>If the flag <a class="link" href="gnutls-x509.html#GNUTLS-TL-NO-DUPLICATES:CAPS"><code class="literal">GNUTLS_TL_NO_DUPLICATES</code></a> is specified, then
17458 this function will ensure that no duplicates will be
17459 present in the final trust list.</p>
17460 <p>If the flag <a class="link" href="gnutls-x509.html#GNUTLS-TL-NO-DUPLICATE-KEY:CAPS"><code class="literal">GNUTLS_TL_NO_DUPLICATE_KEY</code></a> is specified, then
17461 this function will ensure that no certificates with the
17462 same key are present in the final trust list.</p>
17463 <p>If either <a class="link" href="gnutls-x509.html#GNUTLS-TL-NO-DUPLICATE-KEY:CAPS"><code class="literal">GNUTLS_TL_NO_DUPLICATE_KEY</code></a> or <a class="link" href="gnutls-x509.html#GNUTLS-TL-NO-DUPLICATES:CAPS"><code class="literal">GNUTLS_TL_NO_DUPLICATES</code></a>
17464 are given, <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-deinit" title="gnutls_x509_trust_list_deinit ()"><code class="function">gnutls_x509_trust_list_deinit()</code></a> must be called with parameter
17465 <em class="parameter"><code>all</code></em>
17466 being 1.</p>
17467 <div class="refsect3">
17468 <a name="gnutls-x509-trust-list-add-cas.parameters"></a><h4>Parameters</h4>
17469 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17470 <colgroup>
17471 <col width="150px" class="parameters_name">
17472 <col class="parameters_description">
17473 <col width="200px" class="parameters_annotations">
17474 </colgroup>
17475 <tbody>
17476 <tr>
17477 <td class="parameter_name"><p>list</p></td>
17478 <td class="parameter_description"><p>The list</p></td>
17479 <td class="parameter_annotations"> </td>
17480 </tr>
17481 <tr>
17482 <td class="parameter_name"><p>clist</p></td>
17483 <td class="parameter_description"><p>A list of CAs</p></td>
17484 <td class="parameter_annotations"> </td>
17485 </tr>
17486 <tr>
17487 <td class="parameter_name"><p>clist_size</p></td>
17488 <td class="parameter_description"><p>The length of the CA list</p></td>
17489 <td class="parameter_annotations"> </td>
17490 </tr>
17491 <tr>
17492 <td class="parameter_name"><p>flags</p></td>
17493 <td class="parameter_description"><p>flags from <a class="link" href="gnutls-x509.html#gnutls-trust-list-flags-t" title="enum gnutls_trust_list_flags_t"><code class="literal">gnutls_trust_list_flags_t</code></a></p></td>
17494 <td class="parameter_annotations"> </td>
17495 </tr>
17496 </tbody>
17497 </table></div>
17498 </div>
17499 <div class="refsect3">
17500 <a name="gnutls-x509-trust-list-add-cas.returns"></a><h4>Returns</h4>
17501 <p> The number of added elements is returned; that includes
17502 duplicate entries.</p>
17503 </div>
17504 <p class="since">Since: 3.0.0</p>
17505 </div>
17506 <hr>
17507 <div class="refsect2">
17508 <a name="gnutls-x509-trust-list-remove-cas"></a><h3>gnutls_x509_trust_list_remove_cas ()</h3>
17509 <pre class="programlisting"><span class="returnvalue">int</span>
17510 gnutls_x509_trust_list_remove_cas (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
17511 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *clist</code></em>,
17512 <em class="parameter"><code><span class="type">unsigned </span> clist_size</code></em>);</pre>
17513 <p>This function will remove the given certificate authorities
17514 from the trusted list.</p>
17515 <p>Note that this function can accept certificates and authorities
17516 not yet known. In that case they will be kept in a separate
17517 block list that will be used during certificate verification.
17518 Unlike <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-add-cas" title="gnutls_x509_trust_list_add_cas ()"><code class="function">gnutls_x509_trust_list_add_cas()</code></a> there is no deinitialization
17519 restriction for certificate list provided in this function.</p>
17520 <div class="refsect3">
17521 <a name="gnutls-x509-trust-list-remove-cas.parameters"></a><h4>Parameters</h4>
17522 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17523 <colgroup>
17524 <col width="150px" class="parameters_name">
17525 <col class="parameters_description">
17526 <col width="200px" class="parameters_annotations">
17527 </colgroup>
17528 <tbody>
17529 <tr>
17530 <td class="parameter_name"><p>list</p></td>
17531 <td class="parameter_description"><p>The list</p></td>
17532 <td class="parameter_annotations"> </td>
17533 </tr>
17534 <tr>
17535 <td class="parameter_name"><p>clist</p></td>
17536 <td class="parameter_description"><p>A list of CAs</p></td>
17537 <td class="parameter_annotations"> </td>
17538 </tr>
17539 <tr>
17540 <td class="parameter_name"><p>clist_size</p></td>
17541 <td class="parameter_description"><p>The length of the CA list</p></td>
17542 <td class="parameter_annotations"> </td>
17543 </tr>
17544 </tbody>
17545 </table></div>
17546 </div>
17547 <div class="refsect3">
17548 <a name="gnutls-x509-trust-list-remove-cas.returns"></a><h4>Returns</h4>
17549 <p> The number of removed elements is returned.</p>
17550 </div>
17551 <p class="since">Since: 3.1.10</p>
17552 </div>
17553 <hr>
17554 <div class="refsect2">
17555 <a name="gnutls-x509-trust-list-add-named-crt"></a><h3>gnutls_x509_trust_list_add_named_crt ()</h3>
17556 <pre class="programlisting"><span class="returnvalue">int</span>
17557 gnutls_x509_trust_list_add_named_crt (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
17558 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
17559 <em class="parameter"><code>const <span class="type">void</span> *name</code></em>,
17560 <em class="parameter"><code><span class="type">size_t</span> name_size</code></em>,
17561 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
17562 <p>This function will add the given certificate to the trusted
17563 list and associate it with a name. The certificate will not be
17564 be used for verification with <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-verify-crt" title="gnutls_x509_trust_list_verify_crt ()"><code class="function">gnutls_x509_trust_list_verify_crt()</code></a>
17565 but with <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-verify-named-crt" title="gnutls_x509_trust_list_verify_named_crt ()"><code class="function">gnutls_x509_trust_list_verify_named_crt()</code></a> or
17566 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-verify-crt2" title="gnutls_x509_trust_list_verify_crt2 ()"><code class="function">gnutls_x509_trust_list_verify_crt2()</code></a> - the latter only since
17567 GnuTLS 3.4.0 and if a hostname is provided.</p>
17568 <p>In principle this function can be used to set individual "server"
17569 certificates that are trusted by the user for that specific server
17570 but for no other purposes.</p>
17571 <p>The certificate <em class="parameter"><code>cert</code></em>
17572 must not be deinitialized during the lifetime
17573 of the <em class="parameter"><code>list</code></em>
17574 .</p>
17575 <div class="refsect3">
17576 <a name="gnutls-x509-trust-list-add-named-crt.parameters"></a><h4>Parameters</h4>
17577 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17578 <colgroup>
17579 <col width="150px" class="parameters_name">
17580 <col class="parameters_description">
17581 <col width="200px" class="parameters_annotations">
17582 </colgroup>
17583 <tbody>
17584 <tr>
17585 <td class="parameter_name"><p>list</p></td>
17586 <td class="parameter_description"><p>The list</p></td>
17587 <td class="parameter_annotations"> </td>
17588 </tr>
17589 <tr>
17590 <td class="parameter_name"><p>cert</p></td>
17591 <td class="parameter_description"><p>A certificate</p></td>
17592 <td class="parameter_annotations"> </td>
17593 </tr>
17594 <tr>
17595 <td class="parameter_name"><p>name</p></td>
17596 <td class="parameter_description"><p>An identifier for the certificate</p></td>
17597 <td class="parameter_annotations"> </td>
17598 </tr>
17599 <tr>
17600 <td class="parameter_name"><p>name_size</p></td>
17601 <td class="parameter_description"><p>The size of the identifier</p></td>
17602 <td class="parameter_annotations"> </td>
17603 </tr>
17604 <tr>
17605 <td class="parameter_name"><p>flags</p></td>
17606 <td class="parameter_description"><p>should be 0.</p></td>
17607 <td class="parameter_annotations"> </td>
17608 </tr>
17609 </tbody>
17610 </table></div>
17611 </div>
17612 <div class="refsect3">
17613 <a name="gnutls-x509-trust-list-add-named-crt.returns"></a><h4>Returns</h4>
17614 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
17615 negative error value.</p>
17616 </div>
17617 <p class="since">Since: 3.0.0</p>
17618 </div>
17619 <hr>
17620 <div class="refsect2">
17621 <a name="gnutls-x509-trust-list-add-crls"></a><h3>gnutls_x509_trust_list_add_crls ()</h3>
17622 <pre class="programlisting"><span class="returnvalue">int</span>
17623 gnutls_x509_trust_list_add_crls (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
17624 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> *crl_list</code></em>,
17625 <em class="parameter"><code><span class="type">unsigned </span> crl_size</code></em>,
17626 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
17627 <em class="parameter"><code>unsigned <span class="type">int</span> verification_flags</code></em>);</pre>
17628 <p>This function will add the given certificate revocation lists
17629 to the trusted list. The CRLs in <em class="parameter"><code>crl_list</code></em>
17630 must not be deinitialized
17631 during the lifetime of <em class="parameter"><code>list</code></em>
17632 .</p>
17633 <p>This function must be called after <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-add-cas" title="gnutls_x509_trust_list_add_cas ()"><code class="function">gnutls_x509_trust_list_add_cas()</code></a>
17634 to allow verifying the CRLs for validity. If the flag <a class="link" href="gnutls-x509.html#GNUTLS-TL-NO-DUPLICATES:CAPS"><code class="literal">GNUTLS_TL_NO_DUPLICATES</code></a>
17635 is given, then the final CRL list will not contain duplicate entries.</p>
17636 <p>If the flag <a class="link" href="gnutls-x509.html#GNUTLS-TL-NO-DUPLICATES:CAPS"><code class="literal">GNUTLS_TL_NO_DUPLICATES</code></a> is given, <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-deinit" title="gnutls_x509_trust_list_deinit ()"><code class="function">gnutls_x509_trust_list_deinit()</code></a> must be
17637 called with parameter <em class="parameter"><code>all</code></em>
17638 being 1.</p>
17639 <p>If flag <a class="link" href="gnutls-x509.html#GNUTLS-TL-VERIFY-CRL:CAPS"><code class="literal">GNUTLS_TL_VERIFY_CRL</code></a> is given the CRLs will be verified before being added,
17640 and if verification fails, they will be skipped.</p>
17641 <div class="refsect3">
17642 <a name="gnutls-x509-trust-list-add-crls.parameters"></a><h4>Parameters</h4>
17643 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17644 <colgroup>
17645 <col width="150px" class="parameters_name">
17646 <col class="parameters_description">
17647 <col width="200px" class="parameters_annotations">
17648 </colgroup>
17649 <tbody>
17650 <tr>
17651 <td class="parameter_name"><p>list</p></td>
17652 <td class="parameter_description"><p>The list</p></td>
17653 <td class="parameter_annotations"> </td>
17654 </tr>
17655 <tr>
17656 <td class="parameter_name"><p>crl_list</p></td>
17657 <td class="parameter_description"><p>A list of CRLs</p></td>
17658 <td class="parameter_annotations"> </td>
17659 </tr>
17660 <tr>
17661 <td class="parameter_name"><p>crl_size</p></td>
17662 <td class="parameter_description"><p>The length of the CRL list</p></td>
17663 <td class="parameter_annotations"> </td>
17664 </tr>
17665 <tr>
17666 <td class="parameter_name"><p>flags</p></td>
17667 <td class="parameter_description"><p>flags from <a class="link" href="gnutls-x509.html#gnutls-trust-list-flags-t" title="enum gnutls_trust_list_flags_t"><code class="literal">gnutls_trust_list_flags_t</code></a></p></td>
17668 <td class="parameter_annotations"> </td>
17669 </tr>
17670 <tr>
17671 <td class="parameter_name"><p>verification_flags</p></td>
17672 <td class="parameter_description"><p>gnutls_certificate_verify_flags if flags specifies GNUTLS_TL_VERIFY_CRL</p></td>
17673 <td class="parameter_annotations"> </td>
17674 </tr>
17675 </tbody>
17676 </table></div>
17677 </div>
17678 <div class="refsect3">
17679 <a name="gnutls-x509-trust-list-add-crls.returns"></a><h4>Returns</h4>
17680 <p> The number of added elements is returned; that includes
17681 duplicate entries.</p>
17682 </div>
17683 <p class="since">Since: 3.0</p>
17684 </div>
17685 <hr>
17686 <div class="refsect2">
17687 <a name="gnutls-x509-trust-list-iter-get-ca"></a><h3>gnutls_x509_trust_list_iter_get_ca ()</h3>
17688 <pre class="programlisting"><span class="returnvalue">int</span>
17689 gnutls_x509_trust_list_iter_get_ca (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
17690 <em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-iter-t" title="gnutls_x509_trust_list_iter_t"><span class="type">gnutls_x509_trust_list_iter_t</span></a> *iter</code></em>,
17691 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *crt</code></em>);</pre>
17692 <p>This function obtains a certificate in the trust list and advances the
17693 iterator to the next certificate. The certificate returned in <em class="parameter"><code>crt</code></em>
17694 must be
17695 deallocated with <a class="link" href="gnutls-x509.html#gnutls-x509-crt-deinit" title="gnutls_x509_crt_deinit ()"><code class="function">gnutls_x509_crt_deinit()</code></a>.</p>
17696 <p>When past the last element is accessed <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>
17697 is returned and the iterator is reset.</p>
17698 <p>The iterator is deinitialized and reset to <code class="literal">NULL</code> automatically by this
17699 function after iterating through all elements until
17700 <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> is returned. If the iteration is
17701 aborted early, it must be manually deinitialized using
17702 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-iter-deinit" title="gnutls_x509_trust_list_iter_deinit ()"><code class="function">gnutls_x509_trust_list_iter_deinit()</code></a>.</p>
17703 <div class="refsect3">
17704 <a name="gnutls-x509-trust-list-iter-get-ca.parameters"></a><h4>Parameters</h4>
17705 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17706 <colgroup>
17707 <col width="150px" class="parameters_name">
17708 <col class="parameters_description">
17709 <col width="200px" class="parameters_annotations">
17710 </colgroup>
17711 <tbody>
17712 <tr>
17713 <td class="parameter_name"><p>list</p></td>
17714 <td class="parameter_description"><p>The list</p></td>
17715 <td class="parameter_annotations"> </td>
17716 </tr>
17717 <tr>
17718 <td class="parameter_name"><p>iter</p></td>
17719 <td class="parameter_description"><p>A pointer to an iterator (initially the iterator should be <code class="literal">NULL</code>)</p></td>
17720 <td class="parameter_annotations"> </td>
17721 </tr>
17722 <tr>
17723 <td class="parameter_name"><p>crt</p></td>
17724 <td class="parameter_description"><p>where the certificate will be copied</p></td>
17725 <td class="parameter_annotations"> </td>
17726 </tr>
17727 </tbody>
17728 </table></div>
17729 </div>
17730 <div class="refsect3">
17731 <a name="gnutls-x509-trust-list-iter-get-ca.returns"></a><h4>Returns</h4>
17732 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
17733 negative error value.</p>
17734 </div>
17735 <p class="since">Since: 3.4.0</p>
17736 </div>
17737 <hr>
17738 <div class="refsect2">
17739 <a name="gnutls-x509-trust-list-iter-deinit"></a><h3>gnutls_x509_trust_list_iter_deinit ()</h3>
17740 <pre class="programlisting"><span class="returnvalue">void</span>
17741 gnutls_x509_trust_list_iter_deinit (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-iter-t" title="gnutls_x509_trust_list_iter_t"><span class="type">gnutls_x509_trust_list_iter_t</span></a> iter</code></em>);</pre>
17742 <p>This function will deinitialize an iterator structure.</p>
17743 <div class="refsect3">
17744 <a name="gnutls-x509-trust-list-iter-deinit.parameters"></a><h4>Parameters</h4>
17745 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17746 <colgroup>
17747 <col width="150px" class="parameters_name">
17748 <col class="parameters_description">
17749 <col width="200px" class="parameters_annotations">
17750 </colgroup>
17751 <tbody><tr>
17752 <td class="parameter_name"><p>iter</p></td>
17753 <td class="parameter_description"><p>The iterator structure to be deinitialized</p></td>
17754 <td class="parameter_annotations"> </td>
17755 </tr></tbody>
17756 </table></div>
17757 </div>
17758 <p class="since">Since: 3.4.0</p>
17759 </div>
17760 <hr>
17761 <div class="refsect2">
17762 <a name="gnutls-session-set-verify-output-function"></a><h3>gnutls_session_set_verify_output_function ()</h3>
17763 <pre class="programlisting"><span class="returnvalue">void</span>
17764 gnutls_session_set_verify_output_function
17765 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>,
17766 <em class="parameter"><code><span class="type">gnutls_verify_output_function</span> *func</code></em>);</pre>
17767 <p>This function sets a callback to be called when the peer's certificate
17768 chain has to be verified and full path to the trusted root has to be
17769 printed.</p>
17770 <p>The callback's function prototype is defined in `x509.h':
17771 int (*callback)(
17772 gnutls_x509_crt_t cert,
17773 gnutls_x509_crt_t issuer,
17774 gnutls_x509_crl_t crl,
17775 unsigned int verification_output);</p>
17776 <p>If the callback function is provided then gnutls will call it, in the
17777 certificate verification procedure.
17778 To verify the certificate chain and print its path uptp the trusted root,
17779 functions such as <a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers" title="gnutls_certificate_verify_peers ()"><code class="function">gnutls_certificate_verify_peers()</code></a>,
17780 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-verify-crt" title="gnutls_x509_trust_list_verify_crt ()"><code class="function">gnutls_x509_trust_list_verify_crt()</code></a>, and <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-verify-crt2" title="gnutls_x509_trust_list_verify_crt2 ()"><code class="function">gnutls_x509_trust_list_verify_crt2()</code></a>
17781 can be used. The callback is set in <code class="function">_gnutls_verify_crt_status()</code> and
17782 <code class="function">_gnutls_pkcs11_verify_crt_status()</code>.</p>
17783 <div class="refsect3">
17784 <a name="gnutls-session-set-verify-output-function.parameters"></a><h4>Parameters</h4>
17785 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17786 <colgroup>
17787 <col width="150px" class="parameters_name">
17788 <col class="parameters_description">
17789 <col width="200px" class="parameters_annotations">
17790 </colgroup>
17791 <tbody>
17792 <tr>
17793 <td class="parameter_name"><p>session</p></td>
17794 <td class="parameter_description"><p>is a <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> type.</p></td>
17795 <td class="parameter_annotations"> </td>
17796 </tr>
17797 <tr>
17798 <td class="parameter_name"><p>func</p></td>
17799 <td class="parameter_description"><p>is the callback function</p></td>
17800 <td class="parameter_annotations"> </td>
17801 </tr>
17802 </tbody>
17803 </table></div>
17804 </div>
17805 <p class="since">Since: 3.7.0</p>
17806 </div>
17807 <hr>
17808 <div class="refsect2">
17809 <a name="gnutls-x509-trust-list-verify-named-crt"></a><h3>gnutls_x509_trust_list_verify_named_crt ()</h3>
17810 <pre class="programlisting"><span class="returnvalue">int</span>
17811 gnutls_x509_trust_list_verify_named_crt
17812 (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
17813 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>,
17814 <em class="parameter"><code>const <span class="type">void</span> *name</code></em>,
17815 <em class="parameter"><code><span class="type">size_t</span> name_size</code></em>,
17816 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
17817 <em class="parameter"><code>unsigned <span class="type">int</span> *verify</code></em>,
17818 <em class="parameter"><code><span class="type">gnutls_verify_output_function</span> func</code></em>);</pre>
17819 <p>This function will try to find a certificate that is associated with the provided
17820 name --see <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-add-named-crt" title="gnutls_x509_trust_list_add_named_crt ()"><code class="function">gnutls_x509_trust_list_add_named_crt()</code></a>. If a match is found the
17821 certificate is considered valid. In addition to that this function will also
17822 check CRLs. The <em class="parameter"><code>voutput</code></em>
17823 parameter will hold an OR'ed sequence of
17824 <a class="link" href="gnutls-gnutls.html#gnutls-certificate-status-t" title="enum gnutls_certificate_status_t"><code class="literal">gnutls_certificate_status_t</code></a> flags.</p>
17825 <p>Additionally a certificate verification profile can be specified
17826 from the ones in <a class="link" href="gnutls-x509.html#gnutls-certificate-verification-profiles-t" title="enum gnutls_certificate_verification_profiles_t"><code class="literal">gnutls_certificate_verification_profiles_t</code></a> by
17827 ORing the result of <a class="link" href="gnutls-x509.html#GNUTLS-PROFILE-TO-VFLAGS:CAPS" title="GNUTLS_PROFILE_TO_VFLAGS()"><code class="function">GNUTLS_PROFILE_TO_VFLAGS()</code></a> to the verification
17828 flags.</p>
17829 <div class="refsect3">
17830 <a name="gnutls-x509-trust-list-verify-named-crt.parameters"></a><h4>Parameters</h4>
17831 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17832 <colgroup>
17833 <col width="150px" class="parameters_name">
17834 <col class="parameters_description">
17835 <col width="200px" class="parameters_annotations">
17836 </colgroup>
17837 <tbody>
17838 <tr>
17839 <td class="parameter_name"><p>list</p></td>
17840 <td class="parameter_description"><p>The list</p></td>
17841 <td class="parameter_annotations"> </td>
17842 </tr>
17843 <tr>
17844 <td class="parameter_name"><p>cert</p></td>
17845 <td class="parameter_description"><p>is the certificate to be verified</p></td>
17846 <td class="parameter_annotations"> </td>
17847 </tr>
17848 <tr>
17849 <td class="parameter_name"><p>name</p></td>
17850 <td class="parameter_description"><p>is the certificate's name</p></td>
17851 <td class="parameter_annotations"> </td>
17852 </tr>
17853 <tr>
17854 <td class="parameter_name"><p>name_size</p></td>
17855 <td class="parameter_description"><p>is the certificate's name size</p></td>
17856 <td class="parameter_annotations"> </td>
17857 </tr>
17858 <tr>
17859 <td class="parameter_name"><p>flags</p></td>
17860 <td class="parameter_description"><p>Flags that may be used to change the verification algorithm. Use OR of the gnutls_certificate_verify_flags enumerations.</p></td>
17861 <td class="parameter_annotations"> </td>
17862 </tr>
17863 <tr>
17864 <td class="parameter_name"><p>voutput</p></td>
17865 <td class="parameter_description"><p>will hold the certificate verification output.</p></td>
17866 <td class="parameter_annotations"> </td>
17867 </tr>
17868 <tr>
17869 <td class="parameter_name"><p>func</p></td>
17870 <td class="parameter_description"><p>If non-null will be called on each chain element verification with the output.</p></td>
17871 <td class="parameter_annotations"> </td>
17872 </tr>
17873 </tbody>
17874 </table></div>
17875 </div>
17876 <div class="refsect3">
17877 <a name="gnutls-x509-trust-list-verify-named-crt.returns"></a><h4>Returns</h4>
17878 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
17879 negative error value.</p>
17880 </div>
17881 <p class="since">Since: 3.0.0</p>
17882 </div>
17883 <hr>
17884 <div class="refsect2">
17885 <a name="gnutls-x509-trust-list-verify-crt2"></a><h3>gnutls_x509_trust_list_verify_crt2 ()</h3>
17886 <pre class="programlisting"><span class="returnvalue">int</span>
17887 gnutls_x509_trust_list_verify_crt2 (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
17888 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *cert_list</code></em>,
17889 <em class="parameter"><code>unsigned <span class="type">int</span> cert_list_size</code></em>,
17890 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-typed-vdata-st" title="gnutls_typed_vdata_st"><span class="type">gnutls_typed_vdata_st</span></a> *data</code></em>,
17891 <em class="parameter"><code>unsigned <span class="type">int</span> elements</code></em>,
17892 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
17893 <em class="parameter"><code>unsigned <span class="type">int</span> *voutput</code></em>,
17894 <em class="parameter"><code><span class="type">gnutls_verify_output_function</span> func</code></em>);</pre>
17895 <p>This function will attempt to verify the given certificate chain and return
17896 its status. The <em class="parameter"><code>voutput</code></em>
17897 parameter will hold an OR'ed sequence of
17898 <a class="link" href="gnutls-gnutls.html#gnutls-certificate-status-t" title="enum gnutls_certificate_status_t"><code class="literal">gnutls_certificate_status_t</code></a> flags.</p>
17899 <p>When a certificate chain of <em class="parameter"><code>cert_list_size</code></em>
17900 with more than one certificates is
17901 provided, the verification status will apply to the first certificate in the chain
17902 that failed verification. The verification process starts from the end of the chain
17903 (from CA to end certificate). The first certificate in the chain must be the end-certificate
17904 while the rest of the members may be sorted or not.</p>
17905 <p>Additionally a certificate verification profile can be specified
17906 from the ones in <a class="link" href="gnutls-x509.html#gnutls-certificate-verification-profiles-t" title="enum gnutls_certificate_verification_profiles_t"><code class="literal">gnutls_certificate_verification_profiles_t</code></a> by
17907 ORing the result of <a class="link" href="gnutls-x509.html#GNUTLS-PROFILE-TO-VFLAGS:CAPS" title="GNUTLS_PROFILE_TO_VFLAGS()"><code class="function">GNUTLS_PROFILE_TO_VFLAGS()</code></a> to the verification
17908 flags.</p>
17909 <p>Additional verification parameters are possible via the <em class="parameter"><code>data</code></em>
17910 types; the
17911 acceptable types are <a class="link" href="gnutls-gnutls.html#GNUTLS-DT-DNS-HOSTNAME:CAPS"><code class="literal">GNUTLS_DT_DNS_HOSTNAME</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-DT-IP-ADDRESS:CAPS"><code class="literal">GNUTLS_DT_IP_ADDRESS</code></a> and <a class="link" href="gnutls-gnutls.html#GNUTLS-DT-KEY-PURPOSE-OID:CAPS"><code class="literal">GNUTLS_DT_KEY_PURPOSE_OID</code></a>.
17912 The former accepts as data a null-terminated hostname, and the latter a null-terminated
17913 object identifier (e.g., <a class="link" href="gnutls-x509.html#GNUTLS-KP-TLS-WWW-SERVER:CAPS" title="GNUTLS_KP_TLS_WWW_SERVER"><code class="literal">GNUTLS_KP_TLS_WWW_SERVER</code></a>).
17914 If a DNS hostname is provided then this function will compare
17915 the hostname in the end certificate against the given. If names do not match the
17916 <a class="link" href="gnutls-gnutls.html#GNUTLS-CERT-UNEXPECTED-OWNER:CAPS"><code class="literal">GNUTLS_CERT_UNEXPECTED_OWNER</code></a> status flag will be set. In addition it
17917 will consider certificates provided with <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-add-named-crt" title="gnutls_x509_trust_list_add_named_crt ()"><code class="function">gnutls_x509_trust_list_add_named_crt()</code></a>.</p>
17918 <p>If a key purpose OID is provided and the end-certificate contains the extended key
17919 usage PKIX extension, it will be required to match the provided OID
17920 or be marked for any purpose, otherwise verification will fail with
17921 <a class="link" href="gnutls-gnutls.html#GNUTLS-CERT-PURPOSE-MISMATCH:CAPS"><code class="literal">GNUTLS_CERT_PURPOSE_MISMATCH</code></a> status.</p>
17922 <div class="refsect3">
17923 <a name="gnutls-x509-trust-list-verify-crt2.parameters"></a><h4>Parameters</h4>
17924 <div class="informaltable"><table class="informaltable" width="100%" border="0">
17925 <colgroup>
17926 <col width="150px" class="parameters_name">
17927 <col class="parameters_description">
17928 <col width="200px" class="parameters_annotations">
17929 </colgroup>
17930 <tbody>
17931 <tr>
17932 <td class="parameter_name"><p>list</p></td>
17933 <td class="parameter_description"><p>The list</p></td>
17934 <td class="parameter_annotations"> </td>
17935 </tr>
17936 <tr>
17937 <td class="parameter_name"><p>cert_list</p></td>
17938 <td class="parameter_description"><p>is the certificate list to be verified</p></td>
17939 <td class="parameter_annotations"> </td>
17940 </tr>
17941 <tr>
17942 <td class="parameter_name"><p>cert_list_size</p></td>
17943 <td class="parameter_description"><p>is the certificate list size</p></td>
17944 <td class="parameter_annotations"> </td>
17945 </tr>
17946 <tr>
17947 <td class="parameter_name"><p>data</p></td>
17948 <td class="parameter_description"><p>an array of typed data</p></td>
17949 <td class="parameter_annotations"> </td>
17950 </tr>
17951 <tr>
17952 <td class="parameter_name"><p>elements</p></td>
17953 <td class="parameter_description"><p>the number of data elements</p></td>
17954 <td class="parameter_annotations"> </td>
17955 </tr>
17956 <tr>
17957 <td class="parameter_name"><p>flags</p></td>
17958 <td class="parameter_description"><p>Flags that may be used to change the verification algorithm. Use OR of the gnutls_certificate_verify_flags enumerations.</p></td>
17959 <td class="parameter_annotations"> </td>
17960 </tr>
17961 <tr>
17962 <td class="parameter_name"><p>voutput</p></td>
17963 <td class="parameter_description"><p>will hold the certificate verification output.</p></td>
17964 <td class="parameter_annotations"> </td>
17965 </tr>
17966 <tr>
17967 <td class="parameter_name"><p>func</p></td>
17968 <td class="parameter_description"><p>If non-null will be called on each chain element verification with the output.</p></td>
17969 <td class="parameter_annotations"> </td>
17970 </tr>
17971 </tbody>
17972 </table></div>
17973 </div>
17974 <div class="refsect3">
17975 <a name="gnutls-x509-trust-list-verify-crt2.returns"></a><h4>Returns</h4>
17976 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
17977 negative error value. Note that verification failure will not result to an
17978 error code, only <em class="parameter"><code>voutput</code></em>
17979 will be updated.</p>
17980 </div>
17981 <p class="since">Since: 3.3.8</p>
17982 </div>
17983 <hr>
17984 <div class="refsect2">
17985 <a name="gnutls-x509-trust-list-verify-crt"></a><h3>gnutls_x509_trust_list_verify_crt ()</h3>
17986 <pre class="programlisting"><span class="returnvalue">int</span>
17987 gnutls_x509_trust_list_verify_crt (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
17988 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *cert_list</code></em>,
17989 <em class="parameter"><code>unsigned <span class="type">int</span> cert_list_size</code></em>,
17990 <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
17991 <em class="parameter"><code>unsigned <span class="type">int</span> *verify</code></em>,
17992 <em class="parameter"><code><span class="type">gnutls_verify_output_function</span> func</code></em>);</pre>
17993 <p>This function will try to verify the given certificate and return
17994 its status. The <em class="parameter"><code>voutput</code></em>
17995 parameter will hold an OR'ed sequence of
17996 <a class="link" href="gnutls-gnutls.html#gnutls-certificate-status-t" title="enum gnutls_certificate_status_t"><code class="literal">gnutls_certificate_status_t</code></a> flags.</p>
17997 <p>The details of the verification are the same as in <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-verify-crt2" title="gnutls_x509_trust_list_verify_crt2 ()"><code class="function">gnutls_x509_trust_list_verify_crt2()</code></a>.</p>
17998 <div class="refsect3">
17999 <a name="gnutls-x509-trust-list-verify-crt.parameters"></a><h4>Parameters</h4>
18000 <div class="informaltable"><table class="informaltable" width="100%" border="0">
18001 <colgroup>
18002 <col width="150px" class="parameters_name">
18003 <col class="parameters_description">
18004 <col width="200px" class="parameters_annotations">
18005 </colgroup>
18006 <tbody>
18007 <tr>
18008 <td class="parameter_name"><p>list</p></td>
18009 <td class="parameter_description"><p>The list</p></td>
18010 <td class="parameter_annotations"> </td>
18011 </tr>
18012 <tr>
18013 <td class="parameter_name"><p>cert_list</p></td>
18014 <td class="parameter_description"><p>is the certificate list to be verified</p></td>
18015 <td class="parameter_annotations"> </td>
18016 </tr>
18017 <tr>
18018 <td class="parameter_name"><p>cert_list_size</p></td>
18019 <td class="parameter_description"><p>is the certificate list size</p></td>
18020 <td class="parameter_annotations"> </td>
18021 </tr>
18022 <tr>
18023 <td class="parameter_name"><p>flags</p></td>
18024 <td class="parameter_description"><p>Flags that may be used to change the verification algorithm. Use OR of the gnutls_certificate_verify_flags enumerations.</p></td>
18025 <td class="parameter_annotations"> </td>
18026 </tr>
18027 <tr>
18028 <td class="parameter_name"><p>voutput</p></td>
18029 <td class="parameter_description"><p>will hold the certificate verification output.</p></td>
18030 <td class="parameter_annotations"> </td>
18031 </tr>
18032 <tr>
18033 <td class="parameter_name"><p>func</p></td>
18034 <td class="parameter_description"><p>If non-null will be called on each chain element verification with the output.</p></td>
18035 <td class="parameter_annotations"> </td>
18036 </tr>
18037 </tbody>
18038 </table></div>
18039 </div>
18040 <div class="refsect3">
18041 <a name="gnutls-x509-trust-list-verify-crt.returns"></a><h4>Returns</h4>
18042 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
18043 negative error value.</p>
18044 </div>
18045 <p class="since">Since: 3.0</p>
18046 </div>
18047 <hr>
18048 <div class="refsect2">
18049 <a name="gnutls-x509-trust-list-add-trust-mem"></a><h3>gnutls_x509_trust_list_add_trust_mem ()</h3>
18050 <pre class="programlisting"><span class="returnvalue">int</span>
18051 gnutls_x509_trust_list_add_trust_mem (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
18052 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *cas</code></em>,
18053 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *crls</code></em>,
18054 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> type</code></em>,
18055 <em class="parameter"><code>unsigned <span class="type">int</span> tl_flags</code></em>,
18056 <em class="parameter"><code>unsigned <span class="type">int</span> tl_vflags</code></em>);</pre>
18057 <p>This function will add the given certificate authorities
18058 to the trusted list. </p>
18059 <p>If this function is used <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-deinit" title="gnutls_x509_trust_list_deinit ()"><code class="function">gnutls_x509_trust_list_deinit()</code></a> must be called
18060 with parameter <em class="parameter"><code>all</code></em>
18061 being 1.</p>
18062 <div class="refsect3">
18063 <a name="gnutls-x509-trust-list-add-trust-mem.parameters"></a><h4>Parameters</h4>
18064 <div class="informaltable"><table class="informaltable" width="100%" border="0">
18065 <colgroup>
18066 <col width="150px" class="parameters_name">
18067 <col class="parameters_description">
18068 <col width="200px" class="parameters_annotations">
18069 </colgroup>
18070 <tbody>
18071 <tr>
18072 <td class="parameter_name"><p>list</p></td>
18073 <td class="parameter_description"><p>The list</p></td>
18074 <td class="parameter_annotations"> </td>
18075 </tr>
18076 <tr>
18077 <td class="parameter_name"><p>cas</p></td>
18078 <td class="parameter_description"><p>A buffer containing a list of CAs (optional)</p></td>
18079 <td class="parameter_annotations"> </td>
18080 </tr>
18081 <tr>
18082 <td class="parameter_name"><p>crls</p></td>
18083 <td class="parameter_description"><p>A buffer containing a list of CRLs (optional)</p></td>
18084 <td class="parameter_annotations"> </td>
18085 </tr>
18086 <tr>
18087 <td class="parameter_name"><p>type</p></td>
18088 <td class="parameter_description"><p>The format of the certificates</p></td>
18089 <td class="parameter_annotations"> </td>
18090 </tr>
18091 <tr>
18092 <td class="parameter_name"><p>tl_flags</p></td>
18093 <td class="parameter_description"><p>flags from <a class="link" href="gnutls-x509.html#gnutls-trust-list-flags-t" title="enum gnutls_trust_list_flags_t"><code class="literal">gnutls_trust_list_flags_t</code></a></p></td>
18094 <td class="parameter_annotations"> </td>
18095 </tr>
18096 <tr>
18097 <td class="parameter_name"><p>tl_vflags</p></td>
18098 <td class="parameter_description"><p>gnutls_certificate_verify_flags if flags specifies GNUTLS_TL_VERIFY_CRL</p></td>
18099 <td class="parameter_annotations"> </td>
18100 </tr>
18101 </tbody>
18102 </table></div>
18103 </div>
18104 <div class="refsect3">
18105 <a name="gnutls-x509-trust-list-add-trust-mem.returns"></a><h4>Returns</h4>
18106 <p> The number of added elements is returned.</p>
18107 </div>
18108 <p class="since">Since: 3.1</p>
18109 </div>
18110 <hr>
18111 <div class="refsect2">
18112 <a name="gnutls-x509-trust-list-add-trust-file"></a><h3>gnutls_x509_trust_list_add_trust_file ()</h3>
18113 <pre class="programlisting"><span class="returnvalue">int</span>
18114 gnutls_x509_trust_list_add_trust_file (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
18115 <em class="parameter"><code>const <span class="type">char</span> *ca_file</code></em>,
18116 <em class="parameter"><code>const <span class="type">char</span> *crl_file</code></em>,
18117 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> type</code></em>,
18118 <em class="parameter"><code>unsigned <span class="type">int</span> tl_flags</code></em>,
18119 <em class="parameter"><code>unsigned <span class="type">int</span> tl_vflags</code></em>);</pre>
18120 <p>This function will add the given certificate authorities
18121 to the trusted list. PKCS <span class="type">11</span> URLs are also accepted, instead
18122 of files, by this function. A PKCS <span class="type">11</span> URL implies a trust
18123 database (a specially marked module in p11-kit); the URL "pkcs11:"
18124 implies all trust databases in the system. Only a single URL specifying
18125 trust databases can be set; they cannot be stacked with multiple calls.</p>
18126 <div class="refsect3">
18127 <a name="gnutls-x509-trust-list-add-trust-file.parameters"></a><h4>Parameters</h4>
18128 <div class="informaltable"><table class="informaltable" width="100%" border="0">
18129 <colgroup>
18130 <col width="150px" class="parameters_name">
18131 <col class="parameters_description">
18132 <col width="200px" class="parameters_annotations">
18133 </colgroup>
18134 <tbody>
18135 <tr>
18136 <td class="parameter_name"><p>list</p></td>
18137 <td class="parameter_description"><p>The list</p></td>
18138 <td class="parameter_annotations"> </td>
18139 </tr>
18140 <tr>
18141 <td class="parameter_name"><p>ca_file</p></td>
18142 <td class="parameter_description"><p>A file containing a list of CAs (optional)</p></td>
18143 <td class="parameter_annotations"> </td>
18144 </tr>
18145 <tr>
18146 <td class="parameter_name"><p>crl_file</p></td>
18147 <td class="parameter_description"><p>A file containing a list of CRLs (optional)</p></td>
18148 <td class="parameter_annotations"> </td>
18149 </tr>
18150 <tr>
18151 <td class="parameter_name"><p>type</p></td>
18152 <td class="parameter_description"><p>The format of the certificates</p></td>
18153 <td class="parameter_annotations"> </td>
18154 </tr>
18155 <tr>
18156 <td class="parameter_name"><p>tl_flags</p></td>
18157 <td class="parameter_description"><p>flags from <a class="link" href="gnutls-x509.html#gnutls-trust-list-flags-t" title="enum gnutls_trust_list_flags_t"><code class="literal">gnutls_trust_list_flags_t</code></a></p></td>
18158 <td class="parameter_annotations"> </td>
18159 </tr>
18160 <tr>
18161 <td class="parameter_name"><p>tl_vflags</p></td>
18162 <td class="parameter_description"><p>gnutls_certificate_verify_flags if flags specifies GNUTLS_TL_VERIFY_CRL</p></td>
18163 <td class="parameter_annotations"> </td>
18164 </tr>
18165 </tbody>
18166 </table></div>
18167 </div>
18168 <div class="refsect3">
18169 <a name="gnutls-x509-trust-list-add-trust-file.returns"></a><h4>Returns</h4>
18170 <p> The number of added elements is returned.</p>
18171 </div>
18172 <p class="since">Since: 3.1</p>
18173 </div>
18174 <hr>
18175 <div class="refsect2">
18176 <a name="gnutls-x509-trust-list-add-trust-dir"></a><h3>gnutls_x509_trust_list_add_trust_dir ()</h3>
18177 <pre class="programlisting"><span class="returnvalue">int</span>
18178 gnutls_x509_trust_list_add_trust_dir (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
18179 <em class="parameter"><code>const <span class="type">char</span> *ca_dir</code></em>,
18180 <em class="parameter"><code>const <span class="type">char</span> *crl_dir</code></em>,
18181 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> type</code></em>,
18182 <em class="parameter"><code>unsigned <span class="type">int</span> tl_flags</code></em>,
18183 <em class="parameter"><code>unsigned <span class="type">int</span> tl_vflags</code></em>);</pre>
18184 <p>This function will add the given certificate authorities
18185 to the trusted list. Only directories are accepted by
18186 this function.</p>
18187 <div class="refsect3">
18188 <a name="gnutls-x509-trust-list-add-trust-dir.parameters"></a><h4>Parameters</h4>
18189 <div class="informaltable"><table class="informaltable" width="100%" border="0">
18190 <colgroup>
18191 <col width="150px" class="parameters_name">
18192 <col class="parameters_description">
18193 <col width="200px" class="parameters_annotations">
18194 </colgroup>
18195 <tbody>
18196 <tr>
18197 <td class="parameter_name"><p>list</p></td>
18198 <td class="parameter_description"><p>The list</p></td>
18199 <td class="parameter_annotations"> </td>
18200 </tr>
18201 <tr>
18202 <td class="parameter_name"><p>ca_dir</p></td>
18203 <td class="parameter_description"><p>A directory containing the CAs (optional)</p></td>
18204 <td class="parameter_annotations"> </td>
18205 </tr>
18206 <tr>
18207 <td class="parameter_name"><p>crl_dir</p></td>
18208 <td class="parameter_description"><p>A directory containing a list of CRLs (optional)</p></td>
18209 <td class="parameter_annotations"> </td>
18210 </tr>
18211 <tr>
18212 <td class="parameter_name"><p>type</p></td>
18213 <td class="parameter_description"><p>The format of the certificates</p></td>
18214 <td class="parameter_annotations"> </td>
18215 </tr>
18216 <tr>
18217 <td class="parameter_name"><p>tl_flags</p></td>
18218 <td class="parameter_description"><p>flags from <a class="link" href="gnutls-x509.html#gnutls-trust-list-flags-t" title="enum gnutls_trust_list_flags_t"><code class="literal">gnutls_trust_list_flags_t</code></a></p></td>
18219 <td class="parameter_annotations"> </td>
18220 </tr>
18221 <tr>
18222 <td class="parameter_name"><p>tl_vflags</p></td>
18223 <td class="parameter_description"><p>gnutls_certificate_verify_flags if flags specifies GNUTLS_TL_VERIFY_CRL</p></td>
18224 <td class="parameter_annotations"> </td>
18225 </tr>
18226 </tbody>
18227 </table></div>
18228 </div>
18229 <div class="refsect3">
18230 <a name="gnutls-x509-trust-list-add-trust-dir.returns"></a><h4>Returns</h4>
18231 <p> The number of added elements is returned.</p>
18232 </div>
18233 <p class="since">Since: 3.3.6</p>
18234 </div>
18235 <hr>
18236 <div class="refsect2">
18237 <a name="gnutls-x509-trust-list-remove-trust-file"></a><h3>gnutls_x509_trust_list_remove_trust_file ()</h3>
18238 <pre class="programlisting"><span class="returnvalue">int</span>
18239 gnutls_x509_trust_list_remove_trust_file
18240 (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
18241 <em class="parameter"><code>const <span class="type">char</span> *ca_file</code></em>,
18242 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> type</code></em>);</pre>
18243 <p>This function will remove the given certificate authorities
18244 from the trusted list, and add them into a block list when needed.
18245 PKCS 11 URLs are also accepted, instead
18246 of files, by this function.</p>
18247 <p>See also <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-remove-cas" title="gnutls_x509_trust_list_remove_cas ()"><code class="function">gnutls_x509_trust_list_remove_cas()</code></a>.</p>
18248 <div class="refsect3">
18249 <a name="gnutls-x509-trust-list-remove-trust-file.parameters"></a><h4>Parameters</h4>
18250 <div class="informaltable"><table class="informaltable" width="100%" border="0">
18251 <colgroup>
18252 <col width="150px" class="parameters_name">
18253 <col class="parameters_description">
18254 <col width="200px" class="parameters_annotations">
18255 </colgroup>
18256 <tbody>
18257 <tr>
18258 <td class="parameter_name"><p>list</p></td>
18259 <td class="parameter_description"><p>The list</p></td>
18260 <td class="parameter_annotations"> </td>
18261 </tr>
18262 <tr>
18263 <td class="parameter_name"><p>ca_file</p></td>
18264 <td class="parameter_description"><p>A file containing a list of CAs</p></td>
18265 <td class="parameter_annotations"> </td>
18266 </tr>
18267 <tr>
18268 <td class="parameter_name"><p>type</p></td>
18269 <td class="parameter_description"><p>The format of the certificates</p></td>
18270 <td class="parameter_annotations"> </td>
18271 </tr>
18272 </tbody>
18273 </table></div>
18274 </div>
18275 <div class="refsect3">
18276 <a name="gnutls-x509-trust-list-remove-trust-file.returns"></a><h4>Returns</h4>
18277 <p> The number of added elements is returned.</p>
18278 </div>
18279 <p class="since">Since: 3.1.10</p>
18280 </div>
18281 <hr>
18282 <div class="refsect2">
18283 <a name="gnutls-x509-trust-list-remove-trust-mem"></a><h3>gnutls_x509_trust_list_remove_trust_mem ()</h3>
18284 <pre class="programlisting"><span class="returnvalue">int</span>
18285 gnutls_x509_trust_list_remove_trust_mem
18286 (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
18287 <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *cas</code></em>,
18288 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> type</code></em>);</pre>
18289 <p>This function will remove the provided certificate authorities
18290 from the trusted list, and add them into a block list when needed. </p>
18291 <p>See also <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-remove-cas" title="gnutls_x509_trust_list_remove_cas ()"><code class="function">gnutls_x509_trust_list_remove_cas()</code></a>.</p>
18292 <div class="refsect3">
18293 <a name="gnutls-x509-trust-list-remove-trust-mem.parameters"></a><h4>Parameters</h4>
18294 <div class="informaltable"><table class="informaltable" width="100%" border="0">
18295 <colgroup>
18296 <col width="150px" class="parameters_name">
18297 <col class="parameters_description">
18298 <col width="200px" class="parameters_annotations">
18299 </colgroup>
18300 <tbody>
18301 <tr>
18302 <td class="parameter_name"><p>list</p></td>
18303 <td class="parameter_description"><p>The list</p></td>
18304 <td class="parameter_annotations"> </td>
18305 </tr>
18306 <tr>
18307 <td class="parameter_name"><p>cas</p></td>
18308 <td class="parameter_description"><p>A buffer containing a list of CAs (optional)</p></td>
18309 <td class="parameter_annotations"> </td>
18310 </tr>
18311 <tr>
18312 <td class="parameter_name"><p>type</p></td>
18313 <td class="parameter_description"><p>The format of the certificates</p></td>
18314 <td class="parameter_annotations"> </td>
18315 </tr>
18316 </tbody>
18317 </table></div>
18318 </div>
18319 <div class="refsect3">
18320 <a name="gnutls-x509-trust-list-remove-trust-mem.returns"></a><h4>Returns</h4>
18321 <p> The number of removed elements is returned.</p>
18322 </div>
18323 <p class="since">Since: 3.1.10</p>
18324 </div>
18325 <hr>
18326 <div class="refsect2">
18327 <a name="gnutls-x509-trust-list-add-system-trust"></a><h3>gnutls_x509_trust_list_add_system_trust ()</h3>
18328 <pre class="programlisting"><span class="returnvalue">int</span>
18329 gnutls_x509_trust_list_add_system_trust
18330 (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> list</code></em>,
18331 <em class="parameter"><code>unsigned <span class="type">int</span> tl_flags</code></em>,
18332 <em class="parameter"><code>unsigned <span class="type">int</span> tl_vflags</code></em>);</pre>
18333 <p>This function adds the system's default trusted certificate
18334 authorities to the trusted list. Note that on unsupported systems
18335 this function returns <a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNIMPLEMENTED-FEATURE:CAPS" title="GNUTLS_E_UNIMPLEMENTED_FEATURE"><code class="literal">GNUTLS_E_UNIMPLEMENTED_FEATURE</code></a>.</p>
18336 <p>This function implies the flag <a class="link" href="gnutls-x509.html#GNUTLS-TL-NO-DUPLICATES:CAPS"><code class="literal">GNUTLS_TL_NO_DUPLICATES</code></a>.</p>
18337 <div class="refsect3">
18338 <a name="gnutls-x509-trust-list-add-system-trust.parameters"></a><h4>Parameters</h4>
18339 <div class="informaltable"><table class="informaltable" width="100%" border="0">
18340 <colgroup>
18341 <col width="150px" class="parameters_name">
18342 <col class="parameters_description">
18343 <col width="200px" class="parameters_annotations">
18344 </colgroup>
18345 <tbody>
18346 <tr>
18347 <td class="parameter_name"><p>list</p></td>
18348 <td class="parameter_description"><p>The structure of the list</p></td>
18349 <td class="parameter_annotations"> </td>
18350 </tr>
18351 <tr>
18352 <td class="parameter_name"><p>tl_flags</p></td>
18353 <td class="parameter_description"><p>GNUTLS_TL_*</p></td>
18354 <td class="parameter_annotations"> </td>
18355 </tr>
18356 <tr>
18357 <td class="parameter_name"><p>tl_vflags</p></td>
18358 <td class="parameter_description"><p>gnutls_certificate_verify_flags if flags specifies GNUTLS_TL_VERIFY_CRL</p></td>
18359 <td class="parameter_annotations"> </td>
18360 </tr>
18361 </tbody>
18362 </table></div>
18363 </div>
18364 <div class="refsect3">
18365 <a name="gnutls-x509-trust-list-add-system-trust.returns"></a><h4>Returns</h4>
18366 <p> The number of added elements or a negative error code on error.</p>
18367 </div>
18368 <p class="since">Since: 3.1</p>
18369 </div>
18370 <hr>
18371 <div class="refsect2">
18372 <a name="gnutls-x509-trust-list-set-getissuer-function"></a><h3>gnutls_x509_trust_list_set_getissuer_function ()</h3>
18373 <pre class="programlisting"><span class="returnvalue">void</span>
18374 gnutls_x509_trust_list_set_getissuer_function
18375 (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> tlist</code></em>,
18376 <em class="parameter"><code><span class="type">gnutls_x509_trust_list_getissuer_function</span> *func</code></em>);</pre>
18377 <p>This function sets a callback to be called when the peer's certificate
18378 chain is incomplete due a missing intermediate certificate. The callback
18379 may provide the missing certificate for use during verification.</p>
18380 <p>The callback's function prototype is defined in gnutls/x509.h as:</p>
18381 <p> int (*callback)(gnutls_x509_trust_list_t list,
18382 const gnutls_x509_crt_t cert,
18383 gnutls_x509_crt_t **issuers,
18384 unsigned int *issuers_size);</p>
18385 <p>If the callback function is provided then gnutls will call it during the
18386 certificate verification procedure. The callback may wish to use
18387 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-authority-info-access" title="gnutls_x509_crt_get_authority_info_access ()"><code class="function">gnutls_x509_crt_get_authority_info_access()</code></a> to get a URI from which
18388 to attempt to download the missing issuer certificate, if available.</p>
18389 <p>On a successful call, the callback shall set '*issuers' and '*issuers_size'
18390 even if the result is empty; in that case '*issuers' will point to <code class="literal">NULL</code> and
18391 '*issuers_size' will be 0. Otherwise, the '*issuers' array shall be
18392 allocated using <a class="link" href="gnutls-x509.html#gnutls-x509-crt-list-import2" title="gnutls_x509_crt_list_import2 ()"><code class="function">gnutls_x509_crt_list_import2()</code></a>. The ownership of both the
18393 array and the elements is transferred to the caller and thus the application
18394 does not need to maintain the memory after the call.</p>
18395 <p>The callback function should return 0 if the attempt to retrieve the issuer
18396 certificates for 'crt' succeeded, or non-zero to indicate any error occurred
18397 during the attempt. In the latter case, '*issuers' and '*issuers_size' are
18398 not set.</p>
18399 <div class="refsect3">
18400 <a name="gnutls-x509-trust-list-set-getissuer-function.parameters"></a><h4>Parameters</h4>
18401 <div class="informaltable"><table class="informaltable" width="100%" border="0">
18402 <colgroup>
18403 <col width="150px" class="parameters_name">
18404 <col class="parameters_description">
18405 <col width="200px" class="parameters_annotations">
18406 </colgroup>
18407 <tbody>
18408 <tr>
18409 <td class="parameter_name"><p>tlist</p></td>
18410 <td class="parameter_description"><p>is a <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> type.</p></td>
18411 <td class="parameter_annotations"> </td>
18412 </tr>
18413 <tr>
18414 <td class="parameter_name"><p>func</p></td>
18415 <td class="parameter_description"><p>is the callback function</p></td>
18416 <td class="parameter_annotations"> </td>
18417 </tr>
18418 </tbody>
18419 </table></div>
18420 </div>
18421 <p class="since">Since: 3.7.0</p>
18422 </div>
18423 <hr>
18424 <div class="refsect2">
18425 <a name="gnutls-x509-trust-list-set-ptr"></a><h3>gnutls_x509_trust_list_set_ptr ()</h3>
18426 <pre class="programlisting"><span class="returnvalue">void</span>
18427 gnutls_x509_trust_list_set_ptr (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> tlist</code></em>,
18428 <em class="parameter"><code><span class="type">void</span> *ptr</code></em>);</pre>
18429 <p>This function will set (associate) the user given pointer <em class="parameter"><code>ptr</code></em>
18430 to
18431 the tlist structure. This pointer can be accessed with
18432 <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-get-ptr" title="gnutls_x509_trust_list_get_ptr ()"><code class="function">gnutls_x509_trust_list_get_ptr()</code></a>. Useful in the callback function
18433 gnutls_x509_trust_list_set_getissuer_function.</p>
18434 <div class="refsect3">
18435 <a name="gnutls-x509-trust-list-set-ptr.parameters"></a><h4>Parameters</h4>
18436 <div class="informaltable"><table class="informaltable" width="100%" border="0">
18437 <colgroup>
18438 <col width="150px" class="parameters_name">
18439 <col class="parameters_description">
18440 <col width="200px" class="parameters_annotations">
18441 </colgroup>
18442 <tbody>
18443 <tr>
18444 <td class="parameter_name"><p>tlist</p></td>
18445 <td class="parameter_description"><p>is a <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> type.</p></td>
18446 <td class="parameter_annotations"> </td>
18447 </tr>
18448 <tr>
18449 <td class="parameter_name"><p>ptr</p></td>
18450 <td class="parameter_description"><p>is the user pointer</p></td>
18451 <td class="parameter_annotations"> </td>
18452 </tr>
18453 </tbody>
18454 </table></div>
18455 </div>
18456 <p class="since">Since: 3.7.0</p>
18457 </div>
18458 <hr>
18459 <div class="refsect2">
18460 <a name="gnutls-x509-trust-list-get-ptr"></a><h3>gnutls_x509_trust_list_get_ptr ()</h3>
18461 <pre class="programlisting"><span class="returnvalue">void</span> *
18462 gnutls_x509_trust_list_get_ptr (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> tlist</code></em>);</pre>
18463 <p>Get user pointer for tlist. Useful in callback function
18464 gnutls_x509_trust_list_set_getissuer_function.
18465 This is the pointer set with <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-set-ptr" title="gnutls_x509_trust_list_set_ptr ()"><code class="function">gnutls_x509_trust_list_set_ptr()</code></a>.</p>
18466 <div class="refsect3">
18467 <a name="gnutls-x509-trust-list-get-ptr.parameters"></a><h4>Parameters</h4>
18468 <div class="informaltable"><table class="informaltable" width="100%" border="0">
18469 <colgroup>
18470 <col width="150px" class="parameters_name">
18471 <col class="parameters_description">
18472 <col width="200px" class="parameters_annotations">
18473 </colgroup>
18474 <tbody><tr>
18475 <td class="parameter_name"><p>tlist</p></td>
18476 <td class="parameter_description"><p>is a <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> type.</p></td>
18477 <td class="parameter_annotations"> </td>
18478 </tr></tbody>
18479 </table></div>
18480 </div>
18481 <div class="refsect3">
18482 <a name="gnutls-x509-trust-list-get-ptr.returns"></a><h4>Returns</h4>
18483 <p> the user given pointer from the tlist structure, or
18484 <code class="literal">NULL</code> if it was never set.</p>
18485 </div>
18486 <p class="since">Since: 3.7.0</p>
18487 </div>
18488 <hr>
18489 <div class="refsect2">
18490 <a name="gnutls-certificate-set-trust-list"></a><h3>gnutls_certificate_set_trust_list ()</h3>
18491 <pre class="programlisting"><span class="returnvalue">void</span>
18492 gnutls_certificate_set_trust_list (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>,
18493 <em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> tlist</code></em>,
18494 <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre>
18495 <p>This function sets a trust list in the gnutls_certificate_credentials_t type.</p>
18496 <p>Note that the <em class="parameter"><code>tlist</code></em>
18497 will become part of the credentials
18498 structure and must not be deallocated. It will be automatically deallocated
18499 when the <em class="parameter"><code>res</code></em>
18500 structure is deinitialized.</p>
18501 <div class="refsect3">
18502 <a name="gnutls-certificate-set-trust-list.parameters"></a><h4>Parameters</h4>
18503 <div class="informaltable"><table class="informaltable" width="100%" border="0">
18504 <colgroup>
18505 <col width="150px" class="parameters_name">
18506 <col class="parameters_description">
18507 <col width="200px" class="parameters_annotations">
18508 </colgroup>
18509 <tbody>
18510 <tr>
18511 <td class="parameter_name"><p>res</p></td>
18512 <td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td>
18513 <td class="parameter_annotations"> </td>
18514 </tr>
18515 <tr>
18516 <td class="parameter_name"><p>tlist</p></td>
18517 <td class="parameter_description"><p>is a <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> type</p></td>
18518 <td class="parameter_annotations"> </td>
18519 </tr>
18520 <tr>
18521 <td class="parameter_name"><p>flags</p></td>
18522 <td class="parameter_description"><p>must be zero</p></td>
18523 <td class="parameter_annotations"> </td>
18524 </tr>
18525 </tbody>
18526 </table></div>
18527 </div>
18528 <p class="since">Since: 3.2.2</p>
18529 </div>
18530 <hr>
18531 <div class="refsect2">
18532 <a name="gnutls-certificate-get-trust-list"></a><h3>gnutls_certificate_get_trust_list ()</h3>
18533 <pre class="programlisting"><span class="returnvalue">void</span>
18534 gnutls_certificate_get_trust_list (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>,
18535 <em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-t" title="gnutls_x509_trust_list_t"><span class="type">gnutls_x509_trust_list_t</span></a> *tlist</code></em>);</pre>
18536 <p>Obtains the list of trusted certificates stored in <em class="parameter"><code>res</code></em>
18537 and writes a
18538 pointer to it to the location <em class="parameter"><code>tlist</code></em>
18539 . The pointer will point to memory
18540 internal to <em class="parameter"><code>res</code></em>
18541 , and must not be deinitialized. It will be automatically
18542 deallocated when the <em class="parameter"><code>res</code></em>
18543 structure is deinitialized.</p>
18544 <div class="refsect3">
18545 <a name="gnutls-certificate-get-trust-list.parameters"></a><h4>Parameters</h4>
18546 <div class="informaltable"><table class="informaltable" width="100%" border="0">
18547 <colgroup>
18548 <col width="150px" class="parameters_name">
18549 <col class="parameters_description">
18550 <col width="200px" class="parameters_annotations">
18551 </colgroup>
18552 <tbody>
18553 <tr>
18554 <td class="parameter_name"><p>res</p></td>
18555 <td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td>
18556 <td class="parameter_annotations"> </td>
18557 </tr>
18558 <tr>
18559 <td class="parameter_name"><p>tlist</p></td>
18560 <td class="parameter_description"><p>Location where to store the trust list.</p></td>
18561 <td class="parameter_annotations"> </td>
18562 </tr>
18563 </tbody>
18564 </table></div>
18565 </div>
18566 <p class="since">Since: 3.4.0</p>
18567 </div>
18568 <hr>
18569 <div class="refsect2">
18570 <a name="gnutls-x509-ext-deinit"></a><h3>gnutls_x509_ext_deinit ()</h3>
18571 <pre class="programlisting"><span class="returnvalue">void</span>
18572 gnutls_x509_ext_deinit (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-ext-st" title="gnutls_x509_ext_st"><span class="type">gnutls_x509_ext_st</span></a> *ext</code></em>);</pre>
18573 </div>
18574 <hr>
18575 <div class="refsect2">
18576 <a name="gnutls-x509-ext-print"></a><h3>gnutls_x509_ext_print ()</h3>
18577 <pre class="programlisting"><span class="returnvalue">int</span>
18578 gnutls_x509_ext_print (<em class="parameter"><code><a class="link" href="gnutls-x509.html#gnutls-x509-ext-st" title="gnutls_x509_ext_st"><span class="type">gnutls_x509_ext_st</span></a> *exts</code></em>,
18579 <em class="parameter"><code>unsigned <span class="type">int</span> exts_size</code></em>,
18580 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-certificate-print-formats-t" title="enum gnutls_certificate_print_formats_t"><span class="type">gnutls_certificate_print_formats_t</span></a> format</code></em>,
18581 <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>);</pre>
18582 <p>This function will pretty print X.509 certificate extensions,
18583 suitable for display to a human.</p>
18584 <p>The output <em class="parameter"><code>out</code></em>
18585 needs to be deallocated using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p>
18586 <div class="refsect3">
18587 <a name="gnutls-x509-ext-print.parameters"></a><h4>Parameters</h4>
18588 <div class="informaltable"><table class="informaltable" width="100%" border="0">
18589 <colgroup>
18590 <col width="150px" class="parameters_name">
18591 <col class="parameters_description">
18592 <col width="200px" class="parameters_annotations">
18593 </colgroup>
18594 <tbody>
18595 <tr>
18596 <td class="parameter_name"><p>exts</p></td>
18597 <td class="parameter_description"><p>The data to be printed</p></td>
18598 <td class="parameter_annotations"> </td>
18599 </tr>
18600 <tr>
18601 <td class="parameter_name"><p>exts_size</p></td>
18602 <td class="parameter_description"><p>the number of available structures</p></td>
18603 <td class="parameter_annotations"> </td>
18604 </tr>
18605 <tr>
18606 <td class="parameter_name"><p>format</p></td>
18607 <td class="parameter_description"><p>Indicate the format to use</p></td>
18608 <td class="parameter_annotations"> </td>
18609 </tr>
18610 <tr>
18611 <td class="parameter_name"><p>out</p></td>
18612 <td class="parameter_description"><p>Newly allocated datum with null terminated string.</p></td>
18613 <td class="parameter_annotations"> </td>
18614 </tr>
18615 </tbody>
18616 </table></div>
18617 </div>
18618 <div class="refsect3">
18619 <a name="gnutls-x509-ext-print.returns"></a><h4>Returns</h4>
18620 <p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a
18621 negative error value.</p>
18622 </div>
18623 </div>
18624 </div>
18625 <div class="refsect1">
18626 <a name="gnutls-x509.other_details"></a><h2>Types and Values</h2>
18627 <div class="refsect2">
18628 <a name="GNUTLS-OID-X520-COUNTRY-NAME:CAPS"></a><h3>GNUTLS_OID_X520_COUNTRY_NAME</h3>
18629 <pre class="programlisting">#define GNUTLS_OID_X520_COUNTRY_NAME "2.5.4.6"
18630 </pre>
18631 </div>
18632 <hr>
18633 <div class="refsect2">
18634 <a name="GNUTLS-OID-X520-ORGANIZATION-NAME:CAPS"></a><h3>GNUTLS_OID_X520_ORGANIZATION_NAME</h3>
18635 <pre class="programlisting">#define GNUTLS_OID_X520_ORGANIZATION_NAME "2.5.4.10"
18636 </pre>
18637 </div>
18638 <hr>
18639 <div class="refsect2">
18640 <a name="GNUTLS-OID-X520-ORGANIZATIONAL-UNIT-NAME:CAPS"></a><h3>GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME</h3>
18641 <pre class="programlisting">#define GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME "2.5.4.11"
18642 </pre>
18643 </div>
18644 <hr>
18645 <div class="refsect2">
18646 <a name="GNUTLS-OID-X520-COMMON-NAME:CAPS"></a><h3>GNUTLS_OID_X520_COMMON_NAME</h3>
18647 <pre class="programlisting">#define GNUTLS_OID_X520_COMMON_NAME "2.5.4.3"
18648 </pre>
18649 </div>
18650 <hr>
18651 <div class="refsect2">
18652 <a name="GNUTLS-OID-X520-LOCALITY-NAME:CAPS"></a><h3>GNUTLS_OID_X520_LOCALITY_NAME</h3>
18653 <pre class="programlisting">#define GNUTLS_OID_X520_LOCALITY_NAME "2.5.4.7"
18654 </pre>
18655 </div>
18656 <hr>
18657 <div class="refsect2">
18658 <a name="GNUTLS-OID-X520-STATE-OR-PROVINCE-NAME:CAPS"></a><h3>GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME</h3>
18659 <pre class="programlisting">#define GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME "2.5.4.8"
18660 </pre>
18661 </div>
18662 <hr>
18663 <div class="refsect2">
18664 <a name="GNUTLS-OID-X520-INITIALS:CAPS"></a><h3>GNUTLS_OID_X520_INITIALS</h3>
18665 <pre class="programlisting">#define GNUTLS_OID_X520_INITIALS "2.5.4.43"
18666 </pre>
18667 </div>
18668 <hr>
18669 <div class="refsect2">
18670 <a name="GNUTLS-OID-X520-GENERATION-QUALIFIER:CAPS"></a><h3>GNUTLS_OID_X520_GENERATION_QUALIFIER</h3>
18671 <pre class="programlisting">#define GNUTLS_OID_X520_GENERATION_QUALIFIER "2.5.4.44"
18672 </pre>
18673 </div>
18674 <hr>
18675 <div class="refsect2">
18676 <a name="GNUTLS-OID-X520-SURNAME:CAPS"></a><h3>GNUTLS_OID_X520_SURNAME</h3>
18677 <pre class="programlisting">#define GNUTLS_OID_X520_SURNAME "2.5.4.4"
18678 </pre>
18679 </div>
18680 <hr>
18681 <div class="refsect2">
18682 <a name="GNUTLS-OID-X520-GIVEN-NAME:CAPS"></a><h3>GNUTLS_OID_X520_GIVEN_NAME</h3>
18683 <pre class="programlisting">#define GNUTLS_OID_X520_GIVEN_NAME "2.5.4.42"
18684 </pre>
18685 </div>
18686 <hr>
18687 <div class="refsect2">
18688 <a name="GNUTLS-OID-X520-TITLE:CAPS"></a><h3>GNUTLS_OID_X520_TITLE</h3>
18689 <pre class="programlisting">#define GNUTLS_OID_X520_TITLE "2.5.4.12"
18690 </pre>
18691 </div>
18692 <hr>
18693 <div class="refsect2">
18694 <a name="GNUTLS-OID-X520-DN-QUALIFIER:CAPS"></a><h3>GNUTLS_OID_X520_DN_QUALIFIER</h3>
18695 <pre class="programlisting">#define GNUTLS_OID_X520_DN_QUALIFIER "2.5.4.46"
18696 </pre>
18697 </div>
18698 <hr>
18699 <div class="refsect2">
18700 <a name="GNUTLS-OID-X520-PSEUDONYM:CAPS"></a><h3>GNUTLS_OID_X520_PSEUDONYM</h3>
18701 <pre class="programlisting">#define GNUTLS_OID_X520_PSEUDONYM "2.5.4.65"
18702 </pre>
18703 </div>
18704 <hr>
18705 <div class="refsect2">
18706 <a name="GNUTLS-OID-X520-POSTALCODE:CAPS"></a><h3>GNUTLS_OID_X520_POSTALCODE</h3>
18707 <pre class="programlisting">#define GNUTLS_OID_X520_POSTALCODE "2.5.4.17"
18708 </pre>
18709 </div>
18710 <hr>
18711 <div class="refsect2">
18712 <a name="GNUTLS-OID-X520-NAME:CAPS"></a><h3>GNUTLS_OID_X520_NAME</h3>
18713 <pre class="programlisting">#define GNUTLS_OID_X520_NAME "2.5.4.41"
18714 </pre>
18715 </div>
18716 <hr>
18717 <div class="refsect2">
18718 <a name="GNUTLS-OID-LDAP-DC:CAPS"></a><h3>GNUTLS_OID_LDAP_DC</h3>
18719 <pre class="programlisting">#define GNUTLS_OID_LDAP_DC "0.9.2342.19200300.100.1.25"
18720 </pre>
18721 </div>
18722 <hr>
18723 <div class="refsect2">
18724 <a name="GNUTLS-OID-LDAP-UID:CAPS"></a><h3>GNUTLS_OID_LDAP_UID</h3>
18725 <pre class="programlisting">#define GNUTLS_OID_LDAP_UID "0.9.2342.19200300.100.1.1"
18726 </pre>
18727 </div>
18728 <hr>
18729 <div class="refsect2">
18730 <a name="GNUTLS-OID-PKCS9-EMAIL:CAPS"></a><h3>GNUTLS_OID_PKCS9_EMAIL</h3>
18731 <pre class="programlisting">#define GNUTLS_OID_PKCS9_EMAIL "1.2.840.113549.1.9.1"
18732 </pre>
18733 </div>
18734 <hr>
18735 <div class="refsect2">
18736 <a name="GNUTLS-OID-PKIX-DATE-OF-BIRTH:CAPS"></a><h3>GNUTLS_OID_PKIX_DATE_OF_BIRTH</h3>
18737 <pre class="programlisting">#define GNUTLS_OID_PKIX_DATE_OF_BIRTH "1.3.6.1.5.5.7.9.1"
18738 </pre>
18739 </div>
18740 <hr>
18741 <div class="refsect2">
18742 <a name="GNUTLS-OID-PKIX-PLACE-OF-BIRTH:CAPS"></a><h3>GNUTLS_OID_PKIX_PLACE_OF_BIRTH</h3>
18743 <pre class="programlisting">#define GNUTLS_OID_PKIX_PLACE_OF_BIRTH "1.3.6.1.5.5.7.9.2"
18744 </pre>
18745 </div>
18746 <hr>
18747 <div class="refsect2">
18748 <a name="GNUTLS-OID-PKIX-GENDER:CAPS"></a><h3>GNUTLS_OID_PKIX_GENDER</h3>
18749 <pre class="programlisting">#define GNUTLS_OID_PKIX_GENDER "1.3.6.1.5.5.7.9.3"
18750 </pre>
18751 </div>
18752 <hr>
18753 <div class="refsect2">
18754 <a name="GNUTLS-OID-PKIX-COUNTRY-OF-CITIZENSHIP:CAPS"></a><h3>GNUTLS_OID_PKIX_COUNTRY_OF_CITIZENSHIP</h3>
18755 <pre class="programlisting">#define GNUTLS_OID_PKIX_COUNTRY_OF_CITIZENSHIP "1.3.6.1.5.5.7.9.4"
18756 </pre>
18757 </div>
18758 <hr>
18759 <div class="refsect2">
18760 <a name="GNUTLS-OID-PKIX-COUNTRY-OF-RESIDENCE:CAPS"></a><h3>GNUTLS_OID_PKIX_COUNTRY_OF_RESIDENCE</h3>
18761 <pre class="programlisting">#define GNUTLS_OID_PKIX_COUNTRY_OF_RESIDENCE "1.3.6.1.5.5.7.9.5"
18762 </pre>
18763 </div>
18764 <hr>
18765 <div class="refsect2">
18766 <a name="GNUTLS-KP-TLS-WWW-SERVER:CAPS"></a><h3>GNUTLS_KP_TLS_WWW_SERVER</h3>
18767 <pre class="programlisting">#define GNUTLS_KP_TLS_WWW_SERVER "1.3.6.1.5.5.7.3.1"
18768 </pre>
18769 </div>
18770 <hr>
18771 <div class="refsect2">
18772 <a name="GNUTLS-KP-TLS-WWW-CLIENT:CAPS"></a><h3>GNUTLS_KP_TLS_WWW_CLIENT</h3>
18773 <pre class="programlisting">#define GNUTLS_KP_TLS_WWW_CLIENT "1.3.6.1.5.5.7.3.2"
18774 </pre>
18775 </div>
18776 <hr>
18777 <div class="refsect2">
18778 <a name="GNUTLS-KP-CODE-SIGNING:CAPS"></a><h3>GNUTLS_KP_CODE_SIGNING</h3>
18779 <pre class="programlisting">#define GNUTLS_KP_CODE_SIGNING "1.3.6.1.5.5.7.3.3"
18780 </pre>
18781 </div>
18782 <hr>
18783 <div class="refsect2">
18784 <a name="GNUTLS-KP-MS-SMART-CARD-LOGON:CAPS"></a><h3>GNUTLS_KP_MS_SMART_CARD_LOGON</h3>
18785 <pre class="programlisting">#define GNUTLS_KP_MS_SMART_CARD_LOGON "1.3.6.1.4.1.311.20.2.2"
18786 </pre>
18787 </div>
18788 <hr>
18789 <div class="refsect2">
18790 <a name="GNUTLS-KP-EMAIL-PROTECTION:CAPS"></a><h3>GNUTLS_KP_EMAIL_PROTECTION</h3>
18791 <pre class="programlisting">#define GNUTLS_KP_EMAIL_PROTECTION "1.3.6.1.5.5.7.3.4"
18792 </pre>
18793 </div>
18794 <hr>
18795 <div class="refsect2">
18796 <a name="GNUTLS-KP-TIME-STAMPING:CAPS"></a><h3>GNUTLS_KP_TIME_STAMPING</h3>
18797 <pre class="programlisting">#define GNUTLS_KP_TIME_STAMPING "1.3.6.1.5.5.7.3.8"
18798 </pre>
18799 </div>
18800 <hr>
18801 <div class="refsect2">
18802 <a name="GNUTLS-KP-OCSP-SIGNING:CAPS"></a><h3>GNUTLS_KP_OCSP_SIGNING</h3>
18803 <pre class="programlisting">#define GNUTLS_KP_OCSP_SIGNING "1.3.6.1.5.5.7.3.9"
18804 </pre>
18805 </div>
18806 <hr>
18807 <div class="refsect2">
18808 <a name="GNUTLS-KP-IPSEC-IKE:CAPS"></a><h3>GNUTLS_KP_IPSEC_IKE</h3>
18809 <pre class="programlisting">#define GNUTLS_KP_IPSEC_IKE "1.3.6.1.5.5.7.3.17"
18810 </pre>
18811 </div>
18812 <hr>
18813 <div class="refsect2">
18814 <a name="GNUTLS-KP-ANY:CAPS"></a><h3>GNUTLS_KP_ANY</h3>
18815 <pre class="programlisting">#define GNUTLS_KP_ANY "2.5.29.37.0"
18816 </pre>
18817 </div>
18818 <hr>
18819 <div class="refsect2">
18820 <a name="GNUTLS-KP-FLAG-DISALLOW-ANY:CAPS"></a><h3>GNUTLS_KP_FLAG_DISALLOW_ANY</h3>
18821 <pre class="programlisting">#define GNUTLS_KP_FLAG_DISALLOW_ANY 1
18822 </pre>
18823 </div>
18824 <hr>
18825 <div class="refsect2">
18826 <a name="GNUTLS-OID-AIA:CAPS"></a><h3>GNUTLS_OID_AIA</h3>
18827 <pre class="programlisting">#define GNUTLS_OID_AIA "1.3.6.1.5.5.7.1.1"
18828 </pre>
18829 </div>
18830 <hr>
18831 <div class="refsect2">
18832 <a name="GNUTLS-OID-AD-OCSP:CAPS"></a><h3>GNUTLS_OID_AD_OCSP</h3>
18833 <pre class="programlisting">#define GNUTLS_OID_AD_OCSP "1.3.6.1.5.5.7.48.1"
18834 </pre>
18835 </div>
18836 <hr>
18837 <div class="refsect2">
18838 <a name="GNUTLS-OID-AD-CAISSUERS:CAPS"></a><h3>GNUTLS_OID_AD_CAISSUERS</h3>
18839 <pre class="programlisting">#define GNUTLS_OID_AD_CAISSUERS "1.3.6.1.5.5.7.48.2"
18840 </pre>
18841 </div>
18842 <hr>
18843 <div class="refsect2">
18844 <a name="GNUTLS-FSAN-SET:CAPS"></a><h3>GNUTLS_FSAN_SET</h3>
18845 <pre class="programlisting">#define GNUTLS_FSAN_SET 0
18846 </pre>
18847 </div>
18848 <hr>
18849 <div class="refsect2">
18850 <a name="GNUTLS-FSAN-APPEND:CAPS"></a><h3>GNUTLS_FSAN_APPEND</h3>
18851 <pre class="programlisting">#define GNUTLS_FSAN_APPEND 1
18852 </pre>
18853 </div>
18854 <hr>
18855 <div class="refsect2">
18856 <a name="GNUTLS-FSAN-ENCODE-OCTET-STRING:CAPS"></a><h3>GNUTLS_FSAN_ENCODE_OCTET_STRING</h3>
18857 <pre class="programlisting">#define GNUTLS_FSAN_ENCODE_OCTET_STRING (1 &lt;&lt; 1)
18858 </pre>
18859 </div>
18860 <hr>
18861 <div class="refsect2">
18862 <a name="GNUTLS-FSAN-ENCODE-UTF8-STRING:CAPS"></a><h3>GNUTLS_FSAN_ENCODE_UTF8_STRING</h3>
18863 <pre class="programlisting">#define GNUTLS_FSAN_ENCODE_UTF8_STRING (1 &lt;&lt; 2)
18864 </pre>
18865 </div>
18866 <hr>
18867 <div class="refsect2">
18868 <a name="GNUTLS-X509EXT-OID-SUBJECT-KEY-ID:CAPS"></a><h3>GNUTLS_X509EXT_OID_SUBJECT_KEY_ID</h3>
18869 <pre class="programlisting">#define GNUTLS_X509EXT_OID_SUBJECT_KEY_ID "2.5.29.14"
18870 </pre>
18871 </div>
18872 <hr>
18873 <div class="refsect2">
18874 <a name="GNUTLS-X509EXT-OID-KEY-USAGE:CAPS"></a><h3>GNUTLS_X509EXT_OID_KEY_USAGE</h3>
18875 <pre class="programlisting">#define GNUTLS_X509EXT_OID_KEY_USAGE "2.5.29.15"
18876 </pre>
18877 </div>
18878 <hr>
18879 <div class="refsect2">
18880 <a name="GNUTLS-X509EXT-OID-PRIVATE-KEY-USAGE-PERIOD:CAPS"></a><h3>GNUTLS_X509EXT_OID_PRIVATE_KEY_USAGE_PERIOD</h3>
18881 <pre class="programlisting">#define GNUTLS_X509EXT_OID_PRIVATE_KEY_USAGE_PERIOD "2.5.29.16"
18882 </pre>
18883 </div>
18884 <hr>
18885 <div class="refsect2">
18886 <a name="GNUTLS-X509EXT-OID-SAN:CAPS"></a><h3>GNUTLS_X509EXT_OID_SAN</h3>
18887 <pre class="programlisting">#define GNUTLS_X509EXT_OID_SAN "2.5.29.17"
18888 </pre>
18889 </div>
18890 <hr>
18891 <div class="refsect2">
18892 <a name="GNUTLS-X509EXT-OID-IAN:CAPS"></a><h3>GNUTLS_X509EXT_OID_IAN</h3>
18893 <pre class="programlisting">#define GNUTLS_X509EXT_OID_IAN "2.5.29.18"
18894 </pre>
18895 </div>
18896 <hr>
18897 <div class="refsect2">
18898 <a name="GNUTLS-X509EXT-OID-BASIC-CONSTRAINTS:CAPS"></a><h3>GNUTLS_X509EXT_OID_BASIC_CONSTRAINTS</h3>
18899 <pre class="programlisting">#define GNUTLS_X509EXT_OID_BASIC_CONSTRAINTS "2.5.29.19"
18900 </pre>
18901 </div>
18902 <hr>
18903 <div class="refsect2">
18904 <a name="GNUTLS-X509EXT-OID-NAME-CONSTRAINTS:CAPS"></a><h3>GNUTLS_X509EXT_OID_NAME_CONSTRAINTS</h3>
18905 <pre class="programlisting">#define GNUTLS_X509EXT_OID_NAME_CONSTRAINTS "2.5.29.30"
18906 </pre>
18907 </div>
18908 <hr>
18909 <div class="refsect2">
18910 <a name="GNUTLS-X509EXT-OID-CRL-DIST-POINTS:CAPS"></a><h3>GNUTLS_X509EXT_OID_CRL_DIST_POINTS</h3>
18911 <pre class="programlisting">#define GNUTLS_X509EXT_OID_CRL_DIST_POINTS "2.5.29.31"
18912 </pre>
18913 </div>
18914 <hr>
18915 <div class="refsect2">
18916 <a name="GNUTLS-X509EXT-OID-CRT-POLICY:CAPS"></a><h3>GNUTLS_X509EXT_OID_CRT_POLICY</h3>
18917 <pre class="programlisting">#define GNUTLS_X509EXT_OID_CRT_POLICY "2.5.29.32"
18918 </pre>
18919 </div>
18920 <hr>
18921 <div class="refsect2">
18922 <a name="GNUTLS-X509EXT-OID-AUTHORITY-KEY-ID:CAPS"></a><h3>GNUTLS_X509EXT_OID_AUTHORITY_KEY_ID</h3>
18923 <pre class="programlisting">#define GNUTLS_X509EXT_OID_AUTHORITY_KEY_ID "2.5.29.35"
18924 </pre>
18925 </div>
18926 <hr>
18927 <div class="refsect2">
18928 <a name="GNUTLS-X509EXT-OID-EXTENDED-KEY-USAGE:CAPS"></a><h3>GNUTLS_X509EXT_OID_EXTENDED_KEY_USAGE</h3>
18929 <pre class="programlisting">#define GNUTLS_X509EXT_OID_EXTENDED_KEY_USAGE "2.5.29.37"
18930 </pre>
18931 </div>
18932 <hr>
18933 <div class="refsect2">
18934 <a name="GNUTLS-X509EXT-OID-INHIBIT-ANYPOLICY:CAPS"></a><h3>GNUTLS_X509EXT_OID_INHIBIT_ANYPOLICY</h3>
18935 <pre class="programlisting">#define GNUTLS_X509EXT_OID_INHIBIT_ANYPOLICY "2.5.29.52"
18936 </pre>
18937 </div>
18938 <hr>
18939 <div class="refsect2">
18940 <a name="GNUTLS-X509EXT-OID-AUTHORITY-INFO-ACCESS:CAPS"></a><h3>GNUTLS_X509EXT_OID_AUTHORITY_INFO_ACCESS</h3>
18941 <pre class="programlisting">#define GNUTLS_X509EXT_OID_AUTHORITY_INFO_ACCESS "1.3.6.1.5.5.7.1.1"
18942 </pre>
18943 </div>
18944 <hr>
18945 <div class="refsect2">
18946 <a name="GNUTLS-X509EXT-OID-PROXY-CRT-INFO:CAPS"></a><h3>GNUTLS_X509EXT_OID_PROXY_CRT_INFO</h3>
18947 <pre class="programlisting">#define GNUTLS_X509EXT_OID_PROXY_CRT_INFO "1.3.6.1.5.5.7.1.14"
18948 </pre>
18949 </div>
18950 <hr>
18951 <div class="refsect2">
18952 <a name="GNUTLS-X509EXT-OID-TLSFEATURES:CAPS"></a><h3>GNUTLS_X509EXT_OID_TLSFEATURES</h3>
18953 <pre class="programlisting">#define GNUTLS_X509EXT_OID_TLSFEATURES "1.3.6.1.5.5.7.1.24"
18954 </pre>
18955 </div>
18956 <hr>
18957 <div class="refsect2">
18958 <a name="GNUTLS-X509EXT-OID-CT-SCT-V1:CAPS"></a><h3>GNUTLS_X509EXT_OID_CT_SCT_V1</h3>
18959 <pre class="programlisting">#define GNUTLS_X509EXT_OID_CT_SCT_V1 "1.3.6.1.4.1.11129.2.4.2"
18960 </pre>
18961 </div>
18962 <hr>
18963 <div class="refsect2">
18964 <a name="GNUTLS-X509-OID-POLICY-ANY:CAPS"></a><h3>GNUTLS_X509_OID_POLICY_ANY</h3>
18965 <pre class="programlisting">#define GNUTLS_X509_OID_POLICY_ANY "2.5.29.54"
18966 </pre>
18967 </div>
18968 <hr>
18969 <div class="refsect2">
18970 <a name="gnutls-certificate-import-flags"></a><h3>enum gnutls_certificate_import_flags</h3>
18971 <p>Enumeration of different certificate flags.</p>
18972 <div class="refsect3">
18973 <a name="gnutls-certificate-import-flags.members"></a><h4>Members</h4>
18974 <div class="informaltable"><table class="informaltable" width="100%" border="0">
18975 <colgroup>
18976 <col width="300px" class="enum_members_name">
18977 <col class="enum_members_description">
18978 <col width="200px" class="enum_members_annotations">
18979 </colgroup>
18980 <tbody>
18981 <tr>
18982 <td class="enum_member_name"><p><a name="GNUTLS-X509-CRT-LIST-IMPORT-FAIL-IF-EXCEED:CAPS"></a>GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED</p></td>
18983 <td> </td>
18984 <td> </td>
18985 </tr>
18986 <tr>
18987 <td class="enum_member_name"><p><a name="GNUTLS-X509-CRT-LIST-FAIL-IF-UNSORTED:CAPS"></a>GNUTLS_X509_CRT_LIST_FAIL_IF_UNSORTED</p></td>
18988 <td> </td>
18989 <td> </td>
18990 </tr>
18991 <tr>
18992 <td class="enum_member_name"><p><a name="GNUTLS-X509-CRT-LIST-SORT:CAPS"></a>GNUTLS_X509_CRT_LIST_SORT</p></td>
18993 <td> </td>
18994 <td> </td>
18995 </tr>
18996 </tbody>
18997 </table></div>
18998 </div>
18999 </div>
19000 <hr>
19001 <div class="refsect2">
19002 <a name="gnutls-x509-crt-flags"></a><h3>enum gnutls_x509_crt_flags</h3>
19003 <div class="refsect3">
19004 <a name="gnutls-x509-crt-flags.members"></a><h4>Members</h4>
19005 <div class="informaltable"><table class="informaltable" width="100%" border="0">
19006 <colgroup>
19007 <col width="300px" class="enum_members_name">
19008 <col class="enum_members_description">
19009 <col width="200px" class="enum_members_annotations">
19010 </colgroup>
19011 <tbody><tr>
19012 <td class="enum_member_name"><p><a name="GNUTLS-X509-CRT-FLAG-IGNORE-SANITY:CAPS"></a>GNUTLS_X509_CRT_FLAG_IGNORE_SANITY</p></td>
19013 <td> </td>
19014 <td> </td>
19015 </tr></tbody>
19016 </table></div>
19017 </div>
19018 </div>
19019 <hr>
19020 <div class="refsect2">
19021 <a name="gnutls-keyid-flags-t"></a><h3>enum gnutls_keyid_flags_t</h3>
19022 <p>Enumeration of different flags for the key ID functions.</p>
19023 <div class="refsect3">
19024 <a name="gnutls-keyid-flags-t.members"></a><h4>Members</h4>
19025 <div class="informaltable"><table class="informaltable" width="100%" border="0">
19026 <colgroup>
19027 <col width="300px" class="enum_members_name">
19028 <col class="enum_members_description">
19029 <col width="200px" class="enum_members_annotations">
19030 </colgroup>
19031 <tbody>
19032 <tr>
19033 <td class="enum_member_name"><p><a name="GNUTLS-KEYID-USE-SHA1:CAPS"></a>GNUTLS_KEYID_USE_SHA1</p></td>
19034 <td class="enum_member_description">
19035 <p>Use SHA1 as the key ID algorithm (default).</p>
19036 </td>
19037 <td class="enum_member_annotations"> </td>
19038 </tr>
19039 <tr>
19040 <td class="enum_member_name"><p><a name="GNUTLS-KEYID-USE-SHA256:CAPS"></a>GNUTLS_KEYID_USE_SHA256</p></td>
19041 <td class="enum_member_description">
19042 <p>Use SHA256 as the key ID algorithm.</p>
19043 </td>
19044 <td class="enum_member_annotations"> </td>
19045 </tr>
19046 <tr>
19047 <td class="enum_member_name"><p><a name="GNUTLS-KEYID-USE-SHA512:CAPS"></a>GNUTLS_KEYID_USE_SHA512</p></td>
19048 <td class="enum_member_description">
19049 <p>Use SHA512 as the key ID algorithm.</p>
19050 </td>
19051 <td class="enum_member_annotations"> </td>
19052 </tr>
19053 <tr>
19054 <td class="enum_member_name"><p><a name="GNUTLS-KEYID-USE-BEST-KNOWN:CAPS"></a>GNUTLS_KEYID_USE_BEST_KNOWN</p></td>
19055 <td class="enum_member_description">
19056 <p>Use the best known algorithm to calculate key ID. Using that option will make your program behavior depend on the version of gnutls linked with. That option has a cap of 64-bytes key IDs.</p>
19057 </td>
19058 <td class="enum_member_annotations"> </td>
19059 </tr>
19060 </tbody>
19061 </table></div>
19062 </div>
19063 </div>
19064 <hr>
19065 <div class="refsect2">
19066 <a name="gnutls-info-access-what-t"></a><h3>enum gnutls_info_access_what_t</h3>
19067 <p>Enumeration of types for the <em class="parameter"><code>what</code></em>
19068 parameter of
19069 <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-authority-info-access" title="gnutls_x509_crt_get_authority_info_access ()"><code class="function">gnutls_x509_crt_get_authority_info_access()</code></a>.</p>
19070 <div class="refsect3">
19071 <a name="gnutls-info-access-what-t.members"></a><h4>Members</h4>
19072 <div class="informaltable"><table class="informaltable" width="100%" border="0">
19073 <colgroup>
19074 <col width="300px" class="enum_members_name">
19075 <col class="enum_members_description">
19076 <col width="200px" class="enum_members_annotations">
19077 </colgroup>
19078 <tbody>
19079 <tr>
19080 <td class="enum_member_name"><p><a name="GNUTLS-IA-ACCESSMETHOD-OID:CAPS"></a>GNUTLS_IA_ACCESSMETHOD_OID</p></td>
19081 <td class="enum_member_description">
19082 <p>Get accessMethod OID.</p>
19083 </td>
19084 <td class="enum_member_annotations"> </td>
19085 </tr>
19086 <tr>
19087 <td class="enum_member_name"><p><a name="GNUTLS-IA-ACCESSLOCATION-GENERALNAME-TYPE:CAPS"></a>GNUTLS_IA_ACCESSLOCATION_GENERALNAME_TYPE</p></td>
19088 <td class="enum_member_description">
19089 <p>Get accessLocation name type.</p>
19090 </td>
19091 <td class="enum_member_annotations"> </td>
19092 </tr>
19093 <tr>
19094 <td class="enum_member_name"><p><a name="GNUTLS-IA-URI:CAPS"></a>GNUTLS_IA_URI</p></td>
19095 <td class="enum_member_description">
19096 <p>Get accessLocation URI value.</p>
19097 </td>
19098 <td class="enum_member_annotations"> </td>
19099 </tr>
19100 <tr>
19101 <td class="enum_member_name"><p><a name="GNUTLS-IA-UNKNOWN:CAPS"></a>GNUTLS_IA_UNKNOWN</p></td>
19102 <td> </td>
19103 <td> </td>
19104 </tr>
19105 <tr>
19106 <td class="enum_member_name"><p><a name="GNUTLS-IA-OCSP-URI:CAPS"></a>GNUTLS_IA_OCSP_URI</p></td>
19107 <td class="enum_member_description">
19108 <p>get accessLocation URI value for OCSP.</p>
19109 </td>
19110 <td class="enum_member_annotations"> </td>
19111 </tr>
19112 <tr>
19113 <td class="enum_member_name"><p><a name="GNUTLS-IA-CAISSUERS-URI:CAPS"></a>GNUTLS_IA_CAISSUERS_URI</p></td>
19114 <td class="enum_member_description">
19115 <p>get accessLocation URI value for caIssuers.</p>
19116 </td>
19117 <td class="enum_member_annotations"> </td>
19118 </tr>
19119 </tbody>
19120 </table></div>
19121 </div>
19122 </div>
19123 <hr>
19124 <div class="refsect2">
19125 <a name="gnutls-x509-name-constraints-t"></a><h3>gnutls_x509_name_constraints_t</h3>
19126 <pre class="programlisting">typedef struct gnutls_name_constraints_st *gnutls_x509_name_constraints_t;
19127 </pre>
19128 </div>
19129 <hr>
19130 <div class="refsect2">
19131 <a name="GNUTLS-EXT-FLAG-APPEND:CAPS"></a><h3>GNUTLS_EXT_FLAG_APPEND</h3>
19132 <pre class="programlisting">#define GNUTLS_EXT_FLAG_APPEND 1
19133 </pre>
19134 </div>
19135 <hr>
19136 <div class="refsect2">
19137 <a name="GNUTLS-NAME-CONSTRAINTS-FLAG-APPEND:CAPS"></a><h3>GNUTLS_NAME_CONSTRAINTS_FLAG_APPEND</h3>
19138 <pre class="programlisting">#define GNUTLS_NAME_CONSTRAINTS_FLAG_APPEND GNUTLS_EXT_FLAG_APPEND
19139 </pre>
19140 </div>
19141 <hr>
19142 <div class="refsect2">
19143 <a name="GNUTLS-CRL-REASON-SUPERSEEDED:CAPS"></a><h3>GNUTLS_CRL_REASON_SUPERSEEDED</h3>
19144 <pre class="programlisting">#define GNUTLS_CRL_REASON_SUPERSEEDED GNUTLS_CRL_REASON_SUPERSEDED,
19145 </pre>
19146 </div>
19147 <hr>
19148 <div class="refsect2">
19149 <a name="gnutls-x509-crl-reason-flags-t"></a><h3>enum gnutls_x509_crl_reason_flags_t</h3>
19150 <p>Enumeration of types for the CRL revocation reasons.</p>
19151 <div class="refsect3">
19152 <a name="gnutls-x509-crl-reason-flags-t.members"></a><h4>Members</h4>
19153 <div class="informaltable"><table class="informaltable" width="100%" border="0">
19154 <colgroup>
19155 <col width="300px" class="enum_members_name">
19156 <col class="enum_members_description">
19157 <col width="200px" class="enum_members_annotations">
19158 </colgroup>
19159 <tbody>
19160 <tr>
19161 <td class="enum_member_name"><p><a name="GNUTLS-CRL-REASON-UNSPECIFIED:CAPS"></a>GNUTLS_CRL_REASON_UNSPECIFIED</p></td>
19162 <td> </td>
19163 <td> </td>
19164 </tr>
19165 <tr>
19166 <td class="enum_member_name"><p><a name="GNUTLS-CRL-REASON-PRIVILEGE-WITHDRAWN:CAPS"></a>GNUTLS_CRL_REASON_PRIVILEGE_WITHDRAWN</p></td>
19167 <td class="enum_member_description">
19168 <p>The privileges were withdrawn from the owner.</p>
19169 </td>
19170 <td class="enum_member_annotations"> </td>
19171 </tr>
19172 <tr>
19173 <td class="enum_member_name"><p><a name="GNUTLS-CRL-REASON-CERTIFICATE-HOLD:CAPS"></a>GNUTLS_CRL_REASON_CERTIFICATE_HOLD</p></td>
19174 <td class="enum_member_description">
19175 <p>The certificate is on hold.</p>
19176 </td>
19177 <td class="enum_member_annotations"> </td>
19178 </tr>
19179 <tr>
19180 <td class="enum_member_name"><p><a name="GNUTLS-CRL-REASON-CESSATION-OF-OPERATION:CAPS"></a>GNUTLS_CRL_REASON_CESSATION_OF_OPERATION</p></td>
19181 <td class="enum_member_description">
19182 <p>The end-entity is no longer operating.</p>
19183 </td>
19184 <td class="enum_member_annotations"> </td>
19185 </tr>
19186 <tr>
19187 <td class="enum_member_name"><p><a name="GNUTLS-CRL-REASON-SUPERSEDED:CAPS"></a>GNUTLS_CRL_REASON_SUPERSEDED</p></td>
19188 <td class="enum_member_description">
19189 <p>There is a newer certificate of the owner.</p>
19190 </td>
19191 <td class="enum_member_annotations"> </td>
19192 </tr>
19193 <tr>
19194 <td class="enum_member_name"><p><a name="GNUTLS-CRL-REASON-AFFILIATION-CHANGED:CAPS"></a>GNUTLS_CRL_REASON_AFFILIATION_CHANGED</p></td>
19195 <td class="enum_member_description">
19196 <p>The end-entity affiliation has changed.</p>
19197 </td>
19198 <td class="enum_member_annotations"> </td>
19199 </tr>
19200 <tr>
19201 <td class="enum_member_name"><p><a name="GNUTLS-CRL-REASON-CA-COMPROMISE:CAPS"></a>GNUTLS_CRL_REASON_CA_COMPROMISE</p></td>
19202 <td class="enum_member_description">
19203 <p>The CA was compromised.</p>
19204 </td>
19205 <td class="enum_member_annotations"> </td>
19206 </tr>
19207 <tr>
19208 <td class="enum_member_name"><p><a name="GNUTLS-CRL-REASON-KEY-COMPROMISE:CAPS"></a>GNUTLS_CRL_REASON_KEY_COMPROMISE</p></td>
19209 <td class="enum_member_description">
19210 <p>The certificate's key was compromised.</p>
19211 </td>
19212 <td class="enum_member_annotations"> </td>
19213 </tr>
19214 <tr>
19215 <td class="enum_member_name"><p><a name="GNUTLS-CRL-REASON-UNUSED:CAPS"></a>GNUTLS_CRL_REASON_UNUSED</p></td>
19216 <td class="enum_member_description">
19217 <p>The key was never used.</p>
19218 </td>
19219 <td class="enum_member_annotations"> </td>
19220 </tr>
19221 <tr>
19222 <td class="enum_member_name"><p><a name="GNUTLS-CRL-REASON-AA-COMPROMISE:CAPS"></a>GNUTLS_CRL_REASON_AA_COMPROMISE</p></td>
19223 <td class="enum_member_description">
19224 <p>AA compromised.</p>
19225 </td>
19226 <td class="enum_member_annotations"> </td>
19227 </tr>
19228 </tbody>
19229 </table></div>
19230 </div>
19231 </div>
19232 <hr>
19233 <div class="refsect2">
19234 <a name="GNUTLS-X509-NO-WELL-DEFINED-EXPIRATION:CAPS"></a><h3>GNUTLS_X509_NO_WELL_DEFINED_EXPIRATION</h3>
19235 <pre class="programlisting">#define GNUTLS_X509_NO_WELL_DEFINED_EXPIRATION ((time_t)4294197631)
19236 </pre>
19237 </div>
19238 <hr>
19239 <div class="refsect2">
19240 <a name="gnutls-x509-spki-t"></a><h3>gnutls_x509_spki_t</h3>
19241 <pre class="programlisting">typedef struct gnutls_x509_spki_st *gnutls_x509_spki_t;
19242 </pre>
19243 </div>
19244 <hr>
19245 <div class="refsect2">
19246 <a name="gnutls-x509-tlsfeatures-t"></a><h3>gnutls_x509_tlsfeatures_t</h3>
19247 <pre class="programlisting">typedef struct gnutls_x509_tlsfeatures_st *gnutls_x509_tlsfeatures_t;
19248 </pre>
19249 </div>
19250 <hr>
19251 <div class="refsect2">
19252 <a name="GNUTLS-MAX-QUALIFIERS:CAPS"></a><h3>GNUTLS_MAX_QUALIFIERS</h3>
19253 <pre class="programlisting">#define GNUTLS_MAX_QUALIFIERS 8
19254 </pre>
19255 </div>
19256 <hr>
19257 <div class="refsect2">
19258 <a name="gnutls-x509-qualifier-t"></a><h3>enum gnutls_x509_qualifier_t</h3>
19259 <p>Enumeration of types for the X.509 qualifiers, of the certificate policy extension.</p>
19260 <div class="refsect3">
19261 <a name="gnutls-x509-qualifier-t.members"></a><h4>Members</h4>
19262 <div class="informaltable"><table class="informaltable" width="100%" border="0">
19263 <colgroup>
19264 <col width="300px" class="enum_members_name">
19265 <col class="enum_members_description">
19266 <col width="200px" class="enum_members_annotations">
19267 </colgroup>
19268 <tbody>
19269 <tr>
19270 <td class="enum_member_name"><p><a name="GNUTLS-X509-QUALIFIER-UNKNOWN:CAPS"></a>GNUTLS_X509_QUALIFIER_UNKNOWN</p></td>
19271 <td class="enum_member_description">
19272 <p>Unknown qualifier.</p>
19273 </td>
19274 <td class="enum_member_annotations"> </td>
19275 </tr>
19276 <tr>
19277 <td class="enum_member_name"><p><a name="GNUTLS-X509-QUALIFIER-URI:CAPS"></a>GNUTLS_X509_QUALIFIER_URI</p></td>
19278 <td class="enum_member_description">
19279 <p>A URL</p>
19280 </td>
19281 <td class="enum_member_annotations"> </td>
19282 </tr>
19283 <tr>
19284 <td class="enum_member_name"><p><a name="GNUTLS-X509-QUALIFIER-NOTICE:CAPS"></a>GNUTLS_X509_QUALIFIER_NOTICE</p></td>
19285 <td> </td>
19286 <td> </td>
19287 </tr>
19288 </tbody>
19289 </table></div>
19290 </div>
19291 </div>
19292 <hr>
19293 <div class="refsect2">
19294 <a name="gnutls-x509-policy-st"></a><h3>gnutls_x509_policy_st</h3>
19295 <pre class="programlisting">typedef struct {
19296 char *oid;
19297 unsigned int qualifiers;
19298 struct {
19299 gnutls_x509_qualifier_t type;
19300 char *data;
19301 unsigned int size;
19302 } qualifier[GNUTLS_MAX_QUALIFIERS];
19303 } gnutls_x509_policy_st;
19304 </pre>
19305 </div>
19306 <hr>
19307 <div class="refsect2">
19308 <a name="GNUTLS-X509-DN-OID-RETURN-OID:CAPS"></a><h3>GNUTLS_X509_DN_OID_RETURN_OID</h3>
19309 <pre class="programlisting">#define GNUTLS_X509_DN_OID_RETURN_OID 1
19310 </pre>
19311 </div>
19312 <hr>
19313 <div class="refsect2">
19314 <a name="gnutls-x509-dn-t"></a><h3>gnutls_x509_dn_t</h3>
19315 <pre class="programlisting">typedef struct gnutls_x509_dn_st *gnutls_x509_dn_t;
19316 </pre>
19317 </div>
19318 <hr>
19319 <div class="refsect2">
19320 <a name="gnutls-x509-ava-st"></a><h3>gnutls_x509_ava_st</h3>
19321 <pre class="programlisting">typedef struct {
19322 gnutls_datum_t oid;
19323 gnutls_datum_t value;
19324 unsigned long value_tag;
19325 } gnutls_x509_ava_st;
19326 </pre>
19327 </div>
19328 <hr>
19329 <div class="refsect2">
19330 <a name="GNUTLS-X509-DN-FLAG-COMPAT:CAPS"></a><h3>GNUTLS_X509_DN_FLAG_COMPAT</h3>
19331 <pre class="programlisting">#define GNUTLS_X509_DN_FLAG_COMPAT 1
19332 </pre>
19333 </div>
19334 <hr>
19335 <div class="refsect2">
19336 <a name="gnutls-x509-crl-iter-t"></a><h3>gnutls_x509_crl_iter_t</h3>
19337 <pre class="programlisting">typedef struct gnutls_x509_crl_iter *gnutls_x509_crl_iter_t;
19338 </pre>
19339 </div>
19340 <hr>
19341 <div class="refsect2">
19342 <a name="gnutls-x509-crl-get-certificate-count"></a><h3>gnutls_x509_crl_get_certificate_count</h3>
19343 <pre class="programlisting">#define gnutls_x509_crl_get_certificate_count gnutls_x509_crl_get_crt_count
19344 </pre>
19345 </div>
19346 <hr>
19347 <div class="refsect2">
19348 <a name="gnutls-x509-crl-get-certificate"></a><h3>gnutls_x509_crl_get_certificate</h3>
19349 <pre class="programlisting">#define gnutls_x509_crl_get_certificate gnutls_x509_crl_get_crt_serial
19350 </pre>
19351 </div>
19352 <hr>
19353 <div class="refsect2">
19354 <a name="gnutls-certificate-verify-flags"></a><h3>enum gnutls_certificate_verify_flags</h3>
19355 <p>Enumeration of different certificate verify flags. Additional
19356 verification profiles can be set using <a class="link" href="gnutls-x509.html#GNUTLS-PROFILE-TO-VFLAGS:CAPS" title="GNUTLS_PROFILE_TO_VFLAGS()"><code class="function">GNUTLS_PROFILE_TO_VFLAGS()</code></a>
19357 and <a class="link" href="gnutls-x509.html#gnutls-certificate-verification-profiles-t" title="enum gnutls_certificate_verification_profiles_t"><code class="literal">gnutls_certificate_verification_profiles_t</code></a>.</p>
19358 <div class="refsect3">
19359 <a name="gnutls-certificate-verify-flags.members"></a><h4>Members</h4>
19360 <div class="informaltable"><table class="informaltable" width="100%" border="0">
19361 <colgroup>
19362 <col width="300px" class="enum_members_name">
19363 <col class="enum_members_description">
19364 <col width="200px" class="enum_members_annotations">
19365 </colgroup>
19366 <tbody>
19367 <tr>
19368 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-DISABLE-CA-SIGN:CAPS"></a>GNUTLS_VERIFY_DISABLE_CA_SIGN</p></td>
19369 <td class="enum_member_description">
19370 <p>If set a signer does not have to be
19371 a certificate authority. This flag should normally be disabled,
19372 unless you know what this means.</p>
19373 </td>
19374 <td class="enum_member_annotations"> </td>
19375 </tr>
19376 <tr>
19377 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-DO-NOT-ALLOW-IP-MATCHES:CAPS"></a>GNUTLS_VERIFY_DO_NOT_ALLOW_IP_MATCHES</p></td>
19378 <td class="enum_member_description">
19379 <p>When verifying a hostname
19380 prevent textual IP addresses from matching IP addresses in the
19381 certificate. Treat the input only as a DNS name.</p>
19382 </td>
19383 <td class="enum_member_annotations"> </td>
19384 </tr>
19385 <tr>
19386 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-DO-NOT-ALLOW-SAME:CAPS"></a>GNUTLS_VERIFY_DO_NOT_ALLOW_SAME</p></td>
19387 <td class="enum_member_description">
19388 <p>If a certificate is not signed by
19389 anyone trusted but exists in the trusted CA list do not treat it
19390 as trusted.</p>
19391 </td>
19392 <td class="enum_member_annotations"> </td>
19393 </tr>
19394 <tr>
19395 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-ALLOW-ANY-X509-V1-CA-CRT:CAPS"></a>GNUTLS_VERIFY_ALLOW_ANY_X509_V1_CA_CRT</p></td>
19396 <td class="enum_member_description">
19397 <p>Allow CA certificates that
19398 have version 1 (both root and intermediate). This might be
19399 dangerous since those haven't the basicConstraints
19400 extension. </p>
19401 </td>
19402 <td class="enum_member_annotations"> </td>
19403 </tr>
19404 <tr>
19405 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-ALLOW-SIGN-RSA-MD2:CAPS"></a>GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD2</p></td>
19406 <td class="enum_member_description">
19407 <p>Allow certificates to be signed
19408 using the broken MD2 algorithm.</p>
19409 </td>
19410 <td class="enum_member_annotations"> </td>
19411 </tr>
19412 <tr>
19413 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-ALLOW-SIGN-RSA-MD5:CAPS"></a>GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD5</p></td>
19414 <td class="enum_member_description">
19415 <p>Allow certificates to be signed
19416 using the broken MD5 algorithm.</p>
19417 </td>
19418 <td class="enum_member_annotations"> </td>
19419 </tr>
19420 <tr>
19421 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-DISABLE-TIME-CHECKS:CAPS"></a>GNUTLS_VERIFY_DISABLE_TIME_CHECKS</p></td>
19422 <td class="enum_member_description">
19423 <p>Disable checking of activation
19424 and expiration validity periods of certificate chains. Don't set
19425 this unless you understand the security implications.</p>
19426 </td>
19427 <td class="enum_member_annotations"> </td>
19428 </tr>
19429 <tr>
19430 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-DISABLE-TRUSTED-TIME-CHECKS:CAPS"></a>GNUTLS_VERIFY_DISABLE_TRUSTED_TIME_CHECKS</p></td>
19431 <td class="enum_member_description">
19432 <p>If set a signer in the trusted
19433 list is never checked for expiration or activation.</p>
19434 </td>
19435 <td class="enum_member_annotations"> </td>
19436 </tr>
19437 <tr>
19438 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-DO-NOT-ALLOW-X509-V1-CA-CRT:CAPS"></a>GNUTLS_VERIFY_DO_NOT_ALLOW_X509_V1_CA_CRT</p></td>
19439 <td class="enum_member_description">
19440 <p>Do not allow trusted CA
19441 certificates that have version 1. This option is to be used
19442 to deprecate all certificates of version 1.</p>
19443 </td>
19444 <td class="enum_member_annotations"> </td>
19445 </tr>
19446 <tr>
19447 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-DISABLE-CRL-CHECKS:CAPS"></a>GNUTLS_VERIFY_DISABLE_CRL_CHECKS</p></td>
19448 <td class="enum_member_description">
19449 <p>Disable checking for validity
19450 using certificate revocation lists or the available OCSP data.</p>
19451 </td>
19452 <td class="enum_member_annotations"> </td>
19453 </tr>
19454 <tr>
19455 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-ALLOW-UNSORTED-CHAIN:CAPS"></a>GNUTLS_VERIFY_ALLOW_UNSORTED_CHAIN</p></td>
19456 <td class="enum_member_description">
19457 <p>A certificate chain is tolerated
19458 if unsorted (the case with many TLS servers out there). This is the
19459 default since GnuTLS 3.1.4.</p>
19460 </td>
19461 <td class="enum_member_annotations"> </td>
19462 </tr>
19463 <tr>
19464 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-DO-NOT-ALLOW-UNSORTED-CHAIN:CAPS"></a>GNUTLS_VERIFY_DO_NOT_ALLOW_UNSORTED_CHAIN</p></td>
19465 <td class="enum_member_description">
19466 <p>Do not tolerate an unsorted
19467 certificate chain.</p>
19468 </td>
19469 <td class="enum_member_annotations"> </td>
19470 </tr>
19471 <tr>
19472 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-DO-NOT-ALLOW-WILDCARDS:CAPS"></a>GNUTLS_VERIFY_DO_NOT_ALLOW_WILDCARDS</p></td>
19473 <td class="enum_member_description">
19474 <p>When including a hostname
19475 check in the verification, do not consider any wildcards.</p>
19476 </td>
19477 <td class="enum_member_annotations"> </td>
19478 </tr>
19479 <tr>
19480 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-USE-TLS1-RSA:CAPS"></a>GNUTLS_VERIFY_USE_TLS1_RSA</p></td>
19481 <td class="enum_member_description">
19482 <p>This indicates that a (raw) RSA signature is provided
19483 as in the TLS 1.0 protocol. Not all functions accept this flag.</p>
19484 </td>
19485 <td class="enum_member_annotations"> </td>
19486 </tr>
19487 <tr>
19488 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-IGNORE-UNKNOWN-CRIT-EXTENSIONS:CAPS"></a>GNUTLS_VERIFY_IGNORE_UNKNOWN_CRIT_EXTENSIONS</p></td>
19489 <td class="enum_member_description">
19490 <p>This signals the verification
19491 process, not to fail on unknown critical extensions.</p>
19492 </td>
19493 <td class="enum_member_annotations"> </td>
19494 </tr>
19495 <tr>
19496 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-ALLOW-SIGN-WITH-SHA1:CAPS"></a>GNUTLS_VERIFY_ALLOW_SIGN_WITH_SHA1</p></td>
19497 <td class="enum_member_description">
19498 <p>Allow certificates to be signed
19499 using the broken SHA1 hash algorithm.</p>
19500 </td>
19501 <td class="enum_member_annotations"> </td>
19502 </tr>
19503 <tr>
19504 <td class="enum_member_name"><p><a name="GNUTLS-VERIFY-RSA-PSS-FIXED-SALT-LENGTH:CAPS"></a>GNUTLS_VERIFY_RSA_PSS_FIXED_SALT_LENGTH</p></td>
19505 <td class="enum_member_description">
19506 <p>Disallow RSA-PSS signatures made
19507 with mismatching salt length with digest length, as mandated in RFC 8446
19508 4.2.3.</p>
19509 </td>
19510 <td class="enum_member_annotations"> </td>
19511 </tr>
19512 </tbody>
19513 </table></div>
19514 </div>
19515 </div>
19516 <hr>
19517 <div class="refsect2">
19518 <a name="GNUTLS-VERIFY-ALLOW-BROKEN:CAPS"></a><h3>GNUTLS_VERIFY_ALLOW_BROKEN</h3>
19519 <pre class="programlisting">#define GNUTLS_VERIFY_ALLOW_BROKEN</pre>
19520 </div>
19521 <hr>
19522 <div class="refsect2">
19523 <a name="gnutls-certificate-verification-profiles-t"></a><h3>enum gnutls_certificate_verification_profiles_t</h3>
19524 <p>Enumeration of different certificate verification profiles.</p>
19525 <div class="refsect3">
19526 <a name="gnutls-certificate-verification-profiles-t.members"></a><h4>Members</h4>
19527 <div class="informaltable"><table class="informaltable" width="100%" border="0">
19528 <colgroup>
19529 <col width="300px" class="enum_members_name">
19530 <col class="enum_members_description">
19531 <col width="200px" class="enum_members_annotations">
19532 </colgroup>
19533 <tbody>
19534 <tr>
19535 <td class="enum_member_name"><p><a name="GNUTLS-PROFILE-UNKNOWN:CAPS"></a>GNUTLS_PROFILE_UNKNOWN</p></td>
19536 <td class="enum_member_description">
19537 <p>An invalid/unknown profile.</p>
19538 </td>
19539 <td class="enum_member_annotations"> </td>
19540 </tr>
19541 <tr>
19542 <td class="enum_member_name"><p><a name="GNUTLS-PROFILE-VERY-WEAK:CAPS"></a>GNUTLS_PROFILE_VERY_WEAK</p></td>
19543 <td class="enum_member_description">
19544 <p>A verification profile that
19545 corresponds to <em class="parameter"><code>GNUTLS_SEC_PARAM_VERY_WEAK</code></em>
19546 (64 bits)</p>
19547 </td>
19548 <td class="enum_member_annotations"> </td>
19549 </tr>
19550 <tr>
19551 <td class="enum_member_name"><p><a name="GNUTLS-PROFILE-LOW:CAPS"></a>GNUTLS_PROFILE_LOW</p></td>
19552 <td class="enum_member_description">
19553 <p>A verification profile that
19554 corresponds to <em class="parameter"><code>GNUTLS_SEC_PARAM_LOW</code></em>
19555 (80 bits)</p>
19556 </td>
19557 <td class="enum_member_annotations"> </td>
19558 </tr>
19559 <tr>
19560 <td class="enum_member_name"><p><a name="GNUTLS-PROFILE-LEGACY:CAPS"></a>GNUTLS_PROFILE_LEGACY</p></td>
19561 <td class="enum_member_description">
19562 <p>A verification profile that
19563 corresponds to <em class="parameter"><code>GNUTLS_SEC_PARAM_LEGACY</code></em>
19564 (96 bits)</p>
19565 </td>
19566 <td class="enum_member_annotations"> </td>
19567 </tr>
19568 <tr>
19569 <td class="enum_member_name"><p><a name="GNUTLS-PROFILE-MEDIUM:CAPS"></a>GNUTLS_PROFILE_MEDIUM</p></td>
19570 <td class="enum_member_description">
19571 <p>A verification profile that
19572 corresponds to <em class="parameter"><code>GNUTLS_SEC_PARAM_MEDIUM</code></em>
19573 (112 bits)</p>
19574 </td>
19575 <td class="enum_member_annotations"> </td>
19576 </tr>
19577 <tr>
19578 <td class="enum_member_name"><p><a name="GNUTLS-PROFILE-HIGH:CAPS"></a>GNUTLS_PROFILE_HIGH</p></td>
19579 <td class="enum_member_description">
19580 <p>A verification profile that
19581 corresponds to <em class="parameter"><code>GNUTLS_SEC_PARAM_HIGH</code></em>
19582 (128 bits)</p>
19583 </td>
19584 <td class="enum_member_annotations"> </td>
19585 </tr>
19586 <tr>
19587 <td class="enum_member_name"><p><a name="GNUTLS-PROFILE-ULTRA:CAPS"></a>GNUTLS_PROFILE_ULTRA</p></td>
19588 <td class="enum_member_description">
19589 <p>A verification profile that
19590 corresponds to <em class="parameter"><code>GNUTLS_SEC_PARAM_ULTRA</code></em>
19591 (192 bits)</p>
19592 </td>
19593 <td class="enum_member_annotations"> </td>
19594 </tr>
19595 <tr>
19596 <td class="enum_member_name"><p><a name="GNUTLS-PROFILE-FUTURE:CAPS"></a>GNUTLS_PROFILE_FUTURE</p></td>
19597 <td class="enum_member_description">
19598 <p>A verification profile that
19599 corresponds to <em class="parameter"><code>GNUTLS_SEC_PARAM_FUTURE</code></em>
19600 (256 bits)</p>
19601 </td>
19602 <td class="enum_member_annotations"> </td>
19603 </tr>
19604 <tr>
19605 <td class="enum_member_name"><p><a name="GNUTLS-PROFILE-SUITEB128:CAPS"></a>GNUTLS_PROFILE_SUITEB128</p></td>
19606 <td class="enum_member_description">
19607 <p>A verification profile that
19608 applies the SUITEB128 rules</p>
19609 </td>
19610 <td class="enum_member_annotations"> </td>
19611 </tr>
19612 <tr>
19613 <td class="enum_member_name"><p><a name="GNUTLS-PROFILE-SUITEB192:CAPS"></a>GNUTLS_PROFILE_SUITEB192</p></td>
19614 <td class="enum_member_description">
19615 <p>A verification profile that
19616 applies the SUITEB192 rules</p>
19617 </td>
19618 <td class="enum_member_annotations"> </td>
19619 </tr>
19620 </tbody>
19621 </table></div>
19622 </div>
19623 </div>
19624 <hr>
19625 <div class="refsect2">
19626 <a name="GNUTLS-VFLAGS-PROFILE-MASK:CAPS"></a><h3>GNUTLS_VFLAGS_PROFILE_MASK</h3>
19627 <pre class="programlisting">#define GNUTLS_VFLAGS_PROFILE_MASK (0xff000000)
19628 </pre>
19629 </div>
19630 <hr>
19631 <div class="refsect2">
19632 <a name="GNUTLS-PKCS8-PLAIN:CAPS"></a><h3>GNUTLS_PKCS8_PLAIN</h3>
19633 <pre class="programlisting">#define GNUTLS_PKCS8_PLAIN GNUTLS_PKCS_PLAIN
19634 </pre>
19635 </div>
19636 <hr>
19637 <div class="refsect2">
19638 <a name="GNUTLS-PKCS8-USE-PKCS12-3DES:CAPS"></a><h3>GNUTLS_PKCS8_USE_PKCS12_3DES</h3>
19639 <pre class="programlisting">#define GNUTLS_PKCS8_USE_PKCS12_3DES GNUTLS_PKCS_PKCS12_3DES
19640 </pre>
19641 </div>
19642 <hr>
19643 <div class="refsect2">
19644 <a name="GNUTLS-PKCS8-USE-PKCS12-ARCFOUR:CAPS"></a><h3>GNUTLS_PKCS8_USE_PKCS12_ARCFOUR</h3>
19645 <pre class="programlisting">#define GNUTLS_PKCS8_USE_PKCS12_ARCFOUR GNUTLS_PKCS_PKCS12_ARCFOUR
19646 </pre>
19647 </div>
19648 <hr>
19649 <div class="refsect2">
19650 <a name="GNUTLS-PKCS8-USE-PKCS12-RC2-40:CAPS"></a><h3>GNUTLS_PKCS8_USE_PKCS12_RC2_40</h3>
19651 <pre class="programlisting">#define GNUTLS_PKCS8_USE_PKCS12_RC2_40 GNUTLS_PKCS_PKCS12_RC2_40
19652 </pre>
19653 </div>
19654 <hr>
19655 <div class="refsect2">
19656 <a name="gnutls-pkcs-encrypt-flags-t"></a><h3>enum gnutls_pkcs_encrypt_flags_t</h3>
19657 <p>Enumeration of different PKCS encryption flags.</p>
19658 <div class="refsect3">
19659 <a name="gnutls-pkcs-encrypt-flags-t.members"></a><h4>Members</h4>
19660 <div class="informaltable"><table class="informaltable" width="100%" border="0">
19661 <colgroup>
19662 <col width="300px" class="enum_members_name">
19663 <col class="enum_members_description">
19664 <col width="200px" class="enum_members_annotations">
19665 </colgroup>
19666 <tbody>
19667 <tr>
19668 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-PLAIN:CAPS"></a>GNUTLS_PKCS_PLAIN</p></td>
19669 <td class="enum_member_description">
19670 <p>Unencrypted private key.</p>
19671 </td>
19672 <td class="enum_member_annotations"> </td>
19673 </tr>
19674 <tr>
19675 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-PKCS12-3DES:CAPS"></a>GNUTLS_PKCS_PKCS12_3DES</p></td>
19676 <td class="enum_member_description">
19677 <p>PKCS-12 3DES.</p>
19678 </td>
19679 <td class="enum_member_annotations"> </td>
19680 </tr>
19681 <tr>
19682 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-PKCS12-ARCFOUR:CAPS"></a>GNUTLS_PKCS_PKCS12_ARCFOUR</p></td>
19683 <td class="enum_member_description">
19684 <p>PKCS-12 ARCFOUR.</p>
19685 </td>
19686 <td class="enum_member_annotations"> </td>
19687 </tr>
19688 <tr>
19689 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-PKCS12-RC2-40:CAPS"></a>GNUTLS_PKCS_PKCS12_RC2_40</p></td>
19690 <td class="enum_member_description">
19691 <p>PKCS-12 RC2-40.</p>
19692 </td>
19693 <td class="enum_member_annotations"> </td>
19694 </tr>
19695 <tr>
19696 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-PBES2-3DES:CAPS"></a>GNUTLS_PKCS_PBES2_3DES</p></td>
19697 <td class="enum_member_description">
19698 <p>PBES2 3DES.</p>
19699 </td>
19700 <td class="enum_member_annotations"> </td>
19701 </tr>
19702 <tr>
19703 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-PBES2-AES-128:CAPS"></a>GNUTLS_PKCS_PBES2_AES_128</p></td>
19704 <td class="enum_member_description">
19705 <p>PBES2 AES-128.</p>
19706 </td>
19707 <td class="enum_member_annotations"> </td>
19708 </tr>
19709 <tr>
19710 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-PBES2-AES-192:CAPS"></a>GNUTLS_PKCS_PBES2_AES_192</p></td>
19711 <td class="enum_member_description">
19712 <p>PBES2 AES-192.</p>
19713 </td>
19714 <td class="enum_member_annotations"> </td>
19715 </tr>
19716 <tr>
19717 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-PBES2-AES-256:CAPS"></a>GNUTLS_PKCS_PBES2_AES_256</p></td>
19718 <td class="enum_member_description">
19719 <p>PBES2 AES-256.</p>
19720 </td>
19721 <td class="enum_member_annotations"> </td>
19722 </tr>
19723 <tr>
19724 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-NULL-PASSWORD:CAPS"></a>GNUTLS_PKCS_NULL_PASSWORD</p></td>
19725 <td class="enum_member_description">
19726 <p>Some schemas distinguish between an empty and a NULL password.</p>
19727 </td>
19728 <td class="enum_member_annotations"> </td>
19729 </tr>
19730 <tr>
19731 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-PBES2-DES:CAPS"></a>GNUTLS_PKCS_PBES2_DES</p></td>
19732 <td class="enum_member_description">
19733 <p>PBES2 single DES.</p>
19734 </td>
19735 <td class="enum_member_annotations"> </td>
19736 </tr>
19737 <tr>
19738 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-PBES1-DES-MD5:CAPS"></a>GNUTLS_PKCS_PBES1_DES_MD5</p></td>
19739 <td class="enum_member_description">
19740 <p>PBES1 with single DES; for compatibility with openssl only.</p>
19741 </td>
19742 <td class="enum_member_annotations"> </td>
19743 </tr>
19744 <tr>
19745 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-PBES2-GOST-TC26Z:CAPS"></a>GNUTLS_PKCS_PBES2_GOST_TC26Z</p></td>
19746 <td class="enum_member_description">
19747 <p>PBES2 GOST 28147-89 CFB with TC26-Z S-box.</p>
19748 </td>
19749 <td class="enum_member_annotations"> </td>
19750 </tr>
19751 <tr>
19752 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-PBES2-GOST-CPA:CAPS"></a>GNUTLS_PKCS_PBES2_GOST_CPA</p></td>
19753 <td class="enum_member_description">
19754 <p>PBES2 GOST 28147-89 CFB with CryptoPro-A S-box.</p>
19755 </td>
19756 <td class="enum_member_annotations"> </td>
19757 </tr>
19758 <tr>
19759 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-PBES2-GOST-CPB:CAPS"></a>GNUTLS_PKCS_PBES2_GOST_CPB</p></td>
19760 <td class="enum_member_description">
19761 <p>PBES2 GOST 28147-89 CFB with CryptoPro-B S-box.</p>
19762 </td>
19763 <td class="enum_member_annotations"> </td>
19764 </tr>
19765 <tr>
19766 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-PBES2-GOST-CPC:CAPS"></a>GNUTLS_PKCS_PBES2_GOST_CPC</p></td>
19767 <td class="enum_member_description">
19768 <p>PBES2 GOST 28147-89 CFB with CryptoPro-C S-box.</p>
19769 </td>
19770 <td class="enum_member_annotations"> </td>
19771 </tr>
19772 <tr>
19773 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-PBES2-GOST-CPD:CAPS"></a>GNUTLS_PKCS_PBES2_GOST_CPD</p></td>
19774 <td class="enum_member_description">
19775 <p>PBES2 GOST 28147-89 CFB with CryptoPro-D S-box.</p>
19776 </td>
19777 <td class="enum_member_annotations"> </td>
19778 </tr>
19779 <tr>
19780 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-PBES1-DES-SHA1:CAPS"></a>GNUTLS_PKCS_PBES1_DES_SHA1</p></td>
19781 <td class="enum_member_description">
19782 <p>PBES1 with single DES; for compatibility purposes only.</p>
19783 </td>
19784 <td class="enum_member_annotations"> </td>
19785 </tr>
19786 <tr>
19787 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-MLDSA-SEED:CAPS"></a>GNUTLS_PKCS_MLDSA_SEED</p></td>
19788 <td class="enum_member_description">
19789 <p>Emit seed as an ML-DSA private key.</p>
19790 </td>
19791 <td class="enum_member_annotations"> </td>
19792 </tr>
19793 <tr>
19794 <td class="enum_member_name"><p><a name="GNUTLS-PKCS-MLDSA-EXPANDED:CAPS"></a>GNUTLS_PKCS_MLDSA_EXPANDED</p></td>
19795 <td class="enum_member_description">
19796 <p>Emit an expanded ML-DSA private key.</p>
19797 </td>
19798 <td class="enum_member_annotations"> </td>
19799 </tr>
19800 </tbody>
19801 </table></div>
19802 </div>
19803 </div>
19804 <hr>
19805 <div class="refsect2">
19806 <a name="GNUTLS-PKCS-USE-PKCS12-3DES:CAPS"></a><h3>GNUTLS_PKCS_USE_PKCS12_3DES</h3>
19807 <pre class="programlisting">#define GNUTLS_PKCS_USE_PKCS12_3DES GNUTLS_PKCS_PKCS12_3DES
19808 </pre>
19809 </div>
19810 <hr>
19811 <div class="refsect2">
19812 <a name="GNUTLS-PKCS-USE-PKCS12-ARCFOUR:CAPS"></a><h3>GNUTLS_PKCS_USE_PKCS12_ARCFOUR</h3>
19813 <pre class="programlisting">#define GNUTLS_PKCS_USE_PKCS12_ARCFOUR GNUTLS_PKCS_PKCS12_ARCFOUR
19814 </pre>
19815 </div>
19816 <hr>
19817 <div class="refsect2">
19818 <a name="GNUTLS-PKCS-USE-PKCS12-RC2-40:CAPS"></a><h3>GNUTLS_PKCS_USE_PKCS12_RC2_40</h3>
19819 <pre class="programlisting">#define GNUTLS_PKCS_USE_PKCS12_RC2_40 GNUTLS_PKCS_PKCS12_RC2_40
19820 </pre>
19821 </div>
19822 <hr>
19823 <div class="refsect2">
19824 <a name="GNUTLS-PKCS-USE-PBES2-3DES:CAPS"></a><h3>GNUTLS_PKCS_USE_PBES2_3DES</h3>
19825 <pre class="programlisting">#define GNUTLS_PKCS_USE_PBES2_3DES GNUTLS_PKCS_PBES2_3DES
19826 </pre>
19827 </div>
19828 <hr>
19829 <div class="refsect2">
19830 <a name="GNUTLS-PKCS-USE-PBES2-AES-128:CAPS"></a><h3>GNUTLS_PKCS_USE_PBES2_AES_128</h3>
19831 <pre class="programlisting">#define GNUTLS_PKCS_USE_PBES2_AES_128 GNUTLS_PKCS_PBES2_AES_128
19832 </pre>
19833 </div>
19834 <hr>
19835 <div class="refsect2">
19836 <a name="GNUTLS-PKCS-USE-PBES2-AES-192:CAPS"></a><h3>GNUTLS_PKCS_USE_PBES2_AES_192</h3>
19837 <pre class="programlisting">#define GNUTLS_PKCS_USE_PBES2_AES_192 GNUTLS_PKCS_PBES2_AES_192
19838 </pre>
19839 </div>
19840 <hr>
19841 <div class="refsect2">
19842 <a name="GNUTLS-PKCS-USE-PBES2-AES-256:CAPS"></a><h3>GNUTLS_PKCS_USE_PBES2_AES_256</h3>
19843 <pre class="programlisting">#define GNUTLS_PKCS_USE_PBES2_AES_256 GNUTLS_PKCS_PBES2_AES_256
19844 </pre>
19845 </div>
19846 <hr>
19847 <div class="refsect2">
19848 <a name="GNUTLS-PKCS-USE-PBES2-GOST-TC26Z:CAPS"></a><h3>GNUTLS_PKCS_USE_PBES2_GOST_TC26Z</h3>
19849 <pre class="programlisting">#define GNUTLS_PKCS_USE_PBES2_GOST_TC26Z GNUTLS_PKCS_PBES2_GOST_TC26Z
19850 </pre>
19851 </div>
19852 <hr>
19853 <div class="refsect2">
19854 <a name="GNUTLS-PKCS-USE-PBES2-GOST-CPA:CAPS"></a><h3>GNUTLS_PKCS_USE_PBES2_GOST_CPA</h3>
19855 <pre class="programlisting">#define GNUTLS_PKCS_USE_PBES2_GOST_CPA GNUTLS_PKCS_PBES2_GOST_CPA
19856 </pre>
19857 </div>
19858 <hr>
19859 <div class="refsect2">
19860 <a name="GNUTLS-PKCS-USE-PBES2-GOST-CPB:CAPS"></a><h3>GNUTLS_PKCS_USE_PBES2_GOST_CPB</h3>
19861 <pre class="programlisting">#define GNUTLS_PKCS_USE_PBES2_GOST_CPB GNUTLS_PKCS_PBES2_GOST_CPB
19862 </pre>
19863 </div>
19864 <hr>
19865 <div class="refsect2">
19866 <a name="GNUTLS-PKCS-USE-PBES2-GOST-CPC:CAPS"></a><h3>GNUTLS_PKCS_USE_PBES2_GOST_CPC</h3>
19867 <pre class="programlisting">#define GNUTLS_PKCS_USE_PBES2_GOST_CPC GNUTLS_PKCS_PBES2_GOST_CPC
19868 </pre>
19869 </div>
19870 <hr>
19871 <div class="refsect2">
19872 <a name="GNUTLS-PKCS-USE-PBES2-GOST-CPD:CAPS"></a><h3>GNUTLS_PKCS_USE_PBES2_GOST_CPD</h3>
19873 <pre class="programlisting">#define GNUTLS_PKCS_USE_PBES2_GOST_CPD GNUTLS_PKCS_PBES2_GOST_CPD
19874 </pre>
19875 </div>
19876 <hr>
19877 <div class="refsect2">
19878 <a name="gnutls-keygen-types-t"></a><h3>enum gnutls_keygen_types_t</h3>
19879 <p>Enumeration of different key generation data options.</p>
19880 <div class="refsect3">
19881 <a name="gnutls-keygen-types-t.members"></a><h4>Members</h4>
19882 <div class="informaltable"><table class="informaltable" width="100%" border="0">
19883 <colgroup>
19884 <col width="300px" class="enum_members_name">
19885 <col class="enum_members_description">
19886 <col width="200px" class="enum_members_annotations">
19887 </colgroup>
19888 <tbody>
19889 <tr>
19890 <td class="enum_member_name"><p><a name="GNUTLS-KEYGEN-SEED:CAPS"></a>GNUTLS_KEYGEN_SEED</p></td>
19891 <td class="enum_member_description">
19892 <p>Specifies the seed to be used in key generation.</p>
19893 </td>
19894 <td class="enum_member_annotations"> </td>
19895 </tr>
19896 <tr>
19897 <td class="enum_member_name"><p><a name="GNUTLS-KEYGEN-DIGEST:CAPS"></a>GNUTLS_KEYGEN_DIGEST</p></td>
19898 <td class="enum_member_description">
19899 <p>The size field specifies the hash algorithm to be used in key generation.</p>
19900 </td>
19901 <td class="enum_member_annotations"> </td>
19902 </tr>
19903 <tr>
19904 <td class="enum_member_name"><p><a name="GNUTLS-KEYGEN-SPKI:CAPS"></a>GNUTLS_KEYGEN_SPKI</p></td>
19905 <td class="enum_member_description">
19906 <p>data points to a <a class="link" href="gnutls-x509.html#gnutls-x509-spki-t" title="gnutls_x509_spki_t"><code class="literal">gnutls_x509_spki_t</code></a> structure; it is not used after the key generation call.</p>
19907 </td>
19908 <td class="enum_member_annotations"> </td>
19909 </tr>
19910 <tr>
19911 <td class="enum_member_name"><p><a name="GNUTLS-KEYGEN-DH:CAPS"></a>GNUTLS_KEYGEN_DH</p></td>
19912 <td class="enum_member_description">
19913 <p>data points to a <a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><code class="literal">gnutls_dh_params_t</code></a> structure; it is not used after the key generation call.</p>
19914 </td>
19915 <td class="enum_member_annotations"> </td>
19916 </tr>
19917 </tbody>
19918 </table></div>
19919 </div>
19920 </div>
19921 <hr>
19922 <div class="refsect2">
19923 <a name="gnutls-keygen-data-st"></a><h3>gnutls_keygen_data_st</h3>
19924 <pre class="programlisting">typedef struct {
19925 gnutls_keygen_types_t type;
19926 unsigned char *data;
19927 unsigned int size;
19928 } gnutls_keygen_data_st;
19929 </pre>
19930 </div>
19931 <hr>
19932 <div class="refsect2">
19933 <a name="gnutls-x509-trust-list-t"></a><h3>gnutls_x509_trust_list_t</h3>
19934 <pre class="programlisting">typedef struct gnutls_x509_trust_list_st *gnutls_x509_trust_list_t;
19935 </pre>
19936 </div>
19937 <hr>
19938 <div class="refsect2">
19939 <a name="gnutls-x509-trust-list-iter-t"></a><h3>gnutls_x509_trust_list_iter_t</h3>
19940 <pre class="programlisting">typedef struct gnutls_x509_trust_list_iter *gnutls_x509_trust_list_iter_t;
19941 </pre>
19942 </div>
19943 <hr>
19944 <div class="refsect2">
19945 <a name="gnutls-trust-list-flags-t"></a><h3>enum gnutls_trust_list_flags_t</h3>
19946 <p>Enumeration of different certificate trust list flags.</p>
19947 <div class="refsect3">
19948 <a name="gnutls-trust-list-flags-t.members"></a><h4>Members</h4>
19949 <div class="informaltable"><table class="informaltable" width="100%" border="0">
19950 <colgroup>
19951 <col width="300px" class="enum_members_name">
19952 <col class="enum_members_description">
19953 <col width="200px" class="enum_members_annotations">
19954 </colgroup>
19955 <tbody>
19956 <tr>
19957 <td class="enum_member_name"><p><a name="GNUTLS-TL-VERIFY-CRL:CAPS"></a>GNUTLS_TL_VERIFY_CRL</p></td>
19958 <td class="enum_member_description">
19959 <p>If any CRLs are provided they will be verified for validity
19960 prior to be added. The CA certificates that will be used for verification are the
19961 ones already added in the trusted list.</p>
19962 </td>
19963 <td class="enum_member_annotations"> </td>
19964 </tr>
19965 <tr>
19966 <td class="enum_member_name"><p><a name="GNUTLS-TL-USE-IN-TLS:CAPS"></a>GNUTLS_TL_USE_IN_TLS</p></td>
19967 <td class="enum_member_description">
19968 <p>Internal flag used by GnuTLS. If provided the trust list
19969 structure will cache a copy of CA DNs to be used in the certificate request
19970 TLS message.</p>
19971 </td>
19972 <td class="enum_member_annotations"> </td>
19973 </tr>
19974 <tr>
19975 <td class="enum_member_name"><p><a name="GNUTLS-TL-NO-DUPLICATES:CAPS"></a>GNUTLS_TL_NO_DUPLICATES</p></td>
19976 <td class="enum_member_description">
19977 <p>If this flag is specified, a function adding certificates
19978 will check and eliminate any duplicates.</p>
19979 </td>
19980 <td class="enum_member_annotations"> </td>
19981 </tr>
19982 <tr>
19983 <td class="enum_member_name"><p><a name="GNUTLS-TL-NO-DUPLICATE-KEY:CAPS"></a>GNUTLS_TL_NO_DUPLICATE_KEY</p></td>
19984 <td class="enum_member_description">
19985 <p>If this flag is specified, a certificate sharing the
19986 same key as a previously added on will not be added.</p>
19987 </td>
19988 <td class="enum_member_annotations"> </td>
19989 </tr>
19990 <tr>
19991 <td class="enum_member_name"><p><a name="GNUTLS-TL-GET-COPY:CAPS"></a>GNUTLS_TL_GET_COPY</p></td>
19992 <td class="enum_member_description">
19993 <p>The semantics of this flag are documented to the functions which
19994 are applicable. In general, on returned value, the function will provide a copy
19995 if this flag is provided, rather than a pointer to internal data.</p>
19996 </td>
19997 <td class="enum_member_annotations"> </td>
19998 </tr>
19999 <tr>
20000 <td class="enum_member_name"><p><a name="GNUTLS-TL-FAIL-ON-INVALID-CRL:CAPS"></a>GNUTLS_TL_FAIL_ON_INVALID_CRL</p></td>
20001 <td class="enum_member_description">
20002 <p>If an CRL is added which cannot be validated return
20003 an error instead of ignoring (must be used with <a class="link" href="gnutls-x509.html#GNUTLS-TL-VERIFY-CRL:CAPS"><code class="literal">GNUTLS_TL_VERIFY_CRL</code></a>).</p>
20004 </td>
20005 <td class="enum_member_annotations"> </td>
20006 </tr>
20007 </tbody>
20008 </table></div>
20009 </div>
20010 </div>
20011 <hr>
20012 <div class="refsect2">
20013 <a name="gnutls-x509-ext-st"></a><h3>gnutls_x509_ext_st</h3>
20014 <pre class="programlisting">typedef struct {
20015 char *oid;
20016 unsigned int critical;
20017 gnutls_datum_t data;
20018 } gnutls_x509_ext_st;
20019 </pre>
20020 </div>
20021 </div>
20022 </div>
20023 <div class="footer">
20024 <hr>Generated by GTK-Doc V1.34.0</div>
20025 </body>
20026 </html>