Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 8df484ca79a7b6bb61e4a376e1506870 > files > 207

polarssl-devel-0.14.3-1.fc14.x86_64.rpm

<!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"/>
<title>PolarSSL: polarssl/ssl.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">PolarSSL</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">polarssl/ssl.h</div>  </div>
</div>
<div class="contents">
<a href="ssl_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00025"></a>00025 <span class="preprocessor">#ifndef POLARSSL_SSL_H</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_SSL_H</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;time.h&gt;</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="preprocessor">#include &quot;<a class="code" href="net_8h.html">polarssl/net.h</a>&quot;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &quot;<a class="code" href="dhm_8h.html">polarssl/dhm.h</a>&quot;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &quot;<a class="code" href="rsa_8h.html">polarssl/rsa.h</a>&quot;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &quot;<a class="code" href="md5_8h.html">polarssl/md5.h</a>&quot;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &quot;<a class="code" href="sha1_8h.html">polarssl/sha1.h</a>&quot;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &quot;<a class="code" href="x509_8h.html">polarssl/x509.h</a>&quot;</span>
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 <span class="comment">/*</span>
<a name="l00038"></a>00038 <span class="comment"> * SSL Error codes</span>
<a name="l00039"></a>00039 <span class="comment"> */</span>
<a name="l00040"></a>00040 <span class="preprocessor">#define POLARSSL_ERR_SSL_FEATURE_UNAVAILABLE               -0x1000</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_BAD_INPUT_DATA                    -0x1800</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_INVALID_MAC                       -0x2000</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_INVALID_RECORD                    -0x2800</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_INVALID_MODULUS_SIZE              -0x3000</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_UNKNOWN_CIPHER                    -0x3800</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_NO_CIPHER_CHOSEN                  -0x4000</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_NO_SESSION_FOUND                  -0x4800</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_NO_CLIENT_CERTIFICATE             -0x5000</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_CERTIFICATE_TOO_LARGE             -0x5800</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_CERTIFICATE_REQUIRED              -0x6000</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_PRIVATE_KEY_REQUIRED              -0x6800</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_CA_CHAIN_REQUIRED                 -0x7000</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE                -0x7800</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_FATAL_ALERT_MESSAGE               -0x8000</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_PEER_VERIFY_FAILED                -0x8800</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY                 -0x9000</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_BAD_HS_CLIENT_HELLO               -0x9800</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_BAD_HS_SERVER_HELLO               -0xA000</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_BAD_HS_CERTIFICATE                -0xA800</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_BAD_HS_CERTIFICATE_REQUEST        -0xB000</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE        -0xB800</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_BAD_HS_SERVER_HELLO_DONE          -0xC000</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE        -0xC800</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_BAD_HS_CERTIFICATE_VERIFY         -0xD000</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC         -0xD800</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_SSL_BAD_HS_FINISHED                   -0xE000</span>
<a name="l00067"></a>00067 <span class="preprocessor"></span>
<a name="l00068"></a>00068 <span class="comment">/*</span>
<a name="l00069"></a>00069 <span class="comment"> * Various constants</span>
<a name="l00070"></a>00070 <span class="comment"> */</span>
<a name="l00071"></a>00071 <span class="preprocessor">#define SSL_MAJOR_VERSION_3             3</span>
<a name="l00072"></a><a class="code" href="ssl_8h.html#a4fedd81485a2c0a99b8d0d1dea245302">00072</a> <span class="preprocessor"></span><span class="preprocessor">#define SSL_MINOR_VERSION_0             0   </span>
<a name="l00073"></a><a class="code" href="ssl_8h.html#a3e0c978697874bb5457d61f7515e8f55">00073</a> <span class="preprocessor">#define SSL_MINOR_VERSION_1             1   </span>
<a name="l00074"></a><a class="code" href="ssl_8h.html#aab565447d7abe2dcb01544e7dbfcd4c9">00074</a> <span class="preprocessor">#define SSL_MINOR_VERSION_2             2   </span>
<a name="l00076"></a>00076 <span class="preprocessor">#define SSL_IS_CLIENT                   0</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#define SSL_IS_SERVER                   1</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">#define SSL_COMPRESS_NULL               0</span>
<a name="l00079"></a>00079 <span class="preprocessor"></span>
<a name="l00080"></a>00080 <span class="preprocessor">#define SSL_VERIFY_NONE                 0</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#define SSL_VERIFY_OPTIONAL             1</span>
<a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">#define SSL_VERIFY_REQUIRED             2</span>
<a name="l00083"></a>00083 <span class="preprocessor"></span>
<a name="l00084"></a>00084 <span class="preprocessor">#define SSL_MAX_CONTENT_LEN         16384</span>
<a name="l00085"></a>00085 <span class="preprocessor"></span>
<a name="l00086"></a>00086 <span class="comment">/*</span>
<a name="l00087"></a>00087 <span class="comment"> * Allow an extra 512 bytes for the record header</span>
<a name="l00088"></a>00088 <span class="comment"> * and encryption overhead (counter + MAC + padding).</span>
<a name="l00089"></a>00089 <span class="comment"> */</span>
<a name="l00090"></a>00090 <span class="preprocessor">#define SSL_BUFFER_LEN (SSL_MAX_CONTENT_LEN + 512)</span>
<a name="l00091"></a>00091 <span class="preprocessor"></span>
<a name="l00092"></a>00092 <span class="comment">/*</span>
<a name="l00093"></a>00093 <span class="comment"> * Supported ciphersuites</span>
<a name="l00094"></a>00094 <span class="comment"> */</span>
<a name="l00095"></a>00095 <span class="preprocessor">#define SSL_RSA_RC4_128_MD5          0x04</span>
<a name="l00096"></a>00096 <span class="preprocessor"></span><span class="preprocessor">#define SSL_RSA_RC4_128_SHA          0x05</span>
<a name="l00097"></a>00097 <span class="preprocessor"></span><span class="preprocessor">#define SSL_RSA_DES_168_SHA          0x0A</span>
<a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor">#define SSL_EDH_RSA_DES_168_SHA      0x16</span>
<a name="l00099"></a>00099 <span class="preprocessor"></span><span class="preprocessor">#define SSL_RSA_AES_128_SHA          0x2F</span>
<a name="l00100"></a>00100 <span class="preprocessor"></span><span class="preprocessor">#define SSL_EDH_RSA_AES_128_SHA      0x33</span>
<a name="l00101"></a>00101 <span class="preprocessor"></span><span class="preprocessor">#define SSL_RSA_AES_256_SHA          0x35</span>
<a name="l00102"></a>00102 <span class="preprocessor"></span><span class="preprocessor">#define SSL_EDH_RSA_AES_256_SHA      0x39</span>
<a name="l00103"></a>00103 <span class="preprocessor"></span>
<a name="l00104"></a>00104 <span class="preprocessor">#define SSL_RSA_CAMELLIA_128_SHA     0x41</span>
<a name="l00105"></a>00105 <span class="preprocessor"></span><span class="preprocessor">#define SSL_EDH_RSA_CAMELLIA_128_SHA 0x45</span>
<a name="l00106"></a>00106 <span class="preprocessor"></span><span class="preprocessor">#define SSL_RSA_CAMELLIA_256_SHA     0x84</span>
<a name="l00107"></a>00107 <span class="preprocessor"></span><span class="preprocessor">#define SSL_EDH_RSA_CAMELLIA_256_SHA 0x88</span>
<a name="l00108"></a>00108 <span class="preprocessor"></span>
<a name="l00109"></a>00109 <span class="comment">/*</span>
<a name="l00110"></a>00110 <span class="comment"> * Message, alert and handshake types</span>
<a name="l00111"></a>00111 <span class="comment"> */</span>
<a name="l00112"></a>00112 <span class="preprocessor">#define SSL_MSG_CHANGE_CIPHER_SPEC     20</span>
<a name="l00113"></a>00113 <span class="preprocessor"></span><span class="preprocessor">#define SSL_MSG_ALERT                  21</span>
<a name="l00114"></a>00114 <span class="preprocessor"></span><span class="preprocessor">#define SSL_MSG_HANDSHAKE              22</span>
<a name="l00115"></a>00115 <span class="preprocessor"></span><span class="preprocessor">#define SSL_MSG_APPLICATION_DATA       23</span>
<a name="l00116"></a>00116 <span class="preprocessor"></span>
<a name="l00117"></a>00117 <span class="preprocessor">#define SSL_ALERT_LEVEL_WARNING         1</span>
<a name="l00118"></a>00118 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_LEVEL_FATAL           2</span>
<a name="l00119"></a>00119 <span class="preprocessor"></span>
<a name="l00120"></a>00120 <span class="preprocessor">#define SSL_ALERT_MSG_CLOSE_NOTIFY           0</span>
<a name="l00121"></a>00121 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_UNEXPECTED_MESSAGE    10</span>
<a name="l00122"></a>00122 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_BAD_RECORD_MAD        20</span>
<a name="l00123"></a>00123 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_DECRYPTION_FAILED     21</span>
<a name="l00124"></a>00124 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_RECORD_OVERFLOW       22</span>
<a name="l00125"></a>00125 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_DECOMPRESSION_FAILURE 30</span>
<a name="l00126"></a>00126 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_HANDSHAKE_FAILURE     40</span>
<a name="l00127"></a>00127 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_NO_CERT               41</span>
<a name="l00128"></a>00128 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_BAD_CERT              42</span>
<a name="l00129"></a>00129 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_UNSUPPORTED_CERT      43</span>
<a name="l00130"></a>00130 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_CERT_REVOKED          44</span>
<a name="l00131"></a>00131 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_CERT_EXPIRED          45</span>
<a name="l00132"></a>00132 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_CERT_UNKNOWN          46</span>
<a name="l00133"></a>00133 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_ILLEGAL_PARAMETER     47</span>
<a name="l00134"></a>00134 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_UNKNOWN_CA            48</span>
<a name="l00135"></a>00135 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_ACCESS_DENIED         49</span>
<a name="l00136"></a>00136 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_DECODE_ERROR          50</span>
<a name="l00137"></a>00137 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_DECRYPT_ERROR         51</span>
<a name="l00138"></a>00138 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_EXPORT_RESTRICTION    60</span>
<a name="l00139"></a>00139 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_PROTOCOL_VERSION      70</span>
<a name="l00140"></a>00140 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_INSUFFICIENT_SECURITY 71</span>
<a name="l00141"></a>00141 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_INTERNAL_ERROR        80</span>
<a name="l00142"></a>00142 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_USER_CANCELED         90</span>
<a name="l00143"></a>00143 <span class="preprocessor"></span><span class="preprocessor">#define SSL_ALERT_MSG_NO_RENEGOTIATION     100</span>
<a name="l00144"></a>00144 <span class="preprocessor"></span>
<a name="l00145"></a>00145 <span class="preprocessor">#define SSL_HS_HELLO_REQUEST            0</span>
<a name="l00146"></a>00146 <span class="preprocessor"></span><span class="preprocessor">#define SSL_HS_CLIENT_HELLO             1</span>
<a name="l00147"></a>00147 <span class="preprocessor"></span><span class="preprocessor">#define SSL_HS_SERVER_HELLO             2</span>
<a name="l00148"></a>00148 <span class="preprocessor"></span><span class="preprocessor">#define SSL_HS_CERTIFICATE             11</span>
<a name="l00149"></a>00149 <span class="preprocessor"></span><span class="preprocessor">#define SSL_HS_SERVER_KEY_EXCHANGE     12</span>
<a name="l00150"></a>00150 <span class="preprocessor"></span><span class="preprocessor">#define SSL_HS_CERTIFICATE_REQUEST     13</span>
<a name="l00151"></a>00151 <span class="preprocessor"></span><span class="preprocessor">#define SSL_HS_SERVER_HELLO_DONE       14</span>
<a name="l00152"></a>00152 <span class="preprocessor"></span><span class="preprocessor">#define SSL_HS_CERTIFICATE_VERIFY      15</span>
<a name="l00153"></a>00153 <span class="preprocessor"></span><span class="preprocessor">#define SSL_HS_CLIENT_KEY_EXCHANGE     16</span>
<a name="l00154"></a>00154 <span class="preprocessor"></span><span class="preprocessor">#define SSL_HS_FINISHED                20</span>
<a name="l00155"></a>00155 <span class="preprocessor"></span>
<a name="l00156"></a>00156 <span class="comment">/*</span>
<a name="l00157"></a>00157 <span class="comment"> * TLS extensions</span>
<a name="l00158"></a>00158 <span class="comment"> */</span>
<a name="l00159"></a>00159 <span class="preprocessor">#define TLS_EXT_SERVERNAME              0</span>
<a name="l00160"></a>00160 <span class="preprocessor"></span><span class="preprocessor">#define TLS_EXT_SERVERNAME_HOSTNAME     0</span>
<a name="l00161"></a>00161 <span class="preprocessor"></span>
<a name="l00162"></a>00162 <span class="comment">/*</span>
<a name="l00163"></a>00163 <span class="comment"> * SSL state machine</span>
<a name="l00164"></a>00164 <span class="comment"> */</span>
<a name="l00165"></a>00165 <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00166"></a>00166 {
<a name="l00167"></a>00167     SSL_HELLO_REQUEST,
<a name="l00168"></a>00168     SSL_CLIENT_HELLO,
<a name="l00169"></a>00169     SSL_SERVER_HELLO,
<a name="l00170"></a>00170     SSL_SERVER_CERTIFICATE,
<a name="l00171"></a>00171     SSL_SERVER_KEY_EXCHANGE,
<a name="l00172"></a>00172     SSL_CERTIFICATE_REQUEST,
<a name="l00173"></a>00173     SSL_SERVER_HELLO_DONE,
<a name="l00174"></a>00174     SSL_CLIENT_CERTIFICATE,
<a name="l00175"></a>00175     SSL_CLIENT_KEY_EXCHANGE,
<a name="l00176"></a>00176     SSL_CERTIFICATE_VERIFY,
<a name="l00177"></a>00177     SSL_CLIENT_CHANGE_CIPHER_SPEC,
<a name="l00178"></a>00178     SSL_CLIENT_FINISHED,
<a name="l00179"></a>00179     SSL_SERVER_CHANGE_CIPHER_SPEC,
<a name="l00180"></a>00180     SSL_SERVER_FINISHED,
<a name="l00181"></a>00181     SSL_FLUSH_BUFFERS,
<a name="l00182"></a>00182     SSL_HANDSHAKE_OVER
<a name="l00183"></a>00183 }
<a name="l00184"></a>00184 ssl_states;
<a name="l00185"></a>00185 
<a name="l00186"></a>00186 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__ssl__session.html">_ssl_session</a> <a class="code" href="struct__ssl__session.html">ssl_session</a>;
<a name="l00187"></a>00187 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__ssl__context.html">_ssl_context</a> <a class="code" href="struct__ssl__context.html">ssl_context</a>;
<a name="l00188"></a>00188 
<a name="l00189"></a>00189 <span class="comment">/*</span>
<a name="l00190"></a>00190 <span class="comment"> * This structure is used for session resuming.</span>
<a name="l00191"></a>00191 <span class="comment"> */</span>
<a name="l00192"></a><a class="code" href="struct__ssl__session.html">00192</a> <span class="keyword">struct </span><a class="code" href="struct__ssl__session.html">_ssl_session</a>
<a name="l00193"></a>00193 {
<a name="l00194"></a><a class="code" href="struct__ssl__session.html#af68d1f9b5941ff5cca18b5e97d52299d">00194</a>     time_t <a class="code" href="struct__ssl__session.html#af68d1f9b5941ff5cca18b5e97d52299d">start</a>;               
<a name="l00195"></a><a class="code" href="struct__ssl__session.html#a6ef3d13933df9d5ca13479d6c9fb3e7e">00195</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__session.html#a6ef3d13933df9d5ca13479d6c9fb3e7e">cipher</a>;                 
<a name="l00196"></a><a class="code" href="struct__ssl__session.html#a785f18a6bcb15d084ed6f1a4f1263579">00196</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__session.html#a785f18a6bcb15d084ed6f1a4f1263579">length</a>;                 
<a name="l00197"></a><a class="code" href="struct__ssl__session.html#a247ca3921617cd58ea115d0c084429db">00197</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <span class="keywordtype">id</span>[32];       
<a name="l00198"></a><a class="code" href="struct__ssl__session.html#a697ab473d946a7ca1bb8a5be54d9fafa">00198</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct__ssl__session.html#a697ab473d946a7ca1bb8a5be54d9fafa">master</a>[48];   
<a name="l00199"></a><a class="code" href="struct__ssl__session.html#a6ab26ae36ab56271338bcdc1bb870670">00199</a>     <a class="code" href="struct__ssl__session.html">ssl_session</a> *<a class="code" href="struct__ssl__session.html#a6ab26ae36ab56271338bcdc1bb870670">next</a>;          
<a name="l00200"></a>00200 };
<a name="l00201"></a>00201 
<a name="l00202"></a><a class="code" href="struct__ssl__context.html">00202</a> <span class="keyword">struct </span><a class="code" href="struct__ssl__context.html">_ssl_context</a>
<a name="l00203"></a>00203 {
<a name="l00204"></a>00204     <span class="comment">/*</span>
<a name="l00205"></a>00205 <span class="comment">     * Miscellaneous</span>
<a name="l00206"></a>00206 <span class="comment">     */</span>
<a name="l00207"></a><a class="code" href="struct__ssl__context.html#a5bf877cd6d310fcd317772e4a74ea4b1">00207</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#a5bf877cd6d310fcd317772e4a74ea4b1">state</a>;                  
<a name="l00209"></a><a class="code" href="struct__ssl__context.html#a7ba00e9f3f41c954438ef450f61a1127">00209</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#a7ba00e9f3f41c954438ef450f61a1127">major_ver</a>;              
<a name="l00210"></a><a class="code" href="struct__ssl__context.html#a13bc8af6fca4121fed003649e8e72074">00210</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#a13bc8af6fca4121fed003649e8e72074">minor_ver</a>;              
<a name="l00212"></a><a class="code" href="struct__ssl__context.html#aa53d1c4449b3e3aaf4dc3f8eb4ec3b97">00212</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#aa53d1c4449b3e3aaf4dc3f8eb4ec3b97">max_major_ver</a>;          
<a name="l00213"></a><a class="code" href="struct__ssl__context.html#adfc9bfdd067fe5caf68b334accd8cd43">00213</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#adfc9bfdd067fe5caf68b334accd8cd43">max_minor_ver</a>;          
<a name="l00215"></a>00215     <span class="comment">/*</span>
<a name="l00216"></a>00216 <span class="comment">     * Callbacks (RNG, debug, I/O)</span>
<a name="l00217"></a>00217 <span class="comment">     */</span>
<a name="l00218"></a>00218     int  (*f_rng)(<span class="keywordtype">void</span> *);
<a name="l00219"></a>00219     void (*f_dbg)(<span class="keywordtype">void</span> *, int, <span class="keyword">const</span> <span class="keywordtype">char</span> *);
<a name="l00220"></a>00220     int (*f_recv)(<span class="keywordtype">void</span> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *, int);
<a name="l00221"></a>00221     int (*f_send)(<span class="keywordtype">void</span> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *, int);
<a name="l00222"></a>00222 
<a name="l00223"></a><a class="code" href="struct__ssl__context.html#a25fedaa600ea4c99444528fdf5bb0bdc">00223</a>     <span class="keywordtype">void</span> *<a class="code" href="struct__ssl__context.html#a25fedaa600ea4c99444528fdf5bb0bdc">p_rng</a>;                
<a name="l00224"></a><a class="code" href="struct__ssl__context.html#ac176b1daaaae7e2009b4467cd498a18b">00224</a>     <span class="keywordtype">void</span> *<a class="code" href="struct__ssl__context.html#ac176b1daaaae7e2009b4467cd498a18b">p_dbg</a>;                
<a name="l00225"></a><a class="code" href="struct__ssl__context.html#aab966bee783ec3d1e0aa3113bdbdedbc">00225</a>     <span class="keywordtype">void</span> *<a class="code" href="struct__ssl__context.html#aab966bee783ec3d1e0aa3113bdbdedbc">p_recv</a>;               
<a name="l00226"></a><a class="code" href="struct__ssl__context.html#afb3631c56c80c93fd6a10ae6c5f31eff">00226</a>     <span class="keywordtype">void</span> *<a class="code" href="struct__ssl__context.html#afb3631c56c80c93fd6a10ae6c5f31eff">p_send</a>;               
<a name="l00228"></a>00228     <span class="comment">/*</span>
<a name="l00229"></a>00229 <span class="comment">     * Session layer</span>
<a name="l00230"></a>00230 <span class="comment">     */</span>
<a name="l00231"></a><a class="code" href="struct__ssl__context.html#a3417783ab76ac99af684696d560ce20a">00231</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#a3417783ab76ac99af684696d560ce20a">resume</a>;                         
<a name="l00232"></a><a class="code" href="struct__ssl__context.html#a437ecf8f6767b3284a7aa7588910b7c0">00232</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#a437ecf8f6767b3284a7aa7588910b7c0">timeout</a>;                        
<a name="l00233"></a><a class="code" href="struct__ssl__context.html#ae6956b0a88d392757b01fcdfa3fd45e0">00233</a>     <a class="code" href="struct__ssl__session.html">ssl_session</a> *<a class="code" href="struct__ssl__context.html#ae6956b0a88d392757b01fcdfa3fd45e0">session</a>;               
<a name="l00234"></a><a class="code" href="struct__ssl__context.html#a163ebf6fad51145608a64a4d87b4889e">00234</a>     int (*<a class="code" href="struct__ssl__context.html#a163ebf6fad51145608a64a4d87b4889e">s_get</a>)(<a class="code" href="struct__ssl__context.html">ssl_context</a> *);        
<a name="l00235"></a><a class="code" href="struct__ssl__context.html#a713e4a8b03516f730ac4da1e35154436">00235</a>     int (*<a class="code" href="struct__ssl__context.html#a713e4a8b03516f730ac4da1e35154436">s_set</a>)(<a class="code" href="struct__ssl__context.html">ssl_context</a> *);        
<a name="l00237"></a>00237     <span class="comment">/*</span>
<a name="l00238"></a>00238 <span class="comment">     * Record layer (incoming data)</span>
<a name="l00239"></a>00239 <span class="comment">     */</span>
<a name="l00240"></a><a class="code" href="struct__ssl__context.html#a1ae07eb9a0ad8d605c11ad8ea9436b4e">00240</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="struct__ssl__context.html#a1ae07eb9a0ad8d605c11ad8ea9436b4e">in_ctr</a>;      
<a name="l00241"></a><a class="code" href="struct__ssl__context.html#a07ea9d3221321212616c77288bf45012">00241</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="struct__ssl__context.html#a07ea9d3221321212616c77288bf45012">in_hdr</a>;      
<a name="l00242"></a><a class="code" href="struct__ssl__context.html#aeb559e00ac2523e841e70a24c672a1c7">00242</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="struct__ssl__context.html#aeb559e00ac2523e841e70a24c672a1c7">in_msg</a>;      
<a name="l00243"></a><a class="code" href="struct__ssl__context.html#af32350f1de7f91785250f6ac45afd3d5">00243</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="struct__ssl__context.html#af32350f1de7f91785250f6ac45afd3d5">in_offt</a>;     
<a name="l00245"></a><a class="code" href="struct__ssl__context.html#abe70b82e9b8119ce20889e21451d87a5">00245</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#abe70b82e9b8119ce20889e21451d87a5">in_msgtype</a>;             
<a name="l00246"></a><a class="code" href="struct__ssl__context.html#a8f4f58a98cc64824a74dc21f0f9cb24d">00246</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#a8f4f58a98cc64824a74dc21f0f9cb24d">in_msglen</a>;              
<a name="l00247"></a><a class="code" href="struct__ssl__context.html#a036b1b6203308a974da2bb8ada9a9a32">00247</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#a036b1b6203308a974da2bb8ada9a9a32">in_left</a>;                
<a name="l00249"></a><a class="code" href="struct__ssl__context.html#a0e5facf1c099ff15d50c92538a6b8e50">00249</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#a0e5facf1c099ff15d50c92538a6b8e50">in_hslen</a>;               
<a name="l00250"></a><a class="code" href="struct__ssl__context.html#a0c2e5417a064dd13a7c4bc28035e2c67">00250</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#a0c2e5417a064dd13a7c4bc28035e2c67">nb_zero</a>;                
<a name="l00252"></a>00252     <span class="comment">/*</span>
<a name="l00253"></a>00253 <span class="comment">     * Record layer (outgoing data)</span>
<a name="l00254"></a>00254 <span class="comment">     */</span>
<a name="l00255"></a><a class="code" href="struct__ssl__context.html#a5d6dea03e21a3305cb274a4e19b02a75">00255</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="struct__ssl__context.html#a5d6dea03e21a3305cb274a4e19b02a75">out_ctr</a>;     
<a name="l00256"></a><a class="code" href="struct__ssl__context.html#a4459b04a18827ee9daa1a70450d5281f">00256</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="struct__ssl__context.html#a4459b04a18827ee9daa1a70450d5281f">out_hdr</a>;     
<a name="l00257"></a><a class="code" href="struct__ssl__context.html#a611a2e13418ea5b23ccd8f297280a7bc">00257</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="struct__ssl__context.html#a611a2e13418ea5b23ccd8f297280a7bc">out_msg</a>;     
<a name="l00259"></a><a class="code" href="struct__ssl__context.html#ad6199b754f91d142c08f1fe7fb690145">00259</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#ad6199b754f91d142c08f1fe7fb690145">out_msgtype</a>;            
<a name="l00260"></a><a class="code" href="struct__ssl__context.html#ac185b103766080dc4d75f05ffe8d9c63">00260</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#ac185b103766080dc4d75f05ffe8d9c63">out_msglen</a>;             
<a name="l00261"></a><a class="code" href="struct__ssl__context.html#ad7fa6c986914c8686e3380b350959a72">00261</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#ad7fa6c986914c8686e3380b350959a72">out_left</a>;               
<a name="l00263"></a>00263     <span class="comment">/*</span>
<a name="l00264"></a>00264 <span class="comment">     * PKI layer</span>
<a name="l00265"></a>00265 <span class="comment">     */</span>
<a name="l00266"></a><a class="code" href="struct__ssl__context.html#a7d1fdeb8d0c99fb706719824510078ec">00266</a>     <a class="code" href="structrsa__context.html" title="RSA context structure.">rsa_context</a> *<a class="code" href="struct__ssl__context.html#a7d1fdeb8d0c99fb706719824510078ec">rsa_key</a>;               
<a name="l00267"></a><a class="code" href="struct__ssl__context.html#a936f92c30b65c1dcf91e13a62c1e07ec">00267</a>     <a class="code" href="struct__x509__cert.html">x509_cert</a> *<a class="code" href="struct__ssl__context.html#a936f92c30b65c1dcf91e13a62c1e07ec">own_cert</a>;                
<a name="l00268"></a><a class="code" href="struct__ssl__context.html#a9f9519a82095f743661a3cd10e6cfc20">00268</a>     <a class="code" href="struct__x509__cert.html">x509_cert</a> *<a class="code" href="struct__ssl__context.html#a9f9519a82095f743661a3cd10e6cfc20">ca_chain</a>;                
<a name="l00269"></a><a class="code" href="struct__ssl__context.html#a8a318fbac8c846c170c2000c205b6800">00269</a>     <a class="code" href="struct__x509__crl.html">x509_crl</a> *<a class="code" href="struct__ssl__context.html#a8a318fbac8c846c170c2000c205b6800">ca_crl</a>;                   
<a name="l00270"></a><a class="code" href="struct__ssl__context.html#a382d037c970900b022bff5785ef74f7d">00270</a>     <a class="code" href="struct__x509__cert.html">x509_cert</a> *<a class="code" href="struct__ssl__context.html#a382d037c970900b022bff5785ef74f7d">peer_cert</a>;               
<a name="l00271"></a><a class="code" href="struct__ssl__context.html#a9f4f53820be8cde9c9083e3de1dec6c0">00271</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="struct__ssl__context.html#a9f4f53820be8cde9c9083e3de1dec6c0">peer_cn</a>;                
<a name="l00273"></a><a class="code" href="struct__ssl__context.html#a32b691e813fdf33c5399a7e91db6f23a">00273</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#a32b691e813fdf33c5399a7e91db6f23a">endpoint</a>;                       
<a name="l00274"></a><a class="code" href="struct__ssl__context.html#a589640abace5f4e690bead3c18092bd5">00274</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#a589640abace5f4e690bead3c18092bd5">authmode</a>;                       
<a name="l00275"></a><a class="code" href="struct__ssl__context.html#ae5187c34948f80111bb9bd7e603cca2d">00275</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#ae5187c34948f80111bb9bd7e603cca2d">client_auth</a>;                    
<a name="l00276"></a><a class="code" href="struct__ssl__context.html#a802e2f38cfc49541a2c265084e63f13d">00276</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#a802e2f38cfc49541a2c265084e63f13d">verify_result</a>;                  
<a name="l00278"></a>00278     <span class="comment">/*</span>
<a name="l00279"></a>00279 <span class="comment">     * Crypto layer</span>
<a name="l00280"></a>00280 <span class="comment">     */</span>
<a name="l00281"></a><a class="code" href="struct__ssl__context.html#a6c45dc0e27dbe279966fb32df16786d0">00281</a>     <a class="code" href="structdhm__context.html">dhm_context</a> <a class="code" href="struct__ssl__context.html#a6c45dc0e27dbe279966fb32df16786d0">dhm_ctx</a>;                
<a name="l00282"></a><a class="code" href="struct__ssl__context.html#a3d46fd168141384ea79fbd9e749e59bb">00282</a>     <a class="code" href="structmd5__context.html" title="MD5 context structure.">md5_context</a> <a class="code" href="struct__ssl__context.html#a3d46fd168141384ea79fbd9e749e59bb">fin_md5</a>;                
<a name="l00283"></a><a class="code" href="struct__ssl__context.html#ae7ea8e6dce20f5f617a89bcda62ce58f">00283</a>     <a class="code" href="structsha1__context.html" title="SHA-1 context structure.">sha1_context</a> <a class="code" href="struct__ssl__context.html#ae7ea8e6dce20f5f617a89bcda62ce58f">fin_sha1</a>;              
<a name="l00285"></a><a class="code" href="struct__ssl__context.html#adf65785aab3e7cd1d3c9a5a5bbc06a16">00285</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#adf65785aab3e7cd1d3c9a5a5bbc06a16">do_crypt</a>;                       
<a name="l00286"></a><a class="code" href="struct__ssl__context.html#ac614d6ebf1bd613f1985256f90996237">00286</a>     <span class="keywordtype">int</span> *<a class="code" href="struct__ssl__context.html#ac614d6ebf1bd613f1985256f90996237">ciphers</a>;                       
<a name="l00287"></a><a class="code" href="struct__ssl__context.html#aaeb21b6875d3b322aea8a22443bba2ac">00287</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#aaeb21b6875d3b322aea8a22443bba2ac">pmslen</a>;                         
<a name="l00288"></a><a class="code" href="struct__ssl__context.html#a01c980ecb6a743d08b94f4ef8993b5f3">00288</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#a01c980ecb6a743d08b94f4ef8993b5f3">keylen</a>;                         
<a name="l00289"></a><a class="code" href="struct__ssl__context.html#a21912b695ed63b10a0cf8d08e1524ead">00289</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#a21912b695ed63b10a0cf8d08e1524ead">minlen</a>;                         
<a name="l00290"></a><a class="code" href="struct__ssl__context.html#ac00bf85213cbc0d1277f65d5720e8435">00290</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#ac00bf85213cbc0d1277f65d5720e8435">ivlen</a>;                          
<a name="l00291"></a><a class="code" href="struct__ssl__context.html#a52e9f1e459485571eb76f0b95ec78b0b">00291</a>     <span class="keywordtype">int</span> <a class="code" href="struct__ssl__context.html#a52e9f1e459485571eb76f0b95ec78b0b">maclen</a>;                         
<a name="l00293"></a><a class="code" href="struct__ssl__context.html#ae3c51a174209974a641f644cde0b9aba">00293</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct__ssl__context.html#ae3c51a174209974a641f644cde0b9aba">randbytes</a>[64];        
<a name="l00294"></a><a class="code" href="struct__ssl__context.html#a870785071daa4c05c28efc322c0d48a8">00294</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct__ssl__context.html#a870785071daa4c05c28efc322c0d48a8">premaster</a>[256];       
<a name="l00296"></a><a class="code" href="struct__ssl__context.html#a0958f4f4a6cee0d1aa974595339e454f">00296</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct__ssl__context.html#a0958f4f4a6cee0d1aa974595339e454f">iv_enc</a>[16];           
<a name="l00297"></a><a class="code" href="struct__ssl__context.html#a1a14628bb418b3a582bee208cbbfd745">00297</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct__ssl__context.html#a1a14628bb418b3a582bee208cbbfd745">iv_dec</a>[16];           
<a name="l00299"></a><a class="code" href="struct__ssl__context.html#a448ca03def2b6e0051298187b5fb1b8d">00299</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct__ssl__context.html#a448ca03def2b6e0051298187b5fb1b8d">mac_enc</a>[32];          
<a name="l00300"></a><a class="code" href="struct__ssl__context.html#a2a60ebbde64be08b4599d4379d34e4c1">00300</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct__ssl__context.html#a2a60ebbde64be08b4599d4379d34e4c1">mac_dec</a>[32];          
<a name="l00302"></a><a class="code" href="struct__ssl__context.html#aed9a06ee3769c9e00f2826f20e20ef63">00302</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="struct__ssl__context.html#aed9a06ee3769c9e00f2826f20e20ef63">ctx_enc</a>[128];         
<a name="l00303"></a><a class="code" href="struct__ssl__context.html#ab04283d802958292a77e1723c644bee5">00303</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="struct__ssl__context.html#ab04283d802958292a77e1723c644bee5">ctx_dec</a>[128];         
<a name="l00305"></a>00305     <span class="comment">/*</span>
<a name="l00306"></a>00306 <span class="comment">     * TLS extensions</span>
<a name="l00307"></a>00307 <span class="comment">     */</span>
<a name="l00308"></a>00308     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *hostname;
<a name="l00309"></a>00309     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>  hostname_len;
<a name="l00310"></a>00310 };
<a name="l00311"></a>00311 
<a name="l00312"></a>00312 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00313"></a>00313 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00314"></a>00314 <span class="preprocessor">#endif</span>
<a name="l00315"></a>00315 <span class="preprocessor"></span>
<a name="l00316"></a>00316 <span class="keyword">extern</span> <span class="keywordtype">int</span> ssl_default_ciphers[];
<a name="l00317"></a>00317 
<a name="l00325"></a>00325 <span class="keywordtype">int</span> <a class="code" href="ssl_8h.html#add102a477ee9b9d9cda8fb1b86313d2e" title="Initialize an SSL context.">ssl_init</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00326"></a>00326 
<a name="l00333"></a>00333 <span class="keywordtype">void</span> <a class="code" href="ssl_8h.html#a3b71db44f3dd86fb3d4da60401a9dc0f" title="Set the current endpoint type.">ssl_set_endpoint</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl, <span class="keywordtype">int</span> endpoint );
<a name="l00334"></a>00334 
<a name="l00352"></a>00352 <span class="keywordtype">void</span> <a class="code" href="ssl_8h.html#a12548c85c004225593c930c83b08a109" title="Set the certificate verification mode.">ssl_set_authmode</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl, <span class="keywordtype">int</span> authmode );
<a name="l00353"></a>00353 
<a name="l00361"></a>00361 <span class="keywordtype">void</span> <a class="code" href="ssl_8h.html#adc5f63c5d93e557d6a4256613155ad83" title="Set the random number generator callback.">ssl_set_rng</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl,
<a name="l00362"></a>00362                   <span class="keywordtype">int</span> (*f_rng)(<span class="keywordtype">void</span> *),
<a name="l00363"></a>00363                   <span class="keywordtype">void</span> *p_rng );
<a name="l00364"></a>00364 
<a name="l00372"></a>00372 <span class="keywordtype">void</span> <a class="code" href="ssl_8h.html#a284ba5bb8d4f5e338b6a8ad9d45c9024" title="Set the debug callback.">ssl_set_dbg</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl,
<a name="l00373"></a>00373                   <span class="keywordtype">void</span> (*f_dbg)(<span class="keywordtype">void</span> *, <span class="keywordtype">int</span>, <span class="keyword">const</span> <span class="keywordtype">char</span> *),
<a name="l00374"></a>00374                   <span class="keywordtype">void</span>  *p_dbg );
<a name="l00375"></a>00375 
<a name="l00385"></a>00385 <span class="keywordtype">void</span> <a class="code" href="ssl_8h.html#a5fe35c2ffbb850964388e2085d7f22a4" title="Set the underlying BIO read and write callbacks.">ssl_set_bio</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl,
<a name="l00386"></a>00386         <span class="keywordtype">int</span> (*f_recv)(<span class="keywordtype">void</span> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *, <span class="keywordtype">int</span>), <span class="keywordtype">void</span> *p_recv,
<a name="l00387"></a>00387         <span class="keywordtype">int</span> (*f_send)(<span class="keywordtype">void</span> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *, <span class="keywordtype">int</span>), <span class="keywordtype">void</span> *p_send );
<a name="l00388"></a>00388 
<a name="l00396"></a>00396 <span class="keywordtype">void</span> <a class="code" href="ssl_8h.html#a88bd6f38c238703d38bfe9f8db49efb7" title="Set the session callbacks (server-side only)">ssl_set_scb</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl,
<a name="l00397"></a>00397                   <span class="keywordtype">int</span> (*s_get)(<a class="code" href="struct__ssl__context.html">ssl_context</a> *),
<a name="l00398"></a>00398                   <span class="keywordtype">int</span> (*s_set)(<a class="code" href="struct__ssl__context.html">ssl_context</a> *) );
<a name="l00399"></a>00399 
<a name="l00408"></a>00408 <span class="keywordtype">void</span> <a class="code" href="ssl_8h.html#a227f2d1077c32f6d901e6884c09c460d" title="Set the session resuming flag, timeout and data.">ssl_set_session</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl, <span class="keywordtype">int</span> resume, <span class="keywordtype">int</span> timeout,
<a name="l00409"></a>00409                       <a class="code" href="struct__ssl__session.html">ssl_session</a> *session );
<a name="l00410"></a>00410 
<a name="l00417"></a>00417 <span class="keywordtype">void</span> <a class="code" href="ssl_8h.html#a754095125a0363659a837b4955b42a32" title="Set the list of allowed ciphersuites.">ssl_set_ciphers</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl, <span class="keywordtype">int</span> *ciphers );
<a name="l00418"></a>00418 
<a name="l00429"></a>00429 <span class="keywordtype">void</span> <a class="code" href="ssl_8h.html#aaefe60889e957cc307a244ea6031783a" title="Set the data required to verify peer certificate.">ssl_set_ca_chain</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl, <a class="code" href="struct__x509__cert.html">x509_cert</a> *ca_chain,
<a name="l00430"></a>00430                        <a class="code" href="struct__x509__crl.html">x509_crl</a> *ca_crl, <span class="keyword">const</span> <span class="keywordtype">char</span> *peer_cn );
<a name="l00431"></a>00431 
<a name="l00439"></a>00439 <span class="keywordtype">void</span> <a class="code" href="ssl_8h.html#a211c7efa65a306d62cd5856b3b380275" title="Set own certificate and private key.">ssl_set_own_cert</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl, <a class="code" href="struct__x509__cert.html">x509_cert</a> *own_cert,
<a name="l00440"></a>00440                        <a class="code" href="structrsa__context.html" title="RSA context structure.">rsa_context</a> *rsa_key );
<a name="l00441"></a>00441 
<a name="l00452"></a>00452 <span class="keywordtype">int</span> <a class="code" href="ssl_8h.html#a1d143cccc27033e73b13cca6c09a144e" title="Set the Diffie-Hellman public P and G values, read as hexadecimal strings (server-side only)...">ssl_set_dh_param</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl, <span class="keyword">const</span> <span class="keywordtype">char</span> *dhm_P, <span class="keyword">const</span> <span class="keywordtype">char</span> *dhm_G );
<a name="l00453"></a>00453 
<a name="l00463"></a>00463 <span class="keywordtype">int</span> <a class="code" href="ssl_8h.html#a08d6dba305dbd338ed1d323dec44fc5e" title="Set hostname for ServerName TLS Extension.">ssl_set_hostname</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl, <span class="keyword">const</span> <span class="keywordtype">char</span> *hostname );
<a name="l00464"></a>00464 
<a name="l00472"></a>00472 <span class="keywordtype">int</span> <a class="code" href="ssl_8h.html#ad08eb44d12605b422054a1bd78b33eb8" title="Return the number of data bytes available to read.">ssl_get_bytes_avail</a>( <span class="keyword">const</span> <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00473"></a>00473 
<a name="l00485"></a>00485 <span class="keywordtype">int</span> <a class="code" href="ssl_8h.html#ac209bee37b76c6de34dd4d6bd97a7738" title="Return the result of the certificate verification.">ssl_get_verify_result</a>( <span class="keyword">const</span> <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00486"></a>00486 
<a name="l00494"></a>00494 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="ssl_8h.html#a303f7f37048d1c71af90019c07bd4033" title="Return the name of the current cipher.">ssl_get_cipher</a>( <span class="keyword">const</span> <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00495"></a>00495 
<a name="l00504"></a>00504 <span class="keywordtype">int</span> <a class="code" href="ssl_8h.html#ac16d7f3ed66ca2d497b47b0e68d58f20" title="Perform the SSL handshake.">ssl_handshake</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00505"></a>00505 
<a name="l00516"></a>00516 <span class="keywordtype">int</span> <a class="code" href="ssl_8h.html#a6d20f0d848db86fa3d81a2bae080b524" title="Read at most &#39;len&#39; application data bytes.">ssl_read</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> len );
<a name="l00517"></a>00517 
<a name="l00532"></a>00532 <span class="keywordtype">int</span> <a class="code" href="ssl_8h.html#ad87c332dd29a1b570f905d9e6978f0b7" title="Write exactly &#39;len&#39; application data bytes.">ssl_write</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> len );
<a name="l00533"></a>00533 
<a name="l00539"></a>00539 <span class="keywordtype">int</span> <a class="code" href="ssl_8h.html#ab9d44e2a86b85dea525b43ae31269bf7" title="Notify the peer that the connection is being closed.">ssl_close_notify</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00540"></a>00540 
<a name="l00546"></a>00546 <span class="keywordtype">void</span> <a class="code" href="ssl_8h.html#ac58911881e51c463abfca52e2143dfd3" title="Free an SSL context.">ssl_free</a>( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00547"></a>00547 
<a name="l00548"></a>00548 <span class="comment">/*</span>
<a name="l00549"></a>00549 <span class="comment"> * Internal functions (do not call directly)</span>
<a name="l00550"></a>00550 <span class="comment"> */</span>
<a name="l00551"></a>00551 <span class="keywordtype">int</span> ssl_handshake_client( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00552"></a>00552 <span class="keywordtype">int</span> ssl_handshake_server( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00553"></a>00553 
<a name="l00554"></a>00554 <span class="keywordtype">int</span> ssl_derive_keys( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00555"></a>00555 <span class="keywordtype">void</span> ssl_calc_verify( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> hash[36] );
<a name="l00556"></a>00556 
<a name="l00557"></a>00557 <span class="keywordtype">int</span> ssl_read_record( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00558"></a>00558 <span class="keywordtype">int</span> ssl_fetch_input( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl, <span class="keywordtype">int</span> nb_want );
<a name="l00559"></a>00559 
<a name="l00560"></a>00560 <span class="keywordtype">int</span> ssl_write_record( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00561"></a>00561 <span class="keywordtype">int</span> ssl_flush_output( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00562"></a>00562 
<a name="l00563"></a>00563 <span class="keywordtype">int</span> ssl_parse_certificate( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00564"></a>00564 <span class="keywordtype">int</span> ssl_write_certificate( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00565"></a>00565 
<a name="l00566"></a>00566 <span class="keywordtype">int</span> ssl_parse_change_cipher_spec( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00567"></a>00567 <span class="keywordtype">int</span> ssl_write_change_cipher_spec( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00568"></a>00568 
<a name="l00569"></a>00569 <span class="keywordtype">int</span> ssl_parse_finished( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00570"></a>00570 <span class="keywordtype">int</span> ssl_write_finished( <a class="code" href="struct__ssl__context.html">ssl_context</a> *ssl );
<a name="l00571"></a>00571 
<a name="l00572"></a>00572 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00573"></a>00573 <span class="preprocessor"></span>}
<a name="l00574"></a>00574 <span class="preprocessor">#endif</span>
<a name="l00575"></a>00575 <span class="preprocessor"></span>
<a name="l00576"></a>00576 <span class="preprocessor">#endif </span><span class="comment">/* ssl.h */</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated on Mon May 16 2011 for PolarSSL by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>