<!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 error 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 error 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__error.html#g99a2f278c27355d474bc12e5809ae5ff">hx509_clear_error_string</a> (hx509_context context)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__error.html#g4d3505a920021f838cab2228cd197e3d">hx509_set_error_stringv</a> (hx509_context context, int flags, int code, const char *fmt, va_list ap)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__error.html#gd9d4e6e56d2baef65f8c05ee53d6c198">hx509_set_error_string</a> (hx509_context context, int flags, int code, const char *fmt,...)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__error.html#g15791abff76719acb531223fdcbcac87">hx509_get_error_string</a> (hx509_context context, int error_code)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hx509__error.html#gdd65f91b64ae79e6540708b9ab322992">hx509_free_error_string</a> (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__error.html#g992270111a54a73af9f96216eb548aa4">hx509_err</a> (hx509_context context, int exit_code, int error_code, const char *fmt,...)</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
See the <a class="el" href="page_error.html">Hx509 error reporting functions</a> for description and examples. <hr><h2>Function Documentation</h2>
<a class="anchor" name="g99a2f278c27355d474bc12e5809ae5ff"></a><!-- doxytag: member="error.c::hx509_clear_error_string" ref="g99a2f278c27355d474bc12e5809ae5ff" args="(hx509_context context)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void hx509_clear_error_string </td>
<td>(</td>
<td class="paramtype">hx509_context </td>
<td class="paramname"> <em>context</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Resets the error strings the hx509 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>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="g992270111a54a73af9f96216eb548aa4"></a><!-- doxytag: member="error.c::hx509_err" ref="g992270111a54a73af9f96216eb548aa4" args="(hx509_context context, int exit_code, int error_code, const char *fmt,...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void hx509_err </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">int </td>
<td class="paramname"> <em>exit_code</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>error_code</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"> </td>
<td class="paramname"> <em>...</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Print error message and fatally exit from error code<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>exit_code</em> </td><td>exit() code from process. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>error_code</em> </td><td>Error code for the reason to exit. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>fmt</em> </td><td>format string with the exit message. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>...</em> </td><td>argument to format string. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="gdd65f91b64ae79e6540708b9ab322992"></a><!-- doxytag: member="error.c::hx509_free_error_string" ref="gdd65f91b64ae79e6540708b9ab322992" args="(char *str)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void hx509_free_error_string </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"> <em>str</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Free error string returned by <a class="el" href="group__hx509__error.html#g15791abff76719acb531223fdcbcac87">hx509_get_error_string()</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>str</em> </td><td>error string to free. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="g15791abff76719acb531223fdcbcac87"></a><!-- doxytag: member="error.c::hx509_get_error_string" ref="g15791abff76719acb531223fdcbcac87" args="(hx509_context context, int error_code)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* hx509_get_error_string </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">int </td>
<td class="paramname"> <em>error_code</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get an error string from context associated with error_code.<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>error_code</em> </td><td>Get error message for this error code.</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>error string, free with <a class="el" href="group__hx509__error.html#gdd65f91b64ae79e6540708b9ab322992">hx509_free_error_string()</a>. </dd></dl>
</div>
</div><p>
<a class="anchor" name="gd9d4e6e56d2baef65f8c05ee53d6c198"></a><!-- doxytag: member="error.c::hx509_set_error_string" ref="gd9d4e6e56d2baef65f8c05ee53d6c198" args="(hx509_context context, int flags, int code, const char *fmt,...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void hx509_set_error_string </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">int </td>
<td class="paramname"> <em>flags</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>code</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"> </td>
<td class="paramname"> <em>...</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
See <a class="el" href="group__hx509__error.html#g4d3505a920021f838cab2228cd197e3d">hx509_set_error_stringv()</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>context</em> </td><td>A hx509 context. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td><ul>
<li>HX509_ERROR_APPEND appends the error string to the old messages (code is updated). </li></ul>
</td></tr>
<tr><td valign="top"></td><td valign="top"><em>code</em> </td><td>error code related to error message </td></tr>
<tr><td valign="top"></td><td valign="top"><em>fmt</em> </td><td>error message format </td></tr>
<tr><td valign="top"></td><td valign="top"><em>...</em> </td><td>arguments to error message format </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="g4d3505a920021f838cab2228cd197e3d"></a><!-- doxytag: member="error.c::hx509_set_error_stringv" ref="g4d3505a920021f838cab2228cd197e3d" args="(hx509_context context, int flags, int code, const char *fmt, va_list ap)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void hx509_set_error_stringv </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">int </td>
<td class="paramname"> <em>flags</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>code</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>ap</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Add an error message to the hx509 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>flags</em> </td><td><ul>
<li>HX509_ERROR_APPEND appends the error string to the old messages (code is updated). </li></ul>
</td></tr>
<tr><td valign="top"></td><td valign="top"><em>code</em> </td><td>error code related to error message </td></tr>
<tr><td valign="top"></td><td valign="top"><em>fmt</em> </td><td>error message format </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ap</em> </td><td>arguments to error message format </td></tr>
</table>
</dl>
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>
Generated on Wed Jan 11 14:07:40 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>