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 error 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 error 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__error.html#g99a2f278c27355d474bc12e5809ae5ff">hx509_clear_error_string</a> (hx509_context context)</td></tr> 26 27<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> 28 29<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> 30 31<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> 32 33<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> 34 35<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> 36 37</table> 38<hr><a name="_details"></a><h2>Detailed Description</h2> 39See the <a class="el" href="page_error.html">Hx509 error reporting functions</a> for description and examples. <hr><h2>Function Documentation</h2> 40<a class="anchor" name="g99a2f278c27355d474bc12e5809ae5ff"></a><!-- doxytag: member="error.c::hx509_clear_error_string" ref="g99a2f278c27355d474bc12e5809ae5ff" args="(hx509_context context)" --> 41<div class="memitem"> 42<div class="memproto"> 43 <table class="memname"> 44 <tr> 45 <td class="memname">void hx509_clear_error_string </td> 46 <td>(</td> 47 <td class="paramtype">hx509_context </td> 48 <td class="paramname"> <em>context</em> </td> 49 <td> ) </td> 50 <td></td> 51 </tr> 52 </table> 53</div> 54<div class="memdoc"> 55 56<p> 57Resets the error strings the hx509 context.<p> 58<dl compact><dt><b>Parameters:</b></dt><dd> 59 <table border="0" cellspacing="2" cellpadding="0"> 60 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A hx509 context. </td></tr> 61 </table> 62</dl> 63 64</div> 65</div><p> 66<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,...)" --> 67<div class="memitem"> 68<div class="memproto"> 69 <table class="memname"> 70 <tr> 71 <td class="memname">void hx509_err </td> 72 <td>(</td> 73 <td class="paramtype">hx509_context </td> 74 <td class="paramname"> <em>context</em>, </td> 75 </tr> 76 <tr> 77 <td class="paramkey"></td> 78 <td></td> 79 <td class="paramtype">int </td> 80 <td class="paramname"> <em>exit_code</em>, </td> 81 </tr> 82 <tr> 83 <td class="paramkey"></td> 84 <td></td> 85 <td class="paramtype">int </td> 86 <td class="paramname"> <em>error_code</em>, </td> 87 </tr> 88 <tr> 89 <td class="paramkey"></td> 90 <td></td> 91 <td class="paramtype">const char * </td> 92 <td class="paramname"> <em>fmt</em>, </td> 93 </tr> 94 <tr> 95 <td class="paramkey"></td> 96 <td></td> 97 <td class="paramtype"> </td> 98 <td class="paramname"> <em>...</em></td><td> </td> 99 </tr> 100 <tr> 101 <td></td> 102 <td>)</td> 103 <td></td><td></td><td></td> 104 </tr> 105 </table> 106</div> 107<div class="memdoc"> 108 109<p> 110Print error message and fatally exit from error code<p> 111<dl compact><dt><b>Parameters:</b></dt><dd> 112 <table border="0" cellspacing="2" cellpadding="0"> 113 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A hx509 context. </td></tr> 114 <tr><td valign="top"></td><td valign="top"><em>exit_code</em> </td><td>exit() code from process. </td></tr> 115 <tr><td valign="top"></td><td valign="top"><em>error_code</em> </td><td>Error code for the reason to exit. </td></tr> 116 <tr><td valign="top"></td><td valign="top"><em>fmt</em> </td><td>format string with the exit message. </td></tr> 117 <tr><td valign="top"></td><td valign="top"><em>...</em> </td><td>argument to format string. </td></tr> 118 </table> 119</dl> 120 121</div> 122</div><p> 123<a class="anchor" name="gdd65f91b64ae79e6540708b9ab322992"></a><!-- doxytag: member="error.c::hx509_free_error_string" ref="gdd65f91b64ae79e6540708b9ab322992" args="(char *str)" --> 124<div class="memitem"> 125<div class="memproto"> 126 <table class="memname"> 127 <tr> 128 <td class="memname">void hx509_free_error_string </td> 129 <td>(</td> 130 <td class="paramtype">char * </td> 131 <td class="paramname"> <em>str</em> </td> 132 <td> ) </td> 133 <td></td> 134 </tr> 135 </table> 136</div> 137<div class="memdoc"> 138 139<p> 140Free error string returned by <a class="el" href="group__hx509__error.html#g15791abff76719acb531223fdcbcac87">hx509_get_error_string()</a>.<p> 141<dl compact><dt><b>Parameters:</b></dt><dd> 142 <table border="0" cellspacing="2" cellpadding="0"> 143 <tr><td valign="top"></td><td valign="top"><em>str</em> </td><td>error string to free. </td></tr> 144 </table> 145</dl> 146 147</div> 148</div><p> 149<a class="anchor" name="g15791abff76719acb531223fdcbcac87"></a><!-- doxytag: member="error.c::hx509_get_error_string" ref="g15791abff76719acb531223fdcbcac87" args="(hx509_context context, int error_code)" --> 150<div class="memitem"> 151<div class="memproto"> 152 <table class="memname"> 153 <tr> 154 <td class="memname">char* hx509_get_error_string </td> 155 <td>(</td> 156 <td class="paramtype">hx509_context </td> 157 <td class="paramname"> <em>context</em>, </td> 158 </tr> 159 <tr> 160 <td class="paramkey"></td> 161 <td></td> 162 <td class="paramtype">int </td> 163 <td class="paramname"> <em>error_code</em></td><td> </td> 164 </tr> 165 <tr> 166 <td></td> 167 <td>)</td> 168 <td></td><td></td><td></td> 169 </tr> 170 </table> 171</div> 172<div class="memdoc"> 173 174<p> 175Get an error string from context associated with error_code.<p> 176<dl compact><dt><b>Parameters:</b></dt><dd> 177 <table border="0" cellspacing="2" cellpadding="0"> 178 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A hx509 context. </td></tr> 179 <tr><td valign="top"></td><td valign="top"><em>error_code</em> </td><td>Get error message for this error code.</td></tr> 180 </table> 181</dl> 182<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> 183 184</div> 185</div><p> 186<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,...)" --> 187<div class="memitem"> 188<div class="memproto"> 189 <table class="memname"> 190 <tr> 191 <td class="memname">void hx509_set_error_string </td> 192 <td>(</td> 193 <td class="paramtype">hx509_context </td> 194 <td class="paramname"> <em>context</em>, </td> 195 </tr> 196 <tr> 197 <td class="paramkey"></td> 198 <td></td> 199 <td class="paramtype">int </td> 200 <td class="paramname"> <em>flags</em>, </td> 201 </tr> 202 <tr> 203 <td class="paramkey"></td> 204 <td></td> 205 <td class="paramtype">int </td> 206 <td class="paramname"> <em>code</em>, </td> 207 </tr> 208 <tr> 209 <td class="paramkey"></td> 210 <td></td> 211 <td class="paramtype">const char * </td> 212 <td class="paramname"> <em>fmt</em>, </td> 213 </tr> 214 <tr> 215 <td class="paramkey"></td> 216 <td></td> 217 <td class="paramtype"> </td> 218 <td class="paramname"> <em>...</em></td><td> </td> 219 </tr> 220 <tr> 221 <td></td> 222 <td>)</td> 223 <td></td><td></td><td></td> 224 </tr> 225 </table> 226</div> 227<div class="memdoc"> 228 229<p> 230See <a class="el" href="group__hx509__error.html#g4d3505a920021f838cab2228cd197e3d">hx509_set_error_stringv()</a>.<p> 231<dl compact><dt><b>Parameters:</b></dt><dd> 232 <table border="0" cellspacing="2" cellpadding="0"> 233 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A hx509 context. </td></tr> 234 <tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td><ul> 235<li>HX509_ERROR_APPEND appends the error string to the old messages (code is updated). </li></ul> 236</td></tr> 237 <tr><td valign="top"></td><td valign="top"><em>code</em> </td><td>error code related to error message </td></tr> 238 <tr><td valign="top"></td><td valign="top"><em>fmt</em> </td><td>error message format </td></tr> 239 <tr><td valign="top"></td><td valign="top"><em>...</em> </td><td>arguments to error message format </td></tr> 240 </table> 241</dl> 242 243</div> 244</div><p> 245<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)" --> 246<div class="memitem"> 247<div class="memproto"> 248 <table class="memname"> 249 <tr> 250 <td class="memname">void hx509_set_error_stringv </td> 251 <td>(</td> 252 <td class="paramtype">hx509_context </td> 253 <td class="paramname"> <em>context</em>, </td> 254 </tr> 255 <tr> 256 <td class="paramkey"></td> 257 <td></td> 258 <td class="paramtype">int </td> 259 <td class="paramname"> <em>flags</em>, </td> 260 </tr> 261 <tr> 262 <td class="paramkey"></td> 263 <td></td> 264 <td class="paramtype">int </td> 265 <td class="paramname"> <em>code</em>, </td> 266 </tr> 267 <tr> 268 <td class="paramkey"></td> 269 <td></td> 270 <td class="paramtype">const char * </td> 271 <td class="paramname"> <em>fmt</em>, </td> 272 </tr> 273 <tr> 274 <td class="paramkey"></td> 275 <td></td> 276 <td class="paramtype">va_list </td> 277 <td class="paramname"> <em>ap</em></td><td> </td> 278 </tr> 279 <tr> 280 <td></td> 281 <td>)</td> 282 <td></td><td></td><td></td> 283 </tr> 284 </table> 285</div> 286<div class="memdoc"> 287 288<p> 289Add an error message to the hx509 context.<p> 290<dl compact><dt><b>Parameters:</b></dt><dd> 291 <table border="0" cellspacing="2" cellpadding="0"> 292 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A hx509 context. </td></tr> 293 <tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td><ul> 294<li>HX509_ERROR_APPEND appends the error string to the old messages (code is updated). </li></ul> 295</td></tr> 296 <tr><td valign="top"></td><td valign="top"><em>code</em> </td><td>error code related to error message </td></tr> 297 <tr><td valign="top"></td><td valign="top"><em>fmt</em> </td><td>error message format </td></tr> 298 <tr><td valign="top"></td><td valign="top"><em>ap</em> </td><td>arguments to error message format </td></tr> 299 </table> 300</dl> 301 302</div> 303</div><p> 304</div> 305<hr size="1"><address style="text-align: right;"><small> 306Generated 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> 307</body> 308</html> 309