Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 42b8e67cd59abacb81e11c7ba39524d1 > files > 55

apr-api-docs-1.4.2-1.fc15.noarch.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>Apache Portable Runtime: apr_ldap_option.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.3 -->
<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">Apache Portable Runtime</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="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</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>Globals</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>apr_ldap_option.h</h1>  </div>
</div>
<div class="contents">
<a href="apr__ldap__option_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* Licensed to the Apache Software Foundation (ASF) under one or more</span>
<a name="l00002"></a>00002 <span class="comment"> * contributor license agreements.  See the NOTICE file distributed with</span>
<a name="l00003"></a>00003 <span class="comment"> * this work for additional information regarding copyright ownership.</span>
<a name="l00004"></a>00004 <span class="comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</span>
<a name="l00005"></a>00005 <span class="comment"> * (the &quot;License&quot;); you may not use this file except in compliance with</span>
<a name="l00006"></a>00006 <span class="comment"> * the License.  You may obtain a copy of the License at</span>
<a name="l00007"></a>00007 <span class="comment"> *</span>
<a name="l00008"></a>00008 <span class="comment"> *     http://www.apache.org/licenses/LICENSE-2.0</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
<a name="l00011"></a>00011 <span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span>
<a name="l00012"></a>00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
<a name="l00013"></a>00013 <span class="comment"> * See the License for the specific language governing permissions and</span>
<a name="l00014"></a>00014 <span class="comment"> * limitations under the License.</span>
<a name="l00015"></a>00015 <span class="comment"> */</span>
<a name="l00016"></a>00016 <span class="comment"></span>
<a name="l00017"></a>00017 <span class="comment">/**</span>
<a name="l00018"></a>00018 <span class="comment"> * @file apr_ldap_option.h</span>
<a name="l00019"></a>00019 <span class="comment"> * @brief  APR-UTIL LDAP ldap_*_option() functions</span>
<a name="l00020"></a>00020 <span class="comment"> */</span>
<a name="l00021"></a>00021 <span class="preprocessor">#ifndef APR_LDAP_OPTION_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define APR_LDAP_OPTION_H</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00024"></a>00024 <span class="comment">/**</span>
<a name="l00025"></a>00025 <span class="comment"> * @addtogroup APR_Util_LDAP</span>
<a name="l00026"></a>00026 <span class="comment"> * @{</span>
<a name="l00027"></a>00027 <span class="comment"> */</span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;<a class="code" href="apr__ldap_8h.html" title="APR-UTIL LDAP.">apr_ldap.h</a>&quot;</span>
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="preprocessor">#if APR_HAS_LDAP</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span>
<a name="l00033"></a>00033 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00035"></a>00035 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 <span class="comment">/*</span>
<a name="l00038"></a>00038 <span class="comment"> * The following defines handle the different TLS certificate</span>
<a name="l00039"></a>00039 <span class="comment"> * options available. If these options are missing, APR will try and</span>
<a name="l00040"></a>00040 <span class="comment"> * emulate support for this using the deprecated ldap_start_tls_s()</span>
<a name="l00041"></a>00041 <span class="comment"> * function.</span>
<a name="l00042"></a>00042 <span class="comment"> */</span><span class="comment"></span>
<a name="l00043"></a>00043 <span class="comment">/**</span>
<a name="l00044"></a>00044 <span class="comment"> * Set SSL mode to one of APR_LDAP_NONE, APR_LDAP_SSL, APR_LDAP_STARTTLS</span>
<a name="l00045"></a>00045 <span class="comment"> * or APR_LDAP_STOPTLS.</span>
<a name="l00046"></a>00046 <span class="comment"> */</span>
<a name="l00047"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#gae3eda4797aebb6dadeb5876c0f7f4b0b">00047</a> <span class="preprocessor">#define APR_LDAP_OPT_TLS 0x6fff</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00049"></a>00049 <span class="comment"> * Set zero or more CA certificates, client certificates or private</span>
<a name="l00050"></a>00050 <span class="comment"> * keys globally, or per connection (where supported).</span>
<a name="l00051"></a>00051 <span class="comment"> */</span>
<a name="l00052"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#gaa36993968e0225cb175eb17039337433">00052</a> <span class="preprocessor">#define APR_LDAP_OPT_TLS_CERT 0x6ffe</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00054"></a>00054 <span class="comment"> * Set the LDAP library to no verify the server certificate.  This means</span>
<a name="l00055"></a>00055 <span class="comment"> * all servers are considered trusted.</span>
<a name="l00056"></a>00056 <span class="comment"> */</span>
<a name="l00057"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#ga30949c4b417283ea02049267a5b7b1b1">00057</a> <span class="preprocessor">#define APR_LDAP_OPT_VERIFY_CERT 0x6ffd</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00059"></a>00059 <span class="comment"> * Set the LDAP library to indicate if referrals should be chased during</span>
<a name="l00060"></a>00060 <span class="comment"> * LDAP searches.</span>
<a name="l00061"></a>00061 <span class="comment"> */</span>
<a name="l00062"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#gaaa1fbd408f4d18c39ef5332f8d0f4745">00062</a> <span class="preprocessor">#define APR_LDAP_OPT_REFERRALS 0x6ffc</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00064"></a>00064 <span class="comment"> * Set the LDAP library to indicate a maximum number of referral hops to</span>
<a name="l00065"></a>00065 <span class="comment"> * chase before giving up on the search.</span>
<a name="l00066"></a>00066 <span class="comment"> */</span>
<a name="l00067"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#ga3dcf151b8758dae4ccf86d1cf26f4bfc">00067</a> <span class="preprocessor">#define APR_LDAP_OPT_REFHOPLIMIT 0x6ffb</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00069"></a>00069 <span class="comment">/**</span>
<a name="l00070"></a>00070 <span class="comment"> * Structures for the apr_set_option() cases</span>
<a name="l00071"></a>00071 <span class="comment"> */</span>
<a name="l00072"></a>00072 <span class="comment"></span>
<a name="l00073"></a>00073 <span class="comment">/**</span>
<a name="l00074"></a>00074 <span class="comment"> * APR_LDAP_OPT_TLS_CERT</span>
<a name="l00075"></a>00075 <span class="comment"> *</span>
<a name="l00076"></a>00076 <span class="comment"> * This structure includes possible options to set certificates on</span>
<a name="l00077"></a>00077 <span class="comment"> * system initialisation. Different SDKs have different certificate</span>
<a name="l00078"></a>00078 <span class="comment"> * requirements, and to achieve this multiple certificates must be</span>
<a name="l00079"></a>00079 <span class="comment"> * specified at once passed as an (apr_array_header_t *).</span>
<a name="l00080"></a>00080 <span class="comment"> *</span>
<a name="l00081"></a>00081 <span class="comment"> * Netscape:</span>
<a name="l00082"></a>00082 <span class="comment"> * Needs the CA cert database (cert7.db), the client cert database (key3.db)</span>
<a name="l00083"></a>00083 <span class="comment"> * and the security module file (secmod.db) set at the system initialisation</span>
<a name="l00084"></a>00084 <span class="comment"> * time. Three types are supported: APR_LDAP_CERT7_DB, APR_LDAP_KEY3_DB and</span>
<a name="l00085"></a>00085 <span class="comment"> * APR_LDAP_SECMOD.</span>
<a name="l00086"></a>00086 <span class="comment"> *</span>
<a name="l00087"></a>00087 <span class="comment"> * To specify a client cert connection, a certificate nickname needs to be</span>
<a name="l00088"></a>00088 <span class="comment"> * provided with a type of APR_LDAP_CERT.</span>
<a name="l00089"></a>00089 <span class="comment"> * int ldapssl_enable_clientauth( LDAP *ld, char *keynickname,</span>
<a name="l00090"></a>00090 <span class="comment"> * char *keypasswd, char *certnickname );</span>
<a name="l00091"></a>00091 <span class="comment"> * keynickname is currently not used, and should be set to &quot;&quot;</span>
<a name="l00092"></a>00092 <span class="comment"> *</span>
<a name="l00093"></a>00093 <span class="comment"> * Novell:</span>
<a name="l00094"></a>00094 <span class="comment"> * Needs CA certificates and client certificates set at system initialisation</span>
<a name="l00095"></a>00095 <span class="comment"> * time. Three types are supported: APR_LDAP_CA*, APR_LDAP_CERT* and</span>
<a name="l00096"></a>00096 <span class="comment"> * APR_LDAP_KEY*.</span>
<a name="l00097"></a>00097 <span class="comment"> *</span>
<a name="l00098"></a>00098 <span class="comment"> * Certificates cannot be specified per connection.</span>
<a name="l00099"></a>00099 <span class="comment"> *</span>
<a name="l00100"></a>00100 <span class="comment"> * The functions used are:</span>
<a name="l00101"></a>00101 <span class="comment"> * ldapssl_add_trusted_cert(serverTrustedRoot, serverTrustedRootEncoding);</span>
<a name="l00102"></a>00102 <span class="comment"> * Clients certs and keys are set at system initialisation time with</span>
<a name="l00103"></a>00103 <span class="comment"> * int ldapssl_set_client_cert (</span>
<a name="l00104"></a>00104 <span class="comment"> *  void   *cert,</span>
<a name="l00105"></a>00105 <span class="comment"> *  int     type</span>
<a name="l00106"></a>00106 <span class="comment"> *  void   *password); </span>
<a name="l00107"></a>00107 <span class="comment"> * type can be LDAPSSL_CERT_FILETYPE_B64 or LDAPSSL_CERT_FILETYPE_DER</span>
<a name="l00108"></a>00108 <span class="comment"> *  ldapssl_set_client_private_key(clientPrivateKey,</span>
<a name="l00109"></a>00109 <span class="comment"> *                                 clientPrivateKeyEncoding,</span>
<a name="l00110"></a>00110 <span class="comment"> *                                 clientPrivateKeyPassword);</span>
<a name="l00111"></a>00111 <span class="comment"> *</span>
<a name="l00112"></a>00112 <span class="comment"> * OpenSSL:</span>
<a name="l00113"></a>00113 <span class="comment"> * Needs one or more CA certificates to be set at system initialisation time</span>
<a name="l00114"></a>00114 <span class="comment"> * with a type of APR_LDAP_CA*.</span>
<a name="l00115"></a>00115 <span class="comment"> *</span>
<a name="l00116"></a>00116 <span class="comment"> * May have one or more client certificates set per connection with a type of</span>
<a name="l00117"></a>00117 <span class="comment"> * APR_LDAP_CERT*, and keys with APR_LDAP_KEY*.</span>
<a name="l00118"></a>00118 <span class="comment"> */</span><span class="comment"></span>
<a name="l00119"></a>00119 <span class="comment">/** CA certificate type unknown */</span>
<a name="l00120"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#ga90551ccd55675410d148e1396d708585">00120</a> <span class="preprocessor">#define APR_LDAP_CA_TYPE_UNKNOWN    0</span>
<a name="l00121"></a>00121 <span class="preprocessor"></span><span class="comment">/** binary DER encoded CA certificate */</span>
<a name="l00122"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#gab5336a116c3881aa68ea5fe81c6cebce">00122</a> <span class="preprocessor">#define APR_LDAP_CA_TYPE_DER        1</span>
<a name="l00123"></a>00123 <span class="preprocessor"></span><span class="comment">/** PEM encoded CA certificate */</span>
<a name="l00124"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#ga873a9f3a55f8345e79314bcff4d2da63">00124</a> <span class="preprocessor">#define APR_LDAP_CA_TYPE_BASE64     2</span>
<a name="l00125"></a>00125 <span class="preprocessor"></span><span class="comment">/** Netscape/Mozilla cert7.db CA certificate database */</span>
<a name="l00126"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#gab52397cf2a484bf259c8057292baf277">00126</a> <span class="preprocessor">#define APR_LDAP_CA_TYPE_CERT7_DB   3</span>
<a name="l00127"></a>00127 <span class="preprocessor"></span><span class="comment">/** Netscape/Mozilla secmod file */</span>
<a name="l00128"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#gae31e900be314a4a41d6b4a80c77fc0a5">00128</a> <span class="preprocessor">#define APR_LDAP_CA_TYPE_SECMOD     4</span>
<a name="l00129"></a>00129 <span class="preprocessor"></span><span class="comment">/** Client certificate type unknown */</span>
<a name="l00130"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#ga330f63f481bdd6d1a2cd11b2f00931f9">00130</a> <span class="preprocessor">#define APR_LDAP_CERT_TYPE_UNKNOWN  5</span>
<a name="l00131"></a>00131 <span class="preprocessor"></span><span class="comment">/** binary DER encoded client certificate */</span>
<a name="l00132"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#ga83bb061671b300a894b9da953389ce5d">00132</a> <span class="preprocessor">#define APR_LDAP_CERT_TYPE_DER      6</span>
<a name="l00133"></a>00133 <span class="preprocessor"></span><span class="comment">/** PEM encoded client certificate */</span>
<a name="l00134"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#ga4e1047465f7938aa4f18602289dbdb75">00134</a> <span class="preprocessor">#define APR_LDAP_CERT_TYPE_BASE64   7</span>
<a name="l00135"></a>00135 <span class="preprocessor"></span><span class="comment">/** Netscape/Mozilla key3.db client certificate database */</span>
<a name="l00136"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#gaabac1737dbe1c96cb71087cf3225cf33">00136</a> <span class="preprocessor">#define APR_LDAP_CERT_TYPE_KEY3_DB  8</span>
<a name="l00137"></a>00137 <span class="preprocessor"></span><span class="comment">/** Netscape/Mozilla client certificate nickname */</span>
<a name="l00138"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#ga126182df3d24a1144e661fd1c076de62">00138</a> <span class="preprocessor">#define APR_LDAP_CERT_TYPE_NICKNAME 9</span>
<a name="l00139"></a>00139 <span class="preprocessor"></span><span class="comment">/** Private key type unknown */</span>
<a name="l00140"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#ga4ec017388c41432a6a255ecb28e0ae2d">00140</a> <span class="preprocessor">#define APR_LDAP_KEY_TYPE_UNKNOWN   10</span>
<a name="l00141"></a>00141 <span class="preprocessor"></span><span class="comment">/** binary DER encoded private key */</span>
<a name="l00142"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#ga028ac0e4cb1e00fc43509d7d568b5495">00142</a> <span class="preprocessor">#define APR_LDAP_KEY_TYPE_DER       11</span>
<a name="l00143"></a>00143 <span class="preprocessor"></span><span class="comment">/** PEM encoded private key */</span>
<a name="l00144"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#ga13aa9e6dbfe8aa898d139bfc7ae606d1">00144</a> <span class="preprocessor">#define APR_LDAP_KEY_TYPE_BASE64    12</span>
<a name="l00145"></a>00145 <span class="preprocessor"></span><span class="comment">/** PKCS#12 encoded client certificate */</span>
<a name="l00146"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#ga6dda2a079c113e3d73b3dcae58b98357">00146</a> <span class="preprocessor">#define APR_LDAP_CERT_TYPE_PFX      13</span>
<a name="l00147"></a>00147 <span class="preprocessor"></span><span class="comment">/** PKCS#12 encoded private key */</span>
<a name="l00148"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#ga643e937d04527c8d0001cd4ee92102e5">00148</a> <span class="preprocessor">#define APR_LDAP_KEY_TYPE_PFX       14</span>
<a name="l00149"></a>00149 <span class="preprocessor"></span><span class="comment">/** Openldap directory full of base64-encoded cert </span>
<a name="l00150"></a>00150 <span class="comment"> * authorities with hashes in corresponding .0 directory</span>
<a name="l00151"></a>00151 <span class="comment"> */</span>
<a name="l00152"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#ga70f4f4bff0ed16ad8eae0f3362f34196">00152</a> <span class="preprocessor">#define APR_LDAP_CA_TYPE_CACERTDIR_BASE64 15</span>
<a name="l00153"></a>00153 <span class="preprocessor"></span>
<a name="l00154"></a>00154 <span class="comment"></span>
<a name="l00155"></a>00155 <span class="comment">/**</span>
<a name="l00156"></a>00156 <span class="comment"> * Certificate structure.</span>
<a name="l00157"></a>00157 <span class="comment"> *</span>
<a name="l00158"></a>00158 <span class="comment"> * This structure is used to store certificate details. An array of</span>
<a name="l00159"></a>00159 <span class="comment"> * these structures is passed to apr_ldap_set_option() to set CA</span>
<a name="l00160"></a>00160 <span class="comment"> * and client certificates.</span>
<a name="l00161"></a>00161 <span class="comment"> * @param type Type of certificate APR_LDAP_*_TYPE_*</span>
<a name="l00162"></a>00162 <span class="comment"> * @param path Path, file or nickname of the certificate</span>
<a name="l00163"></a>00163 <span class="comment"> * @param password Optional password, can be NULL</span>
<a name="l00164"></a>00164 <span class="comment"> */</span>
<a name="l00165"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#gaf933e3d717b8cf88b72bf45ff3906e24">00165</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structapr__ldap__opt__tls__cert__t.html">apr_ldap_opt_tls_cert_t</a> <a class="code" href="structapr__ldap__opt__tls__cert__t.html">apr_ldap_opt_tls_cert_t</a>;
<a name="l00166"></a><a class="code" href="structapr__ldap__opt__tls__cert__t.html">00166</a> <span class="keyword">struct </span><a class="code" href="structapr__ldap__opt__tls__cert__t.html">apr_ldap_opt_tls_cert_t</a> {
<a name="l00167"></a>00167     <span class="keywordtype">int</span> type;
<a name="l00168"></a>00168     <span class="keyword">const</span> <span class="keywordtype">char</span> *path;
<a name="l00169"></a>00169     <span class="keyword">const</span> <span class="keywordtype">char</span> *password;
<a name="l00170"></a>00170 };
<a name="l00171"></a>00171 <span class="comment"></span>
<a name="l00172"></a>00172 <span class="comment">/**</span>
<a name="l00173"></a>00173 <span class="comment"> * APR_LDAP_OPT_TLS</span>
<a name="l00174"></a>00174 <span class="comment"> *</span>
<a name="l00175"></a>00175 <span class="comment"> * This sets the SSL level on the LDAP handle.</span>
<a name="l00176"></a>00176 <span class="comment"> *</span>
<a name="l00177"></a>00177 <span class="comment"> * Netscape/Mozilla:</span>
<a name="l00178"></a>00178 <span class="comment"> * Supports SSL, but not STARTTLS</span>
<a name="l00179"></a>00179 <span class="comment"> * SSL is enabled by calling ldapssl_install_routines().</span>
<a name="l00180"></a>00180 <span class="comment"> *</span>
<a name="l00181"></a>00181 <span class="comment"> * Novell:</span>
<a name="l00182"></a>00182 <span class="comment"> * Supports SSL and STARTTLS.</span>
<a name="l00183"></a>00183 <span class="comment"> * SSL is enabled by calling ldapssl_install_routines(). Note that calling</span>
<a name="l00184"></a>00184 <span class="comment"> * other ldap functions before ldapssl_install_routines() may cause this</span>
<a name="l00185"></a>00185 <span class="comment"> * function to fail.</span>
<a name="l00186"></a>00186 <span class="comment"> * STARTTLS is enabled by calling ldapssl_start_tls_s() after calling</span>
<a name="l00187"></a>00187 <span class="comment"> * ldapssl_install_routines() (check this).</span>
<a name="l00188"></a>00188 <span class="comment"> *</span>
<a name="l00189"></a>00189 <span class="comment"> * OpenLDAP:</span>
<a name="l00190"></a>00190 <span class="comment"> * Supports SSL and supports STARTTLS, but none of this is documented:</span>
<a name="l00191"></a>00191 <span class="comment"> * http://www.openldap.org/lists/openldap-software/200409/msg00618.html</span>
<a name="l00192"></a>00192 <span class="comment"> * Documentation for both SSL support and STARTTLS has been deleted from</span>
<a name="l00193"></a>00193 <span class="comment"> * the OpenLDAP documentation and website.</span>
<a name="l00194"></a>00194 <span class="comment"> */</span>
<a name="l00195"></a>00195 <span class="comment"></span>
<a name="l00196"></a>00196 <span class="comment">/** No encryption */</span>
<a name="l00197"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#ga005b3c879760af5d38f9dbd2e910c695">00197</a> <span class="preprocessor">#define APR_LDAP_NONE 0</span>
<a name="l00198"></a>00198 <span class="preprocessor"></span><span class="comment">/** SSL encryption (ldaps://) */</span>
<a name="l00199"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#ga5e7057df19b0271f8776db8d9a5be863">00199</a> <span class="preprocessor">#define APR_LDAP_SSL 1</span>
<a name="l00200"></a>00200 <span class="preprocessor"></span><span class="comment">/** TLS encryption (STARTTLS) */</span>
<a name="l00201"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#gae3b6991b3392ca2061bad18a13a2802f">00201</a> <span class="preprocessor">#define APR_LDAP_STARTTLS 2</span>
<a name="l00202"></a>00202 <span class="preprocessor"></span><span class="comment">/** end TLS encryption (STOPTLS) */</span>
<a name="l00203"></a><a class="code" href="group___a_p_r___util___l_d_a_p.html#gaf3b98ab3a6da25e4f3d1a4ed17106960">00203</a> <span class="preprocessor">#define APR_LDAP_STOPTLS 3</span>
<a name="l00204"></a>00204 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00205"></a>00205 <span class="comment">/**</span>
<a name="l00206"></a>00206 <span class="comment"> * APR LDAP get option function</span>
<a name="l00207"></a>00207 <span class="comment"> *</span>
<a name="l00208"></a>00208 <span class="comment"> * This function gets option values from a given LDAP session if</span>
<a name="l00209"></a>00209 <span class="comment"> * one was specified. It maps to the native ldap_get_option() function.</span>
<a name="l00210"></a>00210 <span class="comment"> * @param pool The pool to use</span>
<a name="l00211"></a>00211 <span class="comment"> * @param ldap The LDAP handle</span>
<a name="l00212"></a>00212 <span class="comment"> * @param option The LDAP_OPT_* option to return</span>
<a name="l00213"></a>00213 <span class="comment"> * @param outvalue The value returned (if any)</span>
<a name="l00214"></a>00214 <span class="comment"> * @param result_err The apr_ldap_err_t structure contained detailed results</span>
<a name="l00215"></a>00215 <span class="comment"> *        of the operation.</span>
<a name="l00216"></a>00216 <span class="comment"> */</span>
<a name="l00217"></a>00217 APU_DECLARE_LDAP(<span class="keywordtype">int</span>) <a class="code" href="group___a_p_r___util___l_d_a_p.html#gaaeff4c9127a45e467490f8fb7648e946">apr_ldap_get_option</a>(<a class="code" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> *pool,
<a name="l00218"></a>00218                                           LDAP *ldap,
<a name="l00219"></a>00219                                           <span class="keywordtype">int</span> option,
<a name="l00220"></a>00220                                           <span class="keywordtype">void</span> *outvalue,
<a name="l00221"></a>00221                                           <a class="code" href="structapr__ldap__err__t.html">apr_ldap_err_t</a> **result_err);
<a name="l00222"></a>00222 <span class="comment"></span>
<a name="l00223"></a>00223 <span class="comment">/**</span>
<a name="l00224"></a>00224 <span class="comment"> * APR LDAP set option function</span>
<a name="l00225"></a>00225 <span class="comment"> * </span>
<a name="l00226"></a>00226 <span class="comment"> * This function sets option values to a given LDAP session if</span>
<a name="l00227"></a>00227 <span class="comment"> * one was specified. It maps to the native ldap_set_option() function.</span>
<a name="l00228"></a>00228 <span class="comment"> * </span>
<a name="l00229"></a>00229 <span class="comment"> * Where an option is not supported by an LDAP toolkit, this function</span>
<a name="l00230"></a>00230 <span class="comment"> * will try and apply legacy functions to achieve the same effect,</span>
<a name="l00231"></a>00231 <span class="comment"> * depending on the platform.</span>
<a name="l00232"></a>00232 <span class="comment"> * @param pool The pool to use</span>
<a name="l00233"></a>00233 <span class="comment"> * @param ldap The LDAP handle</span>
<a name="l00234"></a>00234 <span class="comment"> * @param option The LDAP_OPT_* option to set</span>
<a name="l00235"></a>00235 <span class="comment"> * @param invalue The value to set</span>
<a name="l00236"></a>00236 <span class="comment"> * @param result_err The apr_ldap_err_t structure contained detailed results</span>
<a name="l00237"></a>00237 <span class="comment"> *        of the operation.</span>
<a name="l00238"></a>00238 <span class="comment"> */</span>
<a name="l00239"></a>00239 APU_DECLARE_LDAP(<span class="keywordtype">int</span>) <a class="code" href="group___a_p_r___util___l_d_a_p.html#gada266c693bc5ad7a336bd3965a09b7ba">apr_ldap_set_option</a>(<a class="code" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> *pool,
<a name="l00240"></a>00240                                           LDAP *ldap,
<a name="l00241"></a>00241                                           <span class="keywordtype">int</span> option,
<a name="l00242"></a>00242                                           const <span class="keywordtype">void</span> *invalue,
<a name="l00243"></a>00243                                           <a class="code" href="structapr__ldap__err__t.html">apr_ldap_err_t</a> **result_err);
<a name="l00244"></a>00244 
<a name="l00245"></a>00245 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00246"></a>00246 <span class="preprocessor"></span>}
<a name="l00247"></a>00247 <span class="preprocessor">#endif</span>
<a name="l00248"></a>00248 <span class="preprocessor"></span>
<a name="l00249"></a>00249 <span class="preprocessor">#endif </span><span class="comment">/* APR_HAS_LDAP */</span>
<a name="l00250"></a>00250 <span class="comment"></span>
<a name="l00251"></a>00251 <span class="comment">/** @} */</span>
<a name="l00252"></a>00252 
<a name="l00253"></a>00253 <span class="preprocessor">#endif </span><span class="comment">/* APR_LDAP_OPTION_H */</span>
<a name="l00254"></a>00254 
</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>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Defines</a></div>

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

<hr class="footer"/><address class="footer"><small>Generated on Tue Feb 8 2011 for Apache Portable Runtime by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>