<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Heimdalx509library: hx509 printing functions</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<p>
<a href="http://www.h5l.org/"><img src="http://www.h5l.org/keyhole-heimdal.png" alt="keyhole logo"/></a>
</p>
<!-- end of header marker -->
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>hx509 printing functions</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<hr><h2>Function Documentation</h2>
<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)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void hx509_bitstring_print </td>
<td>(</td>
<td class="paramtype">const heim_bit_string * </td>
<td class="paramname"> <em>b</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hx509_vprint_func </td>
<td class="paramname"> <em>func</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>ctx</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Print 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>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>b</em> </td><td>bit string to print. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>func</em> </td><td>hx509_vprint_func to print with. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>context variable to hx509_vprint_func function. </td></tr>
</table>
</dl>
</div>
</div><p>
<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)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int hx509_cert_keyusage_print </td>
<td>(</td>
<td class="paramtype">hx509_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hx509_cert </td>
<td class="paramname"> <em>c</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char ** </td>
<td class="paramname"> <em>s</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Print certificate usage for a certificate to a string.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A hx509 context. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>a certificate print the keyusage for. </td></tr>
<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>
</table>
</dl>
<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>
</div>
</div><p>
<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)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void hx509_oid_print </td>
<td>(</td>
<td class="paramtype">const heim_oid * </td>
<td class="paramname"> <em>oid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hx509_vprint_func </td>
<td class="paramname"> <em>func</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>ctx</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Print 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>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>oid</em> </td><td>oid to print </td></tr>
<tr><td valign="top"></td><td valign="top"><em>func</em> </td><td>hx509_vprint_func to print with. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>context variable to hx509_vprint_func function. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="gc116d19332498d183eb055452d682d81"></a><!-- doxytag: member="print.c::hx509_oid_sprint" ref="gc116d19332498d183eb055452d682d81" args="(const heim_oid *oid, char **str)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int hx509_oid_sprint </td>
<td>(</td>
<td class="paramtype">const heim_oid * </td>
<td class="paramname"> <em>oid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char ** </td>
<td class="paramname"> <em>str</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Print a oid to a string.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>oid</em> </td><td>oid to print </td></tr>
<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>
</table>
</dl>
<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>
</div>
</div><p>
<a class="anchor" name="ge27c328d203e88c87cf81b6eb1d1fe66"></a><!-- doxytag: member="print.c::hx509_print_stdout" ref="ge27c328d203e88c87cf81b6eb1d1fe66" args="(void *ctx, const char *fmt, va_list va)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void hx509_print_stdout </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>ctx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>fmt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">va_list </td>
<td class="paramname"> <em>va</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Helper function to print on stdout for:<ul>
<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>
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<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>
<tr><td valign="top"></td><td valign="top"><em>fmt</em> </td><td>the printing format. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>va</em> </td><td>the argumet list. </td></tr>
</table>
</dl>
</div>
</div><p>
<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)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int hx509_validate_cert </td>
<td>(</td>
<td class="paramtype">hx509_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hx509_validate_ctx </td>
<td class="paramname"> <em>ctx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hx509_cert </td>
<td class="paramname"> <em>cert</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Validate/Print the status of the certificate.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A hx509 context. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>A hx509 validation context. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>cert</em> </td><td>the cerificate to validate/print.</td></tr>
</table>
</dl>
<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>
</div>
</div><p>
<a class="anchor" name="gdfc4c934e63c8c7b10661520de70411e"></a><!-- doxytag: member="print.c::hx509_validate_ctx_add_flags" ref="gdfc4c934e63c8c7b10661520de70411e" args="(hx509_validate_ctx ctx, int flags)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void hx509_validate_ctx_add_flags </td>
<td>(</td>
<td class="paramtype">hx509_validate_ctx </td>
<td class="paramname"> <em>ctx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>flags</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Add flags to control the behaivor of the <a class="el" href="group__hx509__print.html#g5e3ded9ba5c466a2c6f80b9d233b69c3">hx509_validate_cert()</a> function.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>A hx509 validation context. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td>flags to add to the validation context.</td></tr>
</table>
</dl>
<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>
</div>
</div><p>
<a class="anchor" name="g72409ecab29eec94cc0215ed21ecca8e"></a><!-- doxytag: member="print.c::hx509_validate_ctx_free" ref="g72409ecab29eec94cc0215ed21ecca8e" args="(hx509_validate_ctx ctx)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void hx509_validate_ctx_free </td>
<td>(</td>
<td class="paramtype">hx509_validate_ctx </td>
<td class="paramname"> <em>ctx</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Free an hx509 validate context.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>the hx509 validate context to free. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="g582e93c29a1becbe5c2ac1ac758e09f4"></a><!-- doxytag: member="print.c::hx509_validate_ctx_init" ref="g582e93c29a1becbe5c2ac1ac758e09f4" args="(hx509_context context, hx509_validate_ctx *ctx)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int hx509_validate_ctx_init </td>
<td>(</td>
<td class="paramtype">hx509_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hx509_validate_ctx * </td>
<td class="paramname"> <em>ctx</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Allocate a hx509 validation/printing context.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A hx509 context. </td></tr>
<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>
</table>
</dl>
<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>
</div>
</div><p>
<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)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void hx509_validate_ctx_set_print </td>
<td>(</td>
<td class="paramtype">hx509_validate_ctx </td>
<td class="paramname"> <em>ctx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hx509_vprint_func </td>
<td class="paramname"> <em>func</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>c</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the printing functions for the validation context.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>a hx509 valication context. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>func</em> </td><td>the printing function to usea. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>the context variable to the printing function.</td></tr>
</table>
</dl>
<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>
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>
Generated 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>
</body>
</html>