1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 3<title>Heimdalx509library: hx509 printing functions</title> 4<link href="doxygen.css" rel="stylesheet" type="text/css"> 5<link href="tabs.css" rel="stylesheet" type="text/css"> 6</head><body> 7<p> 8<a href="http://www.h5l.org/"><img src="http://www.h5l.org/keyhole-heimdal.png" alt="keyhole logo"/></a> 9</p> 10<!-- end of header marker --> 11<!-- Generated by Doxygen 1.5.6 --> 12<div class="navigation" id="top"> 13 <div class="tabs"> 14 <ul> 15 <li><a href="index.html"><span>Main Page</span></a></li> 16 <li><a href="pages.html"><span>Related Pages</span></a></li> 17 <li><a href="modules.html"><span>Modules</span></a></li> 18 </ul> 19 </div> 20</div> 21<div class="contents"> 22<h1>hx509 printing functions</h1><table border="0" cellpadding="0" cellspacing="0"> 23<tr><td></td></tr> 24<tr><td colspan="2"><br><h2>Functions</h2></td></tr> 25<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__print.html#ge27c328d203e88c87cf81b6eb1d1fe66">hx509_print_stdout</a> (void *ctx, const char *fmt, va_list va)</td></tr> 26 27<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__print.html#gc116d19332498d183eb055452d682d81">hx509_oid_sprint</a> (const heim_oid *oid, char **str)</td></tr> 28 29<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__print.html#g984e34629525e8c301b237c158c34d23">hx509_oid_print</a> (const heim_oid *oid, hx509_vprint_func func, void *ctx)</td></tr> 30 31<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__print.html#g274370b840dec6de699577e3d203e6b2">hx509_bitstring_print</a> (const heim_bit_string *b, hx509_vprint_func func, void *ctx)</td></tr> 32 33<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__print.html#gafcf2f11a60a1f9b6ccabaacef0e697f">hx509_cert_keyusage_print</a> (hx509_context context, hx509_cert c, char **s)</td></tr> 34 35<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__print.html#g582e93c29a1becbe5c2ac1ac758e09f4">hx509_validate_ctx_init</a> (hx509_context context, hx509_validate_ctx *ctx)</td></tr> 36 37<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__print.html#g2fab228a24716340f368fa729b5722b1">hx509_validate_ctx_set_print</a> (hx509_validate_ctx ctx, hx509_vprint_func func, void *c)</td></tr> 38 39<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__print.html#gdfc4c934e63c8c7b10661520de70411e">hx509_validate_ctx_add_flags</a> (hx509_validate_ctx ctx, int flags)</td></tr> 40 41<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__print.html#g72409ecab29eec94cc0215ed21ecca8e">hx509_validate_ctx_free</a> (hx509_validate_ctx ctx)</td></tr> 42 43<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__print.html#g5e3ded9ba5c466a2c6f80b9d233b69c3">hx509_validate_cert</a> (hx509_context context, hx509_validate_ctx ctx, hx509_cert cert)</td></tr> 44 45</table> 46<hr><a name="_details"></a><h2>Detailed Description</h2> 47<hr><h2>Function Documentation</h2> 48<a class="anchor" name="g274370b840dec6de699577e3d203e6b2"></a><!-- doxytag: member="print.c::hx509_bitstring_print" ref="g274370b840dec6de699577e3d203e6b2" args="(const heim_bit_string *b, hx509_vprint_func func, void *ctx)" --> 49<div class="memitem"> 50<div class="memproto"> 51 <table class="memname"> 52 <tr> 53 <td class="memname">void hx509_bitstring_print </td> 54 <td>(</td> 55 <td class="paramtype">const heim_bit_string * </td> 56 <td class="paramname"> <em>b</em>, </td> 57 </tr> 58 <tr> 59 <td class="paramkey"></td> 60 <td></td> 61 <td class="paramtype">hx509_vprint_func </td> 62 <td class="paramname"> <em>func</em>, </td> 63 </tr> 64 <tr> 65 <td class="paramkey"></td> 66 <td></td> 67 <td class="paramtype">void * </td> 68 <td class="paramname"> <em>ctx</em></td><td> </td> 69 </tr> 70 <tr> 71 <td></td> 72 <td>)</td> 73 <td></td><td></td><td></td> 74 </tr> 75 </table> 76</div> 77<div class="memdoc"> 78 79<p> 80Print a bitstring using a hx509_vprint_func function. To print to stdout use <a class="el" href="group__hx509__print.html#ge27c328d203e88c87cf81b6eb1d1fe66">hx509_print_stdout()</a>.<p> 81<dl compact><dt><b>Parameters:</b></dt><dd> 82 <table border="0" cellspacing="2" cellpadding="0"> 83 <tr><td valign="top"></td><td valign="top"><em>b</em> </td><td>bit string to print. </td></tr> 84 <tr><td valign="top"></td><td valign="top"><em>func</em> </td><td>hx509_vprint_func to print with. </td></tr> 85 <tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>context variable to hx509_vprint_func function. </td></tr> 86 </table> 87</dl> 88 89</div> 90</div><p> 91<a class="anchor" name="gafcf2f11a60a1f9b6ccabaacef0e697f"></a><!-- doxytag: member="print.c::hx509_cert_keyusage_print" ref="gafcf2f11a60a1f9b6ccabaacef0e697f" args="(hx509_context context, hx509_cert c, char **s)" --> 92<div class="memitem"> 93<div class="memproto"> 94 <table class="memname"> 95 <tr> 96 <td class="memname">int hx509_cert_keyusage_print </td> 97 <td>(</td> 98 <td class="paramtype">hx509_context </td> 99 <td class="paramname"> <em>context</em>, </td> 100 </tr> 101 <tr> 102 <td class="paramkey"></td> 103 <td></td> 104 <td class="paramtype">hx509_cert </td> 105 <td class="paramname"> <em>c</em>, </td> 106 </tr> 107 <tr> 108 <td class="paramkey"></td> 109 <td></td> 110 <td class="paramtype">char ** </td> 111 <td class="paramname"> <em>s</em></td><td> </td> 112 </tr> 113 <tr> 114 <td></td> 115 <td>)</td> 116 <td></td><td></td><td></td> 117 </tr> 118 </table> 119</div> 120<div class="memdoc"> 121 122<p> 123Print certificate usage for a certificate to a string.<p> 124<dl compact><dt><b>Parameters:</b></dt><dd> 125 <table border="0" cellspacing="2" cellpadding="0"> 126 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A hx509 context. </td></tr> 127 <tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>a certificate print the keyusage for. </td></tr> 128 <tr><td valign="top"></td><td valign="top"><em>s</em> </td><td>the return string with the keysage printed in to, free with <a class="el" href="group__hx509__misc.html#gba6d3eb6abde539a3191269f785e3e61">hx509_xfree()</a>.</td></tr> 129 </table> 130</dl> 131<dl class="return" compact><dt><b>Returns:</b></dt><dd>An hx509 error code, see <a class="el" href="group__hx509__error.html#g15791abff76719acb531223fdcbcac87">hx509_get_error_string()</a>. </dd></dl> 132 133</div> 134</div><p> 135<a class="anchor" name="g984e34629525e8c301b237c158c34d23"></a><!-- doxytag: member="print.c::hx509_oid_print" ref="g984e34629525e8c301b237c158c34d23" args="(const heim_oid *oid, hx509_vprint_func func, void *ctx)" --> 136<div class="memitem"> 137<div class="memproto"> 138 <table class="memname"> 139 <tr> 140 <td class="memname">void hx509_oid_print </td> 141 <td>(</td> 142 <td class="paramtype">const heim_oid * </td> 143 <td class="paramname"> <em>oid</em>, </td> 144 </tr> 145 <tr> 146 <td class="paramkey"></td> 147 <td></td> 148 <td class="paramtype">hx509_vprint_func </td> 149 <td class="paramname"> <em>func</em>, </td> 150 </tr> 151 <tr> 152 <td class="paramkey"></td> 153 <td></td> 154 <td class="paramtype">void * </td> 155 <td class="paramname"> <em>ctx</em></td><td> </td> 156 </tr> 157 <tr> 158 <td></td> 159 <td>)</td> 160 <td></td><td></td><td></td> 161 </tr> 162 </table> 163</div> 164<div class="memdoc"> 165 166<p> 167Print a oid using a hx509_vprint_func function. To print to stdout use <a class="el" href="group__hx509__print.html#ge27c328d203e88c87cf81b6eb1d1fe66">hx509_print_stdout()</a>.<p> 168<dl compact><dt><b>Parameters:</b></dt><dd> 169 <table border="0" cellspacing="2" cellpadding="0"> 170 <tr><td valign="top"></td><td valign="top"><em>oid</em> </td><td>oid to print </td></tr> 171 <tr><td valign="top"></td><td valign="top"><em>func</em> </td><td>hx509_vprint_func to print with. </td></tr> 172 <tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>context variable to hx509_vprint_func function. </td></tr> 173 </table> 174</dl> 175 176</div> 177</div><p> 178<a class="anchor" name="gc116d19332498d183eb055452d682d81"></a><!-- doxytag: member="print.c::hx509_oid_sprint" ref="gc116d19332498d183eb055452d682d81" args="(const heim_oid *oid, char **str)" --> 179<div class="memitem"> 180<div class="memproto"> 181 <table class="memname"> 182 <tr> 183 <td class="memname">int hx509_oid_sprint </td> 184 <td>(</td> 185 <td class="paramtype">const heim_oid * </td> 186 <td class="paramname"> <em>oid</em>, </td> 187 </tr> 188 <tr> 189 <td class="paramkey"></td> 190 <td></td> 191 <td class="paramtype">char ** </td> 192 <td class="paramname"> <em>str</em></td><td> </td> 193 </tr> 194 <tr> 195 <td></td> 196 <td>)</td> 197 <td></td><td></td><td></td> 198 </tr> 199 </table> 200</div> 201<div class="memdoc"> 202 203<p> 204Print a oid to a string.<p> 205<dl compact><dt><b>Parameters:</b></dt><dd> 206 <table border="0" cellspacing="2" cellpadding="0"> 207 <tr><td valign="top"></td><td valign="top"><em>oid</em> </td><td>oid to print </td></tr> 208 <tr><td valign="top"></td><td valign="top"><em>str</em> </td><td>allocated string, free with <a class="el" href="group__hx509__misc.html#gba6d3eb6abde539a3191269f785e3e61">hx509_xfree()</a>.</td></tr> 209 </table> 210</dl> 211<dl class="return" compact><dt><b>Returns:</b></dt><dd>An hx509 error code, see <a class="el" href="group__hx509__error.html#g15791abff76719acb531223fdcbcac87">hx509_get_error_string()</a>. </dd></dl> 212 213</div> 214</div><p> 215<a class="anchor" name="ge27c328d203e88c87cf81b6eb1d1fe66"></a><!-- doxytag: member="print.c::hx509_print_stdout" ref="ge27c328d203e88c87cf81b6eb1d1fe66" args="(void *ctx, const char *fmt, va_list va)" --> 216<div class="memitem"> 217<div class="memproto"> 218 <table class="memname"> 219 <tr> 220 <td class="memname">void hx509_print_stdout </td> 221 <td>(</td> 222 <td class="paramtype">void * </td> 223 <td class="paramname"> <em>ctx</em>, </td> 224 </tr> 225 <tr> 226 <td class="paramkey"></td> 227 <td></td> 228 <td class="paramtype">const char * </td> 229 <td class="paramname"> <em>fmt</em>, </td> 230 </tr> 231 <tr> 232 <td class="paramkey"></td> 233 <td></td> 234 <td class="paramtype">va_list </td> 235 <td class="paramname"> <em>va</em></td><td> </td> 236 </tr> 237 <tr> 238 <td></td> 239 <td>)</td> 240 <td></td><td></td><td></td> 241 </tr> 242 </table> 243</div> 244<div class="memdoc"> 245 246<p> 247Helper function to print on stdout for:<ul> 248<li><a class="el" href="group__hx509__print.html#g984e34629525e8c301b237c158c34d23">hx509_oid_print()</a>,</li><li><a class="el" href="group__hx509__print.html#g274370b840dec6de699577e3d203e6b2">hx509_bitstring_print()</a>,</li><li><a class="el" href="group__hx509__print.html#g2fab228a24716340f368fa729b5722b1">hx509_validate_ctx_set_print()</a>.</li></ul> 249<p> 250<dl compact><dt><b>Parameters:</b></dt><dd> 251 <table border="0" cellspacing="2" cellpadding="0"> 252 <tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>the context to the print function. If the ctx is NULL, stdout is used. </td></tr> 253 <tr><td valign="top"></td><td valign="top"><em>fmt</em> </td><td>the printing format. </td></tr> 254 <tr><td valign="top"></td><td valign="top"><em>va</em> </td><td>the argumet list. </td></tr> 255 </table> 256</dl> 257 258</div> 259</div><p> 260<a class="anchor" name="g5e3ded9ba5c466a2c6f80b9d233b69c3"></a><!-- doxytag: member="print.c::hx509_validate_cert" ref="g5e3ded9ba5c466a2c6f80b9d233b69c3" args="(hx509_context context, hx509_validate_ctx ctx, hx509_cert cert)" --> 261<div class="memitem"> 262<div class="memproto"> 263 <table class="memname"> 264 <tr> 265 <td class="memname">int hx509_validate_cert </td> 266 <td>(</td> 267 <td class="paramtype">hx509_context </td> 268 <td class="paramname"> <em>context</em>, </td> 269 </tr> 270 <tr> 271 <td class="paramkey"></td> 272 <td></td> 273 <td class="paramtype">hx509_validate_ctx </td> 274 <td class="paramname"> <em>ctx</em>, </td> 275 </tr> 276 <tr> 277 <td class="paramkey"></td> 278 <td></td> 279 <td class="paramtype">hx509_cert </td> 280 <td class="paramname"> <em>cert</em></td><td> </td> 281 </tr> 282 <tr> 283 <td></td> 284 <td>)</td> 285 <td></td><td></td><td></td> 286 </tr> 287 </table> 288</div> 289<div class="memdoc"> 290 291<p> 292Validate/Print the status of the certificate.<p> 293<dl compact><dt><b>Parameters:</b></dt><dd> 294 <table border="0" cellspacing="2" cellpadding="0"> 295 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A hx509 context. </td></tr> 296 <tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>A hx509 validation context. </td></tr> 297 <tr><td valign="top"></td><td valign="top"><em>cert</em> </td><td>the cerificate to validate/print.</td></tr> 298 </table> 299</dl> 300<dl class="return" compact><dt><b>Returns:</b></dt><dd>An hx509 error code, see <a class="el" href="group__hx509__error.html#g15791abff76719acb531223fdcbcac87">hx509_get_error_string()</a>. </dd></dl> 301 302</div> 303</div><p> 304<a class="anchor" name="gdfc4c934e63c8c7b10661520de70411e"></a><!-- doxytag: member="print.c::hx509_validate_ctx_add_flags" ref="gdfc4c934e63c8c7b10661520de70411e" args="(hx509_validate_ctx ctx, int flags)" --> 305<div class="memitem"> 306<div class="memproto"> 307 <table class="memname"> 308 <tr> 309 <td class="memname">void hx509_validate_ctx_add_flags </td> 310 <td>(</td> 311 <td class="paramtype">hx509_validate_ctx </td> 312 <td class="paramname"> <em>ctx</em>, </td> 313 </tr> 314 <tr> 315 <td class="paramkey"></td> 316 <td></td> 317 <td class="paramtype">int </td> 318 <td class="paramname"> <em>flags</em></td><td> </td> 319 </tr> 320 <tr> 321 <td></td> 322 <td>)</td> 323 <td></td><td></td><td></td> 324 </tr> 325 </table> 326</div> 327<div class="memdoc"> 328 329<p> 330Add flags to control the behaivor of the <a class="el" href="group__hx509__print.html#g5e3ded9ba5c466a2c6f80b9d233b69c3">hx509_validate_cert()</a> function.<p> 331<dl compact><dt><b>Parameters:</b></dt><dd> 332 <table border="0" cellspacing="2" cellpadding="0"> 333 <tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>A hx509 validation context. </td></tr> 334 <tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td>flags to add to the validation context.</td></tr> 335 </table> 336</dl> 337<dl class="return" compact><dt><b>Returns:</b></dt><dd>An hx509 error code, see <a class="el" href="group__hx509__error.html#g15791abff76719acb531223fdcbcac87">hx509_get_error_string()</a>. </dd></dl> 338 339</div> 340</div><p> 341<a class="anchor" name="g72409ecab29eec94cc0215ed21ecca8e"></a><!-- doxytag: member="print.c::hx509_validate_ctx_free" ref="g72409ecab29eec94cc0215ed21ecca8e" args="(hx509_validate_ctx ctx)" --> 342<div class="memitem"> 343<div class="memproto"> 344 <table class="memname"> 345 <tr> 346 <td class="memname">void hx509_validate_ctx_free </td> 347 <td>(</td> 348 <td class="paramtype">hx509_validate_ctx </td> 349 <td class="paramname"> <em>ctx</em> </td> 350 <td> ) </td> 351 <td></td> 352 </tr> 353 </table> 354</div> 355<div class="memdoc"> 356 357<p> 358Free an hx509 validate context.<p> 359<dl compact><dt><b>Parameters:</b></dt><dd> 360 <table border="0" cellspacing="2" cellpadding="0"> 361 <tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>the hx509 validate context to free. </td></tr> 362 </table> 363</dl> 364 365</div> 366</div><p> 367<a class="anchor" name="g582e93c29a1becbe5c2ac1ac758e09f4"></a><!-- doxytag: member="print.c::hx509_validate_ctx_init" ref="g582e93c29a1becbe5c2ac1ac758e09f4" args="(hx509_context context, hx509_validate_ctx *ctx)" --> 368<div class="memitem"> 369<div class="memproto"> 370 <table class="memname"> 371 <tr> 372 <td class="memname">int hx509_validate_ctx_init </td> 373 <td>(</td> 374 <td class="paramtype">hx509_context </td> 375 <td class="paramname"> <em>context</em>, </td> 376 </tr> 377 <tr> 378 <td class="paramkey"></td> 379 <td></td> 380 <td class="paramtype">hx509_validate_ctx * </td> 381 <td class="paramname"> <em>ctx</em></td><td> </td> 382 </tr> 383 <tr> 384 <td></td> 385 <td>)</td> 386 <td></td><td></td><td></td> 387 </tr> 388 </table> 389</div> 390<div class="memdoc"> 391 392<p> 393Allocate a hx509 validation/printing context.<p> 394<dl compact><dt><b>Parameters:</b></dt><dd> 395 <table border="0" cellspacing="2" cellpadding="0"> 396 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A hx509 context. </td></tr> 397 <tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>a new allocated hx509 validation context, free with <a class="el" href="group__hx509__print.html#g72409ecab29eec94cc0215ed21ecca8e">hx509_validate_ctx_free()</a>.</td></tr> 398 </table> 399</dl> 400<dl class="return" compact><dt><b>Returns:</b></dt><dd>An hx509 error code, see <a class="el" href="group__hx509__error.html#g15791abff76719acb531223fdcbcac87">hx509_get_error_string()</a>. </dd></dl> 401 402</div> 403</div><p> 404<a class="anchor" name="g2fab228a24716340f368fa729b5722b1"></a><!-- doxytag: member="print.c::hx509_validate_ctx_set_print" ref="g2fab228a24716340f368fa729b5722b1" args="(hx509_validate_ctx ctx, hx509_vprint_func func, void *c)" --> 405<div class="memitem"> 406<div class="memproto"> 407 <table class="memname"> 408 <tr> 409 <td class="memname">void hx509_validate_ctx_set_print </td> 410 <td>(</td> 411 <td class="paramtype">hx509_validate_ctx </td> 412 <td class="paramname"> <em>ctx</em>, </td> 413 </tr> 414 <tr> 415 <td class="paramkey"></td> 416 <td></td> 417 <td class="paramtype">hx509_vprint_func </td> 418 <td class="paramname"> <em>func</em>, </td> 419 </tr> 420 <tr> 421 <td class="paramkey"></td> 422 <td></td> 423 <td class="paramtype">void * </td> 424 <td class="paramname"> <em>c</em></td><td> </td> 425 </tr> 426 <tr> 427 <td></td> 428 <td>)</td> 429 <td></td><td></td><td></td> 430 </tr> 431 </table> 432</div> 433<div class="memdoc"> 434 435<p> 436Set the printing functions for the validation context.<p> 437<dl compact><dt><b>Parameters:</b></dt><dd> 438 <table border="0" cellspacing="2" cellpadding="0"> 439 <tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>a hx509 valication context. </td></tr> 440 <tr><td valign="top"></td><td valign="top"><em>func</em> </td><td>the printing function to usea. </td></tr> 441 <tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>the context variable to the printing function.</td></tr> 442 </table> 443</dl> 444<dl class="return" compact><dt><b>Returns:</b></dt><dd>An hx509 error code, see <a class="el" href="group__hx509__error.html#g15791abff76719acb531223fdcbcac87">hx509_get_error_string()</a>. </dd></dl> 445 446</div> 447</div><p> 448</div> 449<hr size="1"><address style="text-align: right;"><small> 450Generated on Wed Jan 11 14:07:41 2012 for Heimdalx509library by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address> 451</body> 452</html> 453