Sophie

Sophie

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

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/x509.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/x509.h</div>  </div>
</div>
<div class="contents">
<a href="x509_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_X509_H</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_X509_H</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &quot;<a class="code" href="rsa_8h.html">polarssl/rsa.h</a>&quot;</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="comment">/*</span>
<a name="l00031"></a>00031 <span class="comment"> * ASN1 Error codes</span>
<a name="l00032"></a>00032 <span class="comment"> *</span>
<a name="l00033"></a>00033 <span class="comment"> * These error codes will be OR&#39;ed to X509 error codes for</span>
<a name="l00034"></a>00034 <span class="comment"> * higher error granularity.</span>
<a name="l00035"></a>00035 <span class="comment"> */</span>
<a name="l00036"></a>00036 <span class="preprocessor">#define POLARSSL_ERR_ASN1_OUT_OF_DATA                      0x0014</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_ASN1_UNEXPECTED_TAG                   0x0016</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_ASN1_INVALID_LENGTH                   0x0018</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_ASN1_LENGTH_MISMATCH                  0x001A</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_ASN1_INVALID_DATA                     0x001C</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>
<a name="l00042"></a>00042 <span class="comment">/*</span>
<a name="l00043"></a>00043 <span class="comment"> * X509 Error codes</span>
<a name="l00044"></a>00044 <span class="comment"> */</span>
<a name="l00045"></a>00045 <span class="preprocessor">#define POLARSSL_ERR_X509_FEATURE_UNAVAILABLE              -0x0020</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_CERT_INVALID_PEM                 -0x0040</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_CERT_INVALID_FORMAT              -0x0060</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_CERT_INVALID_VERSION             -0x0080</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_CERT_INVALID_SERIAL              -0x00A0</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_CERT_INVALID_ALG                 -0x00C0</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_CERT_INVALID_NAME                -0x00E0</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_CERT_INVALID_DATE                -0x0100</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_CERT_INVALID_PUBKEY              -0x0120</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_CERT_INVALID_SIGNATURE           -0x0140</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_CERT_INVALID_EXTENSIONS          -0x0160</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_CERT_UNKNOWN_VERSION             -0x0180</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_CERT_UNKNOWN_SIG_ALG             -0x01A0</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_CERT_UNKNOWN_PK_ALG              -0x01C0</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_CERT_SIG_MISMATCH                -0x01E0</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_CERT_VERIFY_FAILED               -0x0200</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_KEY_INVALID_PEM                  -0x0220</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_KEY_INVALID_VERSION              -0x0240</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_KEY_INVALID_FORMAT               -0x0260</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_KEY_INVALID_ENC_IV               -0x0280</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_KEY_UNKNOWN_ENC_ALG              -0x02A0</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_KEY_PASSWORD_REQUIRED            -0x02C0</span>
<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_KEY_PASSWORD_MISMATCH            -0x02E0</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_POINT_ERROR                      -0x0300</span>
<a name="l00069"></a>00069 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_X509_VALUE_TO_LENGTH                  -0x0320</span>
<a name="l00070"></a>00070 <span class="preprocessor"></span>
<a name="l00071"></a>00071 <span class="comment">/*</span>
<a name="l00072"></a>00072 <span class="comment"> * X509 Verify codes</span>
<a name="l00073"></a>00073 <span class="comment"> */</span>
<a name="l00074"></a>00074 <span class="preprocessor">#define BADCERT_EXPIRED                 1</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#define BADCERT_REVOKED                 2</span>
<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor">#define BADCERT_CN_MISMATCH             4</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#define BADCERT_NOT_TRUSTED             8</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">#define BADCRL_NOT_TRUSTED             16</span>
<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#define BADCRL_EXPIRED                 32</span>
<a name="l00080"></a>00080 <span class="preprocessor"></span>
<a name="l00081"></a>00081 <span class="comment">/*</span>
<a name="l00082"></a>00082 <span class="comment"> * DER constants</span>
<a name="l00083"></a>00083 <span class="comment"> */</span>
<a name="l00084"></a>00084 <span class="preprocessor">#define ASN1_BOOLEAN                 0x01</span>
<a name="l00085"></a>00085 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_INTEGER                 0x02</span>
<a name="l00086"></a>00086 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_BIT_STRING              0x03</span>
<a name="l00087"></a>00087 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_OCTET_STRING            0x04</span>
<a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_NULL                    0x05</span>
<a name="l00089"></a>00089 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_OID                     0x06</span>
<a name="l00090"></a>00090 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_UTF8_STRING             0x0C</span>
<a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_SEQUENCE                0x10</span>
<a name="l00092"></a>00092 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_SET                     0x11</span>
<a name="l00093"></a>00093 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_PRINTABLE_STRING        0x13</span>
<a name="l00094"></a>00094 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_T61_STRING              0x14</span>
<a name="l00095"></a>00095 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_IA5_STRING              0x16</span>
<a name="l00096"></a>00096 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_UTC_TIME                0x17</span>
<a name="l00097"></a>00097 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_GENERALIZED_TIME        0x18</span>
<a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_UNIVERSAL_STRING        0x1C</span>
<a name="l00099"></a>00099 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_BMP_STRING              0x1E</span>
<a name="l00100"></a>00100 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_PRIMITIVE               0x00</span>
<a name="l00101"></a>00101 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_CONSTRUCTED             0x20</span>
<a name="l00102"></a>00102 <span class="preprocessor"></span><span class="preprocessor">#define ASN1_CONTEXT_SPECIFIC        0x80</span>
<a name="l00103"></a>00103 <span class="preprocessor"></span>
<a name="l00104"></a>00104 <span class="comment">/*</span>
<a name="l00105"></a>00105 <span class="comment"> * various object identifiers</span>
<a name="l00106"></a>00106 <span class="comment"> */</span>
<a name="l00107"></a>00107 <span class="preprocessor">#define X520_COMMON_NAME                3</span>
<a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor">#define X520_COUNTRY                    6</span>
<a name="l00109"></a>00109 <span class="preprocessor"></span><span class="preprocessor">#define X520_LOCALITY                   7</span>
<a name="l00110"></a>00110 <span class="preprocessor"></span><span class="preprocessor">#define X520_STATE                      8</span>
<a name="l00111"></a>00111 <span class="preprocessor"></span><span class="preprocessor">#define X520_ORGANIZATION              10</span>
<a name="l00112"></a>00112 <span class="preprocessor"></span><span class="preprocessor">#define X520_ORG_UNIT                  11</span>
<a name="l00113"></a>00113 <span class="preprocessor"></span><span class="preprocessor">#define PKCS9_EMAIL                     1</span>
<a name="l00114"></a>00114 <span class="preprocessor"></span>
<a name="l00115"></a>00115 <span class="preprocessor">#define X509_OUTPUT_DER              0x01</span>
<a name="l00116"></a>00116 <span class="preprocessor"></span><span class="preprocessor">#define X509_OUTPUT_PEM              0x02</span>
<a name="l00117"></a>00117 <span class="preprocessor"></span><span class="preprocessor">#define PEM_LINE_LENGTH                72</span>
<a name="l00118"></a>00118 <span class="preprocessor"></span><span class="preprocessor">#define X509_ISSUER                  0x01</span>
<a name="l00119"></a>00119 <span class="preprocessor"></span><span class="preprocessor">#define X509_SUBJECT                 0x02</span>
<a name="l00120"></a>00120 <span class="preprocessor"></span>
<a name="l00121"></a>00121 <span class="preprocessor">#define OID_X520                &quot;\x55\x04&quot;</span>
<a name="l00122"></a>00122 <span class="preprocessor"></span><span class="preprocessor">#define OID_CN                  &quot;\x55\x04\x03&quot;</span>
<a name="l00123"></a>00123 <span class="preprocessor"></span><span class="preprocessor">#define OID_PKCS1               &quot;\x2A\x86\x48\x86\xF7\x0D\x01\x01&quot;</span>
<a name="l00124"></a>00124 <span class="preprocessor"></span><span class="preprocessor">#define OID_PKCS1_RSA           &quot;\x2A\x86\x48\x86\xF7\x0D\x01\x01\x01&quot;</span>
<a name="l00125"></a>00125 <span class="preprocessor"></span><span class="preprocessor">#define OID_RSA_SHA_OBS         &quot;\x2B\x0E\x03\x02\x1D&quot;</span>
<a name="l00126"></a>00126 <span class="preprocessor"></span><span class="preprocessor">#define OID_PKCS9               &quot;\x2A\x86\x48\x86\xF7\x0D\x01\x09&quot;</span>
<a name="l00127"></a>00127 <span class="preprocessor"></span><span class="preprocessor">#define OID_PKCS9_EMAIL         &quot;\x2A\x86\x48\x86\xF7\x0D\x01\x09\x01&quot;</span>
<a name="l00128"></a>00128 <span class="preprocessor"></span>
<a name="l00129"></a>00129 <span class="comment">/*</span>
<a name="l00130"></a>00130 <span class="comment"> * Structures for parsing X.509 certificates</span>
<a name="l00131"></a>00131 <span class="comment"> */</span>
<a name="l00132"></a><a class="code" href="struct__x509__buf.html">00132</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__x509__buf.html">_x509_buf</a>
<a name="l00133"></a>00133 {
<a name="l00134"></a>00134     <span class="keywordtype">int</span> tag;
<a name="l00135"></a>00135     <span class="keywordtype">int</span> len;
<a name="l00136"></a>00136     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *p;
<a name="l00137"></a>00137 }
<a name="l00138"></a>00138 <a class="code" href="struct__x509__buf.html">x509_buf</a>;
<a name="l00139"></a>00139 
<a name="l00140"></a><a class="code" href="struct__x509__name.html">00140</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__x509__name.html">_x509_name</a>
<a name="l00141"></a>00141 {
<a name="l00142"></a>00142     <a class="code" href="struct__x509__buf.html">x509_buf</a> oid;
<a name="l00143"></a>00143     <a class="code" href="struct__x509__buf.html">x509_buf</a> val;
<a name="l00144"></a>00144     <span class="keyword">struct </span><a class="code" href="struct__x509__name.html">_x509_name</a> *next;
<a name="l00145"></a>00145 }
<a name="l00146"></a>00146 <a class="code" href="struct__x509__name.html">x509_name</a>;
<a name="l00147"></a>00147 
<a name="l00148"></a><a class="code" href="struct__x509__time.html">00148</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__x509__time.html">_x509_time</a>
<a name="l00149"></a>00149 {
<a name="l00150"></a>00150     <span class="keywordtype">int</span> year, mon, day;
<a name="l00151"></a>00151     <span class="keywordtype">int</span> hour, min, sec;
<a name="l00152"></a>00152 }
<a name="l00153"></a>00153 <a class="code" href="struct__x509__time.html">x509_time</a>;
<a name="l00154"></a>00154 
<a name="l00155"></a><a class="code" href="struct__x509__cert.html">00155</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__x509__cert.html">_x509_cert</a>
<a name="l00156"></a>00156 {
<a name="l00157"></a>00157     <a class="code" href="struct__x509__buf.html">x509_buf</a> raw;
<a name="l00158"></a>00158     <a class="code" href="struct__x509__buf.html">x509_buf</a> tbs;
<a name="l00159"></a>00159 
<a name="l00160"></a>00160     <span class="keywordtype">int</span> version;
<a name="l00161"></a>00161     <a class="code" href="struct__x509__buf.html">x509_buf</a> serial;
<a name="l00162"></a>00162     <a class="code" href="struct__x509__buf.html">x509_buf</a> sig_oid1;
<a name="l00163"></a>00163 
<a name="l00164"></a>00164     <a class="code" href="struct__x509__buf.html">x509_buf</a> issuer_raw;
<a name="l00165"></a>00165     <a class="code" href="struct__x509__buf.html">x509_buf</a> subject_raw;
<a name="l00166"></a>00166 
<a name="l00167"></a>00167     <a class="code" href="struct__x509__name.html">x509_name</a> issuer;
<a name="l00168"></a>00168     <a class="code" href="struct__x509__name.html">x509_name</a> subject;
<a name="l00169"></a>00169 
<a name="l00170"></a>00170     <a class="code" href="struct__x509__time.html">x509_time</a> valid_from;
<a name="l00171"></a>00171     <a class="code" href="struct__x509__time.html">x509_time</a> valid_to;
<a name="l00172"></a>00172 
<a name="l00173"></a>00173     <a class="code" href="struct__x509__buf.html">x509_buf</a> pk_oid;
<a name="l00174"></a>00174     <a class="code" href="structrsa__context.html" title="RSA context structure.">rsa_context</a> rsa;
<a name="l00175"></a>00175 
<a name="l00176"></a>00176     <a class="code" href="struct__x509__buf.html">x509_buf</a> issuer_id;
<a name="l00177"></a>00177     <a class="code" href="struct__x509__buf.html">x509_buf</a> subject_id;
<a name="l00178"></a>00178     <a class="code" href="struct__x509__buf.html">x509_buf</a> v3_ext;
<a name="l00179"></a>00179 
<a name="l00180"></a>00180     <span class="keywordtype">int</span> ca_istrue;
<a name="l00181"></a>00181     <span class="keywordtype">int</span> max_pathlen;
<a name="l00182"></a>00182 
<a name="l00183"></a>00183     <a class="code" href="struct__x509__buf.html">x509_buf</a> sig_oid2;
<a name="l00184"></a>00184     <a class="code" href="struct__x509__buf.html">x509_buf</a> sig;
<a name="l00185"></a>00185     <span class="keywordtype">int</span> sig_alg;
<a name="l00186"></a>00186 
<a name="l00187"></a>00187     <span class="keyword">struct </span><a class="code" href="struct__x509__cert.html">_x509_cert</a> *next; 
<a name="l00188"></a>00188 }
<a name="l00189"></a>00189 <a class="code" href="struct__x509__cert.html">x509_cert</a>;
<a name="l00190"></a>00190 
<a name="l00191"></a><a class="code" href="struct__x509__crl__entry.html">00191</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__x509__crl__entry.html">_x509_crl_entry</a>
<a name="l00192"></a>00192 {
<a name="l00193"></a>00193     <a class="code" href="struct__x509__buf.html">x509_buf</a> raw;
<a name="l00194"></a>00194 
<a name="l00195"></a>00195     <a class="code" href="struct__x509__buf.html">x509_buf</a> serial;
<a name="l00196"></a>00196 
<a name="l00197"></a>00197     <a class="code" href="struct__x509__time.html">x509_time</a> revocation_date;
<a name="l00198"></a>00198 
<a name="l00199"></a>00199     <a class="code" href="struct__x509__buf.html">x509_buf</a> entry_ext;
<a name="l00200"></a>00200 
<a name="l00201"></a>00201     <span class="keyword">struct </span><a class="code" href="struct__x509__crl__entry.html">_x509_crl_entry</a> *next;
<a name="l00202"></a>00202 }
<a name="l00203"></a>00203 <a class="code" href="struct__x509__crl__entry.html">x509_crl_entry</a>;
<a name="l00204"></a>00204 
<a name="l00205"></a><a class="code" href="struct__x509__crl.html">00205</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__x509__crl.html">_x509_crl</a>
<a name="l00206"></a>00206 {
<a name="l00207"></a>00207     <a class="code" href="struct__x509__buf.html">x509_buf</a> raw;
<a name="l00208"></a>00208     <a class="code" href="struct__x509__buf.html">x509_buf</a> tbs;
<a name="l00209"></a>00209 
<a name="l00210"></a>00210     <span class="keywordtype">int</span> version;
<a name="l00211"></a>00211     <a class="code" href="struct__x509__buf.html">x509_buf</a> sig_oid1;
<a name="l00212"></a>00212 
<a name="l00213"></a>00213     <a class="code" href="struct__x509__buf.html">x509_buf</a> issuer_raw;
<a name="l00214"></a>00214 
<a name="l00215"></a>00215     <a class="code" href="struct__x509__name.html">x509_name</a> issuer;
<a name="l00216"></a>00216 
<a name="l00217"></a>00217     <a class="code" href="struct__x509__time.html">x509_time</a> this_update;
<a name="l00218"></a>00218     <a class="code" href="struct__x509__time.html">x509_time</a> next_update;
<a name="l00219"></a>00219 
<a name="l00220"></a>00220     <a class="code" href="struct__x509__crl__entry.html">x509_crl_entry</a> entry;
<a name="l00221"></a>00221 
<a name="l00222"></a>00222     <a class="code" href="struct__x509__buf.html">x509_buf</a> crl_ext;
<a name="l00223"></a>00223 
<a name="l00224"></a>00224     <a class="code" href="struct__x509__buf.html">x509_buf</a> sig_oid2;
<a name="l00225"></a>00225     <a class="code" href="struct__x509__buf.html">x509_buf</a> sig;
<a name="l00226"></a>00226     <span class="keywordtype">int</span> sig_alg;
<a name="l00227"></a>00227 
<a name="l00228"></a>00228     <span class="keyword">struct </span><a class="code" href="struct__x509__crl.html">_x509_crl</a> *next; 
<a name="l00229"></a>00229 }
<a name="l00230"></a>00230 <a class="code" href="struct__x509__crl.html">x509_crl</a>;
<a name="l00231"></a>00231 
<a name="l00232"></a>00232 <span class="comment">/*</span>
<a name="l00233"></a>00233 <span class="comment"> * Structures for writing X.509 certificates</span>
<a name="l00234"></a>00234 <span class="comment"> */</span>
<a name="l00235"></a><a class="code" href="struct__x509__node.html">00235</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__x509__node.html">_x509_node</a>
<a name="l00236"></a>00236 {
<a name="l00237"></a>00237     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *data;
<a name="l00238"></a>00238     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *p;
<a name="l00239"></a>00239     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *end;
<a name="l00240"></a>00240 
<a name="l00241"></a>00241     <span class="keywordtype">size_t</span> len;
<a name="l00242"></a>00242 }
<a name="l00243"></a>00243 <a class="code" href="struct__x509__node.html">x509_node</a>;
<a name="l00244"></a>00244 
<a name="l00245"></a><a class="code" href="struct__x509__raw.html">00245</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__x509__raw.html">_x509_raw</a>
<a name="l00246"></a>00246 {
<a name="l00247"></a>00247     <a class="code" href="struct__x509__node.html">x509_node</a> raw;
<a name="l00248"></a>00248     <a class="code" href="struct__x509__node.html">x509_node</a> tbs;
<a name="l00249"></a>00249 
<a name="l00250"></a>00250     <a class="code" href="struct__x509__node.html">x509_node</a> version;
<a name="l00251"></a>00251     <a class="code" href="struct__x509__node.html">x509_node</a> serial;
<a name="l00252"></a>00252     <a class="code" href="struct__x509__node.html">x509_node</a> tbs_signalg;
<a name="l00253"></a>00253     <a class="code" href="struct__x509__node.html">x509_node</a> issuer;
<a name="l00254"></a>00254     <a class="code" href="struct__x509__node.html">x509_node</a> validity;
<a name="l00255"></a>00255     <a class="code" href="struct__x509__node.html">x509_node</a> subject;
<a name="l00256"></a>00256     <a class="code" href="struct__x509__node.html">x509_node</a> subpubkey;
<a name="l00257"></a>00257 
<a name="l00258"></a>00258     <a class="code" href="struct__x509__node.html">x509_node</a> signalg;
<a name="l00259"></a>00259     <a class="code" href="struct__x509__node.html">x509_node</a> sign;
<a name="l00260"></a>00260 }
<a name="l00261"></a>00261 <a class="code" href="struct__x509__raw.html">x509_raw</a>;
<a name="l00262"></a>00262 
<a name="l00263"></a>00263 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00264"></a>00264 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00265"></a>00265 <span class="preprocessor">#endif</span>
<a name="l00266"></a>00266 <span class="preprocessor"></span>
<a name="l00277"></a>00277 <span class="keywordtype">int</span> <a class="code" href="x509_8h.html#a91ec44a937b911fe1032c99900920fd8" title="Parse one or more certificates and add them to the chained list.">x509parse_crt</a>( <a class="code" href="struct__x509__cert.html">x509_cert</a> *chain, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> buflen );
<a name="l00278"></a>00278 
<a name="l00288"></a>00288 <span class="keywordtype">int</span> <a class="code" href="x509_8h.html#a830b87ec90ed51fcdec55ad5fbe24251" title="Load one or more certificates and add them to the chained list.">x509parse_crtfile</a>( <a class="code" href="struct__x509__cert.html">x509_cert</a> *chain, <span class="keyword">const</span> <span class="keywordtype">char</span> *path );
<a name="l00289"></a>00289 
<a name="l00300"></a>00300 <span class="keywordtype">int</span> <a class="code" href="x509_8h.html#a0223bc1ca74c12c1bef3e0b8b31d9022" title="Parse one or more CRLs and add them to the chained list.">x509parse_crl</a>( <a class="code" href="struct__x509__crl.html">x509_crl</a> *chain, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> buflen );
<a name="l00301"></a>00301 
<a name="l00311"></a>00311 <span class="keywordtype">int</span> <a class="code" href="x509_8h.html#ae07469859cb8e9de4779d31ee1c63d64" title="Load one or more CRLs and add them to the chained list.">x509parse_crlfile</a>( <a class="code" href="struct__x509__crl.html">x509_crl</a> *chain, <span class="keyword">const</span> <span class="keywordtype">char</span> *path );
<a name="l00312"></a>00312 
<a name="l00324"></a>00324 <span class="keywordtype">int</span> <a class="code" href="x509_8h.html#ad7a70dffe8f7e13e1a1099031302d9fe" title="Parse a private RSA key.">x509parse_key</a>( <a class="code" href="structrsa__context.html" title="RSA context structure.">rsa_context</a> *rsa,
<a name="l00325"></a>00325                    <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *key, <span class="keywordtype">int</span> keylen,
<a name="l00326"></a>00326                    <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *pwd, <span class="keywordtype">int</span> pwdlen );
<a name="l00327"></a>00327 
<a name="l00337"></a>00337 <span class="keywordtype">int</span> <a class="code" href="x509_8h.html#a13b4022c81bd138610e902fb48709c9d" title="Load and parse a private RSA key.">x509parse_keyfile</a>( <a class="code" href="structrsa__context.html" title="RSA context structure.">rsa_context</a> *rsa, <span class="keyword">const</span> <span class="keywordtype">char</span> *path,
<a name="l00338"></a>00338                        <span class="keyword">const</span> <span class="keywordtype">char</span> *password );
<a name="l00339"></a>00339 
<a name="l00351"></a>00351 <span class="keywordtype">int</span> <a class="code" href="x509_8h.html#a6d5f50efc32fb2d1ecb9a71345de6a89" title="Store the certificate DN in printable form into buf; no more than size characters will be written...">x509parse_dn_gets</a>( <span class="keywordtype">char</span> *buf, <span class="keywordtype">size_t</span> size, <span class="keyword">const</span> <a class="code" href="struct__x509__name.html">x509_name</a> *dn );
<a name="l00352"></a>00352 
<a name="l00365"></a>00365 <span class="keywordtype">int</span> <a class="code" href="x509_8h.html#a448c4ee94531ff9ef424f1133508ad8d" title="Returns an informational string about the certificate.">x509parse_cert_info</a>( <span class="keywordtype">char</span> *buf, <span class="keywordtype">size_t</span> size, <span class="keyword">const</span> <span class="keywordtype">char</span> *prefix,
<a name="l00366"></a>00366                          <span class="keyword">const</span> <a class="code" href="struct__x509__cert.html">x509_cert</a> *crt );
<a name="l00367"></a>00367 
<a name="l00380"></a>00380 <span class="keywordtype">int</span> <a class="code" href="x509_8h.html#abfc319de12efcfe71c5f1503342aa5b8" title="Returns an informational string about the CRL.">x509parse_crl_info</a>( <span class="keywordtype">char</span> *buf, <span class="keywordtype">size_t</span> size, <span class="keyword">const</span> <span class="keywordtype">char</span> *prefix,
<a name="l00381"></a>00381                         <span class="keyword">const</span> <a class="code" href="struct__x509__crl.html">x509_crl</a> *crl );
<a name="l00382"></a>00382 
<a name="l00392"></a>00392 <span class="keywordtype">int</span> <a class="code" href="x509_8h.html#ae7b36f60674ea1937ba373e633420599" title="Check a given x509_time against the system time and check if it is valid.">x509parse_time_expired</a>( <span class="keyword">const</span> <a class="code" href="struct__x509__time.html">x509_time</a> *time );
<a name="l00393"></a>00393 
<a name="l00414"></a>00414 <span class="keywordtype">int</span> <a class="code" href="x509_8h.html#a35cd90e3e1e232bd292619b95305f7ae" title="Verify the certificate signature.">x509parse_verify</a>( <a class="code" href="struct__x509__cert.html">x509_cert</a> *crt,
<a name="l00415"></a>00415                       <a class="code" href="struct__x509__cert.html">x509_cert</a> *trust_ca,
<a name="l00416"></a>00416                       <a class="code" href="struct__x509__crl.html">x509_crl</a> *ca_crl,
<a name="l00417"></a>00417                       <span class="keyword">const</span> <span class="keywordtype">char</span> *cn, <span class="keywordtype">int</span> *flags );
<a name="l00418"></a>00418 
<a name="l00424"></a>00424 <span class="keywordtype">void</span> <a class="code" href="x509_8h.html#a5f1334782538ef0ac2ebf430b966fcc3" title="Unallocate all certificate data.">x509_free</a>( <a class="code" href="struct__x509__cert.html">x509_cert</a> *crt );
<a name="l00425"></a>00425 
<a name="l00431"></a>00431 <span class="keywordtype">void</span> <a class="code" href="x509_8h.html#a99ed152b33d41e55cd14a78c7dcf7bef" title="Unallocate all CRL data.">x509_crl_free</a>( <a class="code" href="struct__x509__crl.html">x509_crl</a> *crl );
<a name="l00432"></a>00432 
<a name="l00438"></a>00438 <span class="keywordtype">int</span> <a class="code" href="x509_8h.html#a4a038a644bb6f527315bcfdea826bf79" title="Checkup routine.">x509_self_test</a>( <span class="keywordtype">int</span> verbose );
<a name="l00439"></a>00439 
<a name="l00440"></a>00440 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00441"></a>00441 <span class="preprocessor"></span>}
<a name="l00442"></a>00442 <span class="preprocessor">#endif</span>
<a name="l00443"></a>00443 <span class="preprocessor"></span>
<a name="l00444"></a>00444 <span class="preprocessor">#endif </span><span class="comment">/* x509.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>