<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.13"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>mbed TLS v2.7.8: ssl_ticket.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">mbed TLS v2.7.8 </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.13 --> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> $(function() { initMenu('',false,false,'search.php','Search'); }); </script> <div id="main-nav"></div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_b4d146e9a6d8dd56ed4afb2480a97fd3.html">mbedtls</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#nested-classes">Data Structures</a> | <a href="#func-members">Functions</a> | <a href="#var-members">Variables</a> </div> <div class="headertitle"> <div class="title">ssl_ticket.h File Reference</div> </div> </div><!--header--> <div class="contents"> <p>TLS server ticket callbacks implementation. <a href="#details">More...</a></p> <div class="textblock"><code>#include "<a class="el" href="ssl_8h_source.html">ssl.h</a>"</code><br /> <code>#include "<a class="el" href="cipher_8h_source.html">cipher.h</a>"</code><br /> <code>#include "<a class="el" href="threading_8h_source.html">threading.h</a>"</code><br /> </div><div class="textblock"><div class="dynheader"> Include dependency graph for ssl_ticket.h:</div> <div class="dyncontent"> <div class="center"><img src="ssl__ticket_8h__incl.png" border="0" usemap="#ssl__ticket_8h" alt=""/></div> <map name="ssl__ticket_8h" id="ssl__ticket_8h"> <area shape="rect" id="node2" href="ssl_8h.html" title="SSL/TLS functions. " alt="" coords="707,80,779,107"/> <area shape="rect" id="node15" href="threading_8h.html" title="Threading abstraction layer. " alt="" coords="944,528,1076,555"/> <area shape="rect" id="node19" href="cipher_8h.html" title="The generic cipher wrapper. " alt="" coords="5,379,108,405"/> <area shape="rect" id="node3" href="config_8h.html" title="Configuration options (set of defines) " alt="" coords="713,677,816,704"/> <area shape="rect" id="node6" href="bignum_8h.html" title="Multi-precision integer library. " alt="" coords="371,603,473,629"/> <area shape="rect" id="node10" href="ecp_8h.html" title="Elliptic curves over GF(p) " alt="" coords="309,528,381,555"/> <area shape="rect" id="node11" href="ssl__ciphersuites_8h.html" title="SSL Ciphersuites for mbed TLS. " alt="" coords="341,304,543,331"/> <area shape="rect" id="node20" href="x509__crt_8h.html" title="X.509 certificate parsing and writing. " alt="" coords="682,155,805,181"/> <area shape="rect" id="node23" href="x509__crl_8h.html" title="X.509 certificate revocation list parsing. " alt="" coords="802,229,925,256"/> <area shape="rect" id="node24" href="dhm_8h.html" title="Diffie-Hellman-Merkle key exchange. " alt="" coords="1234,528,1306,555"/> <area shape="rect" id="node25" href="ecdh_8h.html" title="The Elliptic Curve Diffie-Hellman (ECDH) protocol APIs. " alt="" coords="183,229,266,256"/> <area shape="rect" id="node26" href="platform__time_8h.html" title="mbed TLS Platform time abstraction " alt="" coords="880,155,1052,181"/> <area shape="rect" id="node4" href="check__config_8h.html" title="Consistency checks for configuration options. " alt="" coords="683,752,846,779"/> <area shape="rect" id="node12" href="pk_8h.html" title="Public Key abstraction layer. " alt="" coords="467,379,529,405"/> <area shape="rect" id="node13" href="md_8h.html" title="The generic message-digest wrapper. " alt="" coords="405,528,468,555"/> <area shape="rect" id="node14" href="rsa_8h.html" title="The RSA public-key cryptosystem. " alt="" coords="655,453,727,480"/> <area shape="rect" id="node18" href="ecdsa_8h.html" title="The Elliptic Curve Digital Signature Algorithm (ECDSA). " alt="" coords="387,453,479,480"/> <area shape="rect" id="node21" href="x509_8h.html" title="X.509 generic defines and structures. " alt="" coords="654,304,737,331"/> <area shape="rect" id="node22" href="asn1_8h.html" title="Generic ASN.1 parsing. " alt="" coords="493,528,575,555"/> </map> </div> </div> <p><a href="ssl__ticket_8h_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> Data Structures</h2></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structmbedtls__ssl__ticket__key.html">mbedtls_ssl_ticket_key</a></td></tr> <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Information for session ticket protection. <a href="structmbedtls__ssl__ticket__key.html#details">More...</a><br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structmbedtls__ssl__ticket__context.html">mbedtls_ssl_ticket_context</a></td></tr> <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Context for session ticket handling functions. <a href="structmbedtls__ssl__ticket__context.html#details">More...</a><br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:a07765b563037998d820dc8a1272e1ee0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="ssl__ticket_8h.html#a07765b563037998d820dc8a1272e1ee0">mbedtls_ssl_ticket_init</a> (<a class="el" href="structmbedtls__ssl__ticket__context.html">mbedtls_ssl_ticket_context</a> *ctx)</td></tr> <tr class="memdesc:a07765b563037998d820dc8a1272e1ee0"><td class="mdescLeft"> </td><td class="mdescRight">Initialize a ticket context. (Just make it ready for <a class="el" href="ssl__ticket_8h.html#a334f40042825a33295d0843374e1785a" title="Prepare context to be actually used. ">mbedtls_ssl_ticket_setup()</a> or <a class="el" href="ssl__ticket_8h.html#a254bccc118c66a617ba6020a2d8cc69c" title="Free a context's content and zeroize it. ">mbedtls_ssl_ticket_free()</a>.) <a href="#a07765b563037998d820dc8a1272e1ee0">More...</a><br /></td></tr> <tr class="separator:a07765b563037998d820dc8a1272e1ee0"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a334f40042825a33295d0843374e1785a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="ssl__ticket_8h.html#a334f40042825a33295d0843374e1785a">mbedtls_ssl_ticket_setup</a> (<a class="el" href="structmbedtls__ssl__ticket__context.html">mbedtls_ssl_ticket_context</a> *ctx, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng, <a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569d">mbedtls_cipher_type_t</a> cipher, uint32_t lifetime)</td></tr> <tr class="memdesc:a334f40042825a33295d0843374e1785a"><td class="mdescLeft"> </td><td class="mdescRight">Prepare context to be actually used. <a href="#a334f40042825a33295d0843374e1785a">More...</a><br /></td></tr> <tr class="separator:a334f40042825a33295d0843374e1785a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a254bccc118c66a617ba6020a2d8cc69c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="ssl__ticket_8h.html#a254bccc118c66a617ba6020a2d8cc69c">mbedtls_ssl_ticket_free</a> (<a class="el" href="structmbedtls__ssl__ticket__context.html">mbedtls_ssl_ticket_context</a> *ctx)</td></tr> <tr class="memdesc:a254bccc118c66a617ba6020a2d8cc69c"><td class="mdescLeft"> </td><td class="mdescRight">Free a context's content and zeroize it. <a href="#a254bccc118c66a617ba6020a2d8cc69c">More...</a><br /></td></tr> <tr class="separator:a254bccc118c66a617ba6020a2d8cc69c"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a> Variables</h2></td></tr> <tr class="memitem:a888e1b0900b517559ba5e89fb0843e0e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ssl_8h.html#a112d1fc2dd4db788592457d14c0c2899">mbedtls_ssl_ticket_write_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="ssl__ticket_8h.html#a888e1b0900b517559ba5e89fb0843e0e">mbedtls_ssl_ticket_write</a></td></tr> <tr class="memdesc:a888e1b0900b517559ba5e89fb0843e0e"><td class="mdescLeft"> </td><td class="mdescRight">Implementation of the ticket write callback. <a href="#a888e1b0900b517559ba5e89fb0843e0e">More...</a><br /></td></tr> <tr class="separator:a888e1b0900b517559ba5e89fb0843e0e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab8231bccc4f614d1995abd5984ffcdd8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ssl_8h.html#a48aea353b22e86deece00933ef941536">mbedtls_ssl_ticket_parse_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="ssl__ticket_8h.html#ab8231bccc4f614d1995abd5984ffcdd8">mbedtls_ssl_ticket_parse</a></td></tr> <tr class="memdesc:ab8231bccc4f614d1995abd5984ffcdd8"><td class="mdescLeft"> </td><td class="mdescRight">Implementation of the ticket parse callback. <a href="#ab8231bccc4f614d1995abd5984ffcdd8">More...</a><br /></td></tr> <tr class="separator:ab8231bccc4f614d1995abd5984ffcdd8"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>TLS server ticket callbacks implementation. </p> <p class="definition">Definition in file <a class="el" href="ssl__ticket_8h_source.html">ssl_ticket.h</a>.</p> </div><h2 class="groupheader">Function Documentation</h2> <a id="a254bccc118c66a617ba6020a2d8cc69c"></a> <h2 class="memtitle"><span class="permalink"><a href="#a254bccc118c66a617ba6020a2d8cc69c">◆ </a></span>mbedtls_ssl_ticket_free()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void mbedtls_ssl_ticket_free </td> <td>(</td> <td class="paramtype"><a class="el" href="structmbedtls__ssl__ticket__context.html">mbedtls_ssl_ticket_context</a> * </td> <td class="paramname"><em>ctx</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Free a context's content and zeroize it. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">ctx</td><td>Context to be cleaned up </td></tr> </table> </dd> </dl> </div> </div> <a id="a07765b563037998d820dc8a1272e1ee0"></a> <h2 class="memtitle"><span class="permalink"><a href="#a07765b563037998d820dc8a1272e1ee0">◆ </a></span>mbedtls_ssl_ticket_init()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void mbedtls_ssl_ticket_init </td> <td>(</td> <td class="paramtype"><a class="el" href="structmbedtls__ssl__ticket__context.html">mbedtls_ssl_ticket_context</a> * </td> <td class="paramname"><em>ctx</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Initialize a ticket context. (Just make it ready for <a class="el" href="ssl__ticket_8h.html#a334f40042825a33295d0843374e1785a" title="Prepare context to be actually used. ">mbedtls_ssl_ticket_setup()</a> or <a class="el" href="ssl__ticket_8h.html#a254bccc118c66a617ba6020a2d8cc69c" title="Free a context's content and zeroize it. ">mbedtls_ssl_ticket_free()</a>.) </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">ctx</td><td>Context to be initialized </td></tr> </table> </dd> </dl> </div> </div> <a id="a334f40042825a33295d0843374e1785a"></a> <h2 class="memtitle"><span class="permalink"><a href="#a334f40042825a33295d0843374e1785a">◆ </a></span>mbedtls_ssl_ticket_setup()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int mbedtls_ssl_ticket_setup </td> <td>(</td> <td class="paramtype"><a class="el" href="structmbedtls__ssl__ticket__context.html">mbedtls_ssl_ticket_context</a> * </td> <td class="paramname"><em>ctx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int(*)(void *, unsigned char *, size_t) </td> <td class="paramname"><em>f_rng</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">void * </td> <td class="paramname"><em>p_rng</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569d">mbedtls_cipher_type_t</a> </td> <td class="paramname"><em>cipher</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint32_t </td> <td class="paramname"><em>lifetime</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Prepare context to be actually used. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">ctx</td><td>Context to be set up </td></tr> <tr><td class="paramname">f_rng</td><td>RNG callback function </td></tr> <tr><td class="paramname">p_rng</td><td>RNG callback context </td></tr> <tr><td class="paramname">cipher</td><td>AEAD cipher to use for ticket protection. Recommended value: MBEDTLS_CIPHER_AES_256_GCM. </td></tr> <tr><td class="paramname">lifetime</td><td>Tickets lifetime in seconds Recommended value: 86400 (one day).</td></tr> </table> </dd> </dl> <dl class="section note"><dt>Note</dt><dd>It is highly recommended to select a cipher that is at least as strong as the the strongest ciphersuite supported. Usually that means a 256-bit key.</dd> <dd> The lifetime of the keys is twice the lifetime of tickets. It is recommended to pick a reasonnable lifetime so as not to negate the benefits of forward secrecy.</dd></dl> <dl class="section return"><dt>Returns</dt><dd>0 if successful, or a specific MBEDTLS_ERR_XXX error code </dd></dl> </div> </div> <h2 class="groupheader">Variable Documentation</h2> <a id="ab8231bccc4f614d1995abd5984ffcdd8"></a> <h2 class="memtitle"><span class="permalink"><a href="#ab8231bccc4f614d1995abd5984ffcdd8">◆ </a></span>mbedtls_ssl_ticket_parse</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="ssl_8h.html#a48aea353b22e86deece00933ef941536">mbedtls_ssl_ticket_parse_t</a> mbedtls_ssl_ticket_parse</td> </tr> </table> </div><div class="memdoc"> <p>Implementation of the ticket parse callback. </p> <dl class="section note"><dt>Note</dt><dd>See <code>mbedlts_ssl_ticket_parse_t</code> for description </dd></dl> <p class="definition">Definition at line <a class="el" href="ssl__ticket_8h_source.html#l00123">123</a> of file <a class="el" href="ssl__ticket_8h_source.html">ssl_ticket.h</a>.</p> </div> </div> <a id="a888e1b0900b517559ba5e89fb0843e0e"></a> <h2 class="memtitle"><span class="permalink"><a href="#a888e1b0900b517559ba5e89fb0843e0e">◆ </a></span>mbedtls_ssl_ticket_write</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="ssl_8h.html#a112d1fc2dd4db788592457d14c0c2899">mbedtls_ssl_ticket_write_t</a> mbedtls_ssl_ticket_write</td> </tr> </table> </div><div class="memdoc"> <p>Implementation of the ticket write callback. </p> <dl class="section note"><dt>Note</dt><dd>See <code>mbedlts_ssl_ticket_write_t</code> for description </dd></dl> <p class="definition">Definition at line <a class="el" href="ssl__ticket_8h_source.html#l00116">116</a> of file <a class="el" href="ssl__ticket_8h_source.html">ssl_ticket.h</a>.</p> </div> </div> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Tue Jan 1 2019 18:27:18 for mbed TLS v2.7.8 by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.13 </small></address> </body> </html>