1226031Sstas<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2226031Sstas<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 3226031Sstas<title>HeimdalKerberos5library: Heimdal Kerberos 5 authentication functions</title> 4226031Sstas<link href="doxygen.css" rel="stylesheet" type="text/css"> 5226031Sstas<link href="tabs.css" rel="stylesheet" type="text/css"> 6226031Sstas</head><body> 7226031Sstas<p> 8226031Sstas<a href="http://www.h5l.org/"><img src="http://www.h5l.org/keyhole-heimdal.png" alt="keyhole logo"/></a> 9226031Sstas</p> 10226031Sstas<!-- end of header marker --> 11226031Sstas<!-- Generated by Doxygen 1.5.6 --> 12226031Sstas<div class="navigation" id="top"> 13226031Sstas <div class="tabs"> 14226031Sstas <ul> 15226031Sstas <li><a href="index.html"><span>Main Page</span></a></li> 16226031Sstas <li><a href="pages.html"><span>Related Pages</span></a></li> 17226031Sstas <li><a href="modules.html"><span>Modules</span></a></li> 18226031Sstas <li><a href="annotated.html"><span>Data Structures</span></a></li> 19226031Sstas </ul> 20226031Sstas </div> 21226031Sstas</div> 22226031Sstas<div class="contents"> 23226031Sstas<h1>Heimdal Kerberos 5 authentication functions</h1><table border="0" cellpadding="0" cellspacing="0"> 24226031Sstas<tr><td></td></tr> 25226031Sstas<tr><td colspan="2"><br><h2>Functions</h2></td></tr> 26226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 27226031Sstaskrb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__auth.html#g92b082fa699694b353fa51675f2c2259">krb5_rd_req_in_ctx_alloc</a> (krb5_context context, krb5_rd_req_in_ctx *ctx)</td></tr> 28226031Sstas 29226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 30226031Sstaskrb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__auth.html#g124150b9eea8b56a9b432cf5e7a8db07">krb5_rd_req_in_set_keytab</a> (krb5_context context, krb5_rd_req_in_ctx in, krb5_keytab keytab)</td></tr> 31226031Sstas 32226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 33226031Sstaskrb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__auth.html#gdd6913bc77982a536168d9dd52df2363">krb5_rd_req_in_set_pac_check</a> (krb5_context context, krb5_rd_req_in_ctx in, krb5_boolean flag)</td></tr> 34226031Sstas 35226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 36226031Sstaskrb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__auth.html#gc1ffffee7558466d31c23b110c95aa7b">krb5_rd_req_out_get_server</a> (krb5_context context, krb5_rd_req_out_ctx out, krb5_principal *principal)</td></tr> 37226031Sstas 38226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION void <br> 39226031SstasKRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__auth.html#gd8a5460c599500c0d64e632341c8f74a">krb5_rd_req_out_ctx_free</a> (krb5_context context, krb5_rd_req_out_ctx ctx)</td></tr> 40226031Sstas 41226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 42226031Sstaskrb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__auth.html#g589cab7251a70a5addbf1af56313401e">krb5_rd_req_ctx</a> (krb5_context context, krb5_auth_context *auth_context, const krb5_data *inbuf, krb5_const_principal server, krb5_rd_req_in_ctx inctx, krb5_rd_req_out_ctx *outctx)</td></tr> 43226031Sstas 44226031Sstas</table> 45226031Sstas<hr><a name="_details"></a><h2>Detailed Description</h2> 46226031Sstas<hr><h2>Function Documentation</h2> 47226031Sstas<a class="anchor" name="g589cab7251a70a5addbf1af56313401e"></a><!-- doxytag: member="rd_req.c::krb5_rd_req_ctx" ref="g589cab7251a70a5addbf1af56313401e" args="(krb5_context context, krb5_auth_context *auth_context, const krb5_data *inbuf, krb5_const_principal server, krb5_rd_req_in_ctx inctx, krb5_rd_req_out_ctx *outctx)" --> 48226031Sstas<div class="memitem"> 49226031Sstas<div class="memproto"> 50226031Sstas <table class="memname"> 51226031Sstas <tr> 52226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_ctx </td> 53226031Sstas <td>(</td> 54226031Sstas <td class="paramtype">krb5_context </td> 55226031Sstas <td class="paramname"> <em>context</em>, </td> 56226031Sstas </tr> 57226031Sstas <tr> 58226031Sstas <td class="paramkey"></td> 59226031Sstas <td></td> 60226031Sstas <td class="paramtype">krb5_auth_context * </td> 61226031Sstas <td class="paramname"> <em>auth_context</em>, </td> 62226031Sstas </tr> 63226031Sstas <tr> 64226031Sstas <td class="paramkey"></td> 65226031Sstas <td></td> 66226031Sstas <td class="paramtype">const krb5_data * </td> 67226031Sstas <td class="paramname"> <em>inbuf</em>, </td> 68226031Sstas </tr> 69226031Sstas <tr> 70226031Sstas <td class="paramkey"></td> 71226031Sstas <td></td> 72226031Sstas <td class="paramtype">krb5_const_principal </td> 73226031Sstas <td class="paramname"> <em>server</em>, </td> 74226031Sstas </tr> 75226031Sstas <tr> 76226031Sstas <td class="paramkey"></td> 77226031Sstas <td></td> 78226031Sstas <td class="paramtype">krb5_rd_req_in_ctx </td> 79226031Sstas <td class="paramname"> <em>inctx</em>, </td> 80226031Sstas </tr> 81226031Sstas <tr> 82226031Sstas <td class="paramkey"></td> 83226031Sstas <td></td> 84226031Sstas <td class="paramtype">krb5_rd_req_out_ctx * </td> 85226031Sstas <td class="paramname"> <em>outctx</em></td><td> </td> 86226031Sstas </tr> 87226031Sstas <tr> 88226031Sstas <td></td> 89226031Sstas <td>)</td> 90226031Sstas <td></td><td></td><td></td> 91226031Sstas </tr> 92226031Sstas </table> 93226031Sstas</div> 94226031Sstas<div class="memdoc"> 95226031Sstas 96226031Sstas<p> 97226031SstasThe core server function that verify application authentication requests from clients.<p> 98226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 99226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 100226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Keberos 5 context. </td></tr> 101226031Sstas <tr><td valign="top"></td><td valign="top"><em>auth_context</em> </td><td>the authentication context, can be NULL, then default values for the authentication context will used. </td></tr> 102226031Sstas <tr><td valign="top"></td><td valign="top"><em>inbuf</em> </td><td>the (AP-REQ) authentication buffer</td></tr> 103226031Sstas <tr><td valign="top"></td><td valign="top"><em>server</em> </td><td>the server with authenticate as, if NULL the function will try to find any available credential in the keytab that will verify the reply. The function will prefer the server the server client specified in the AP-REQ, but if there is no mach, it will try all keytab entries for a match. This have serious performance issues for larger keytabs.</td></tr> 104226031Sstas <tr><td valign="top"></td><td valign="top"><em>inctx</em> </td><td>control the behavior of the function, if NULL, the default behavior is used. </td></tr> 105226031Sstas <tr><td valign="top"></td><td valign="top"><em>outctx</em> </td><td>the return outctx, free with <a class="el" href="group__krb5__auth.html#gd8a5460c599500c0d64e632341c8f74a">krb5_rd_req_out_ctx_free()</a>. </td></tr> 106226031Sstas </table> 107226031Sstas</dl> 108226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Kerberos 5 error code, see krb5_get_error_message(). </dd></dl> 109226031Sstas 110226031Sstas</div> 111226031Sstas</div><p> 112226031Sstas<a class="anchor" name="g92b082fa699694b353fa51675f2c2259"></a><!-- doxytag: member="rd_req.c::krb5_rd_req_in_ctx_alloc" ref="g92b082fa699694b353fa51675f2c2259" args="(krb5_context context, krb5_rd_req_in_ctx *ctx)" --> 113226031Sstas<div class="memitem"> 114226031Sstas<div class="memproto"> 115226031Sstas <table class="memname"> 116226031Sstas <tr> 117226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_in_ctx_alloc </td> 118226031Sstas <td>(</td> 119226031Sstas <td class="paramtype">krb5_context </td> 120226031Sstas <td class="paramname"> <em>context</em>, </td> 121226031Sstas </tr> 122226031Sstas <tr> 123226031Sstas <td class="paramkey"></td> 124226031Sstas <td></td> 125226031Sstas <td class="paramtype">krb5_rd_req_in_ctx * </td> 126226031Sstas <td class="paramname"> <em>ctx</em></td><td> </td> 127226031Sstas </tr> 128226031Sstas <tr> 129226031Sstas <td></td> 130226031Sstas <td>)</td> 131226031Sstas <td></td><td></td><td></td> 132226031Sstas </tr> 133226031Sstas </table> 134226031Sstas</div> 135226031Sstas<div class="memdoc"> 136226031Sstas 137226031Sstas<p> 138226031SstasAllocate a krb5_rd_req_in_ctx as an input parameter to <a class="el" href="group__krb5__auth.html#g589cab7251a70a5addbf1af56313401e">krb5_rd_req_ctx()</a>. The caller should free the context with krb5_rd_req_in_ctx_free() when done with the context.<p> 139226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 140226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 141226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Keberos 5 context. </td></tr> 142226031Sstas <tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>in ctx to <a class="el" href="group__krb5__auth.html#g589cab7251a70a5addbf1af56313401e">krb5_rd_req_ctx()</a>.</td></tr> 143226031Sstas </table> 144226031Sstas</dl> 145226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Kerberos 5 error code, see krb5_get_error_message(). </dd></dl> 146226031Sstas 147226031Sstas</div> 148226031Sstas</div><p> 149226031Sstas<a class="anchor" name="g124150b9eea8b56a9b432cf5e7a8db07"></a><!-- doxytag: member="rd_req.c::krb5_rd_req_in_set_keytab" ref="g124150b9eea8b56a9b432cf5e7a8db07" args="(krb5_context context, krb5_rd_req_in_ctx in, krb5_keytab keytab)" --> 150226031Sstas<div class="memitem"> 151226031Sstas<div class="memproto"> 152226031Sstas <table class="memname"> 153226031Sstas <tr> 154226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_in_set_keytab </td> 155226031Sstas <td>(</td> 156226031Sstas <td class="paramtype">krb5_context </td> 157226031Sstas <td class="paramname"> <em>context</em>, </td> 158226031Sstas </tr> 159226031Sstas <tr> 160226031Sstas <td class="paramkey"></td> 161226031Sstas <td></td> 162226031Sstas <td class="paramtype">krb5_rd_req_in_ctx </td> 163226031Sstas <td class="paramname"> <em>in</em>, </td> 164226031Sstas </tr> 165226031Sstas <tr> 166226031Sstas <td class="paramkey"></td> 167226031Sstas <td></td> 168226031Sstas <td class="paramtype">krb5_keytab </td> 169226031Sstas <td class="paramname"> <em>keytab</em></td><td> </td> 170226031Sstas </tr> 171226031Sstas <tr> 172226031Sstas <td></td> 173226031Sstas <td>)</td> 174226031Sstas <td></td><td></td><td></td> 175226031Sstas </tr> 176226031Sstas </table> 177226031Sstas</div> 178226031Sstas<div class="memdoc"> 179226031Sstas 180226031Sstas<p> 181226031SstasSet the keytab that <a class="el" href="group__krb5__auth.html#g589cab7251a70a5addbf1af56313401e">krb5_rd_req_ctx()</a> will use.<p> 182226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 183226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 184226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Keberos 5 context. </td></tr> 185226031Sstas <tr><td valign="top"></td><td valign="top"><em>in</em> </td><td>in ctx to <a class="el" href="group__krb5__auth.html#g589cab7251a70a5addbf1af56313401e">krb5_rd_req_ctx()</a>. </td></tr> 186226031Sstas <tr><td valign="top"></td><td valign="top"><em>keytab</em> </td><td>keytab that <a class="el" href="group__krb5__auth.html#g589cab7251a70a5addbf1af56313401e">krb5_rd_req_ctx()</a> will use, only copy the pointer, so the caller must free they keytab after krb5_rd_req_in_ctx_free() is called.</td></tr> 187226031Sstas </table> 188226031Sstas</dl> 189226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Kerberos 5 error code, see krb5_get_error_message(). </dd></dl> 190226031Sstas 191226031Sstas</div> 192226031Sstas</div><p> 193226031Sstas<a class="anchor" name="gdd6913bc77982a536168d9dd52df2363"></a><!-- doxytag: member="rd_req.c::krb5_rd_req_in_set_pac_check" ref="gdd6913bc77982a536168d9dd52df2363" args="(krb5_context context, krb5_rd_req_in_ctx in, krb5_boolean flag)" --> 194226031Sstas<div class="memitem"> 195226031Sstas<div class="memproto"> 196226031Sstas <table class="memname"> 197226031Sstas <tr> 198226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_in_set_pac_check </td> 199226031Sstas <td>(</td> 200226031Sstas <td class="paramtype">krb5_context </td> 201226031Sstas <td class="paramname"> <em>context</em>, </td> 202226031Sstas </tr> 203226031Sstas <tr> 204226031Sstas <td class="paramkey"></td> 205226031Sstas <td></td> 206226031Sstas <td class="paramtype">krb5_rd_req_in_ctx </td> 207226031Sstas <td class="paramname"> <em>in</em>, </td> 208226031Sstas </tr> 209226031Sstas <tr> 210226031Sstas <td class="paramkey"></td> 211226031Sstas <td></td> 212226031Sstas <td class="paramtype">krb5_boolean </td> 213226031Sstas <td class="paramname"> <em>flag</em></td><td> </td> 214226031Sstas </tr> 215226031Sstas <tr> 216226031Sstas <td></td> 217226031Sstas <td>)</td> 218226031Sstas <td></td><td></td><td></td> 219226031Sstas </tr> 220226031Sstas </table> 221226031Sstas</div> 222226031Sstas<div class="memdoc"> 223226031Sstas 224226031Sstas<p> 225226031SstasSet if krb5_rq_red() is going to check the Windows PAC or not<p> 226226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 227226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 228226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Keberos 5 context. </td></tr> 229226031Sstas <tr><td valign="top"></td><td valign="top"><em>in</em> </td><td>krb5_rd_req_in_ctx to check the option on. </td></tr> 230226031Sstas <tr><td valign="top"></td><td valign="top"><em>flag</em> </td><td>flag to select if to check the pac (TRUE) or not (FALSE).</td></tr> 231226031Sstas </table> 232226031Sstas</dl> 233226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Kerberos 5 error code, see krb5_get_error_message(). </dd></dl> 234226031Sstas 235226031Sstas</div> 236226031Sstas</div><p> 237226031Sstas<a class="anchor" name="gd8a5460c599500c0d64e632341c8f74a"></a><!-- doxytag: member="rd_req.c::krb5_rd_req_out_ctx_free" ref="gd8a5460c599500c0d64e632341c8f74a" args="(krb5_context context, krb5_rd_req_out_ctx ctx)" --> 238226031Sstas<div class="memitem"> 239226031Sstas<div class="memproto"> 240226031Sstas <table class="memname"> 241226031Sstas <tr> 242226031Sstas <td class="memname">KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_rd_req_out_ctx_free </td> 243226031Sstas <td>(</td> 244226031Sstas <td class="paramtype">krb5_context </td> 245226031Sstas <td class="paramname"> <em>context</em>, </td> 246226031Sstas </tr> 247226031Sstas <tr> 248226031Sstas <td class="paramkey"></td> 249226031Sstas <td></td> 250226031Sstas <td class="paramtype">krb5_rd_req_out_ctx </td> 251226031Sstas <td class="paramname"> <em>ctx</em></td><td> </td> 252226031Sstas </tr> 253226031Sstas <tr> 254226031Sstas <td></td> 255226031Sstas <td>)</td> 256226031Sstas <td></td><td></td><td></td> 257226031Sstas </tr> 258226031Sstas </table> 259226031Sstas</div> 260226031Sstas<div class="memdoc"> 261226031Sstas 262226031Sstas<p> 263226031SstasFree the krb5_rd_req_out_ctx.<p> 264226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 265226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 266226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Keberos 5 context. </td></tr> 267226031Sstas <tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>krb5_rd_req_out_ctx context to free. </td></tr> 268226031Sstas </table> 269226031Sstas</dl> 270226031Sstas 271226031Sstas</div> 272226031Sstas</div><p> 273226031Sstas<a class="anchor" name="gc1ffffee7558466d31c23b110c95aa7b"></a><!-- doxytag: member="rd_req.c::krb5_rd_req_out_get_server" ref="gc1ffffee7558466d31c23b110c95aa7b" args="(krb5_context context, krb5_rd_req_out_ctx out, krb5_principal *principal)" --> 274226031Sstas<div class="memitem"> 275226031Sstas<div class="memproto"> 276226031Sstas <table class="memname"> 277226031Sstas <tr> 278226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_out_get_server </td> 279226031Sstas <td>(</td> 280226031Sstas <td class="paramtype">krb5_context </td> 281226031Sstas <td class="paramname"> <em>context</em>, </td> 282226031Sstas </tr> 283226031Sstas <tr> 284226031Sstas <td class="paramkey"></td> 285226031Sstas <td></td> 286226031Sstas <td class="paramtype">krb5_rd_req_out_ctx </td> 287226031Sstas <td class="paramname"> <em>out</em>, </td> 288226031Sstas </tr> 289226031Sstas <tr> 290226031Sstas <td class="paramkey"></td> 291226031Sstas <td></td> 292226031Sstas <td class="paramtype">krb5_principal * </td> 293226031Sstas <td class="paramname"> <em>principal</em></td><td> </td> 294226031Sstas </tr> 295226031Sstas <tr> 296226031Sstas <td></td> 297226031Sstas <td>)</td> 298226031Sstas <td></td><td></td><td></td> 299226031Sstas </tr> 300226031Sstas </table> 301226031Sstas</div> 302226031Sstas<div class="memdoc"> 303226031Sstas 304226031Sstas<p> 305226031SstasGet the principal that was used in the request from the client. Might not match whats in the ticket if <a class="el" href="group__krb5__auth.html#g589cab7251a70a5addbf1af56313401e">krb5_rd_req_ctx()</a> searched in the keytab for a matching key.<p> 306226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 307226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 308226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>a Kerberos 5 context. </td></tr> 309226031Sstas <tr><td valign="top"></td><td valign="top"><em>out</em> </td><td>a krb5_rd_req_out_ctx from <a class="el" href="group__krb5__auth.html#g589cab7251a70a5addbf1af56313401e">krb5_rd_req_ctx()</a>. </td></tr> 310226031Sstas <tr><td valign="top"></td><td valign="top"><em>principal</em> </td><td>return principal, free with <a class="el" href="group__krb5__principal.html#g5bd3f620ebe8cd4fe44b5c858ba17d22">krb5_free_principal()</a>. </td></tr> 311226031Sstas </table> 312226031Sstas</dl> 313226031Sstas 314226031Sstas</div> 315226031Sstas</div><p> 316226031Sstas</div> 317226031Sstas<hr size="1"><address style="text-align: right;"><small> 318234027SstasGenerated on Wed Jan 11 14:07:50 2012 for HeimdalKerberos5library 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> 319226031Sstas</body> 320226031Sstas</html> 321