00001 /* Copyright 2002-2005 The Apache Software Foundation or its licensors, as 00002 * applicable. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 /* 00018 * apr_ldap.h is generated from apr_ldap.h.in by configure -- do not edit apr_ldap.h 00019 */ 00020 /** 00021 * @file apr_ldap.h 00022 * @brief APR-UTIL LDAP 00023 */ 00024 #ifndef APU_LDAP_H 00025 #define APU_LDAP_H 00026 00027 /** 00028 * @defgroup APR_Util_LDAP LDAP 00029 * @ingroup APR_Util 00030 * @{ 00031 */ 00032 00033 /* this will be defined if LDAP support was compiled into apr-util */ 00034 #define APR_HAS_LDAP 1 00035 00036 /* identify the LDAP toolkit used */ 00037 #define APR_HAS_NETSCAPE_LDAPSDK 0 00038 #define APR_HAS_SOLARIS_LDAPSDK 0 00039 #define APR_HAS_NOVELL_LDAPSDK 0 00040 #define APR_HAS_MOZILLA_LDAPSDK 0 00041 #define APR_HAS_OPENLDAP_LDAPSDK 1 00042 #define APR_HAS_MICROSOFT_LDAPSDK 0 00043 #define APR_HAS_OTHER_LDAPSDK 0 00044 00045 00046 /* 00047 * Handle the case when LDAP is enabled 00048 */ 00049 #if APR_HAS_LDAP 00050 00051 /* 00052 * The following #defines are DEPRECATED and should not be used for 00053 * anything. They remain to maintain binary compatibility. 00054 * The original code defined the OPENLDAP SDK as present regardless 00055 * of what really was there, which was way bogus. In addition, the 00056 * apr_ldap_url_parse*() functions have been rewritten specifically for 00057 * APR, so the APR_HAS_LDAP_URL_PARSE macro is forced to zero. 00058 */ 00059 #define APR_HAS_LDAP_SSL 1 00060 #define APR_HAS_LDAP_URL_PARSE 0 00061 00062 #if APR_HAS_OPENLDAP_LDAPSDK && !defined(LDAP_DEPRECATED) 00063 /* Ensure that the "deprecated" interfaces are still exposed 00064 * with OpenLDAP >= 2.3; these were exposed by default in earlier 00065 * releases. */ 00066 #define LDAP_DEPRECATED 1 00067 #endif 00068 00069 /* 00070 * Include the standard LDAP header files. 00071 */ 00072 00073 #include <lber.h> 00074 #include <ldap.h> 00075 00076 00077 00078 /* 00079 * Detected standard functions 00080 */ 00081 #define APR_HAS_LDAPSSL_CLIENT_INIT 0 00082 #define APR_HAS_LDAPSSL_CLIENT_DEINIT 0 00083 #define APR_HAS_LDAPSSL_ADD_TRUSTED_CERT 0 00084 #define APR_HAS_LDAP_START_TLS_S 1 00085 #define APR_HAS_LDAP_SSLINIT 0 00086 #define APR_HAS_LDAPSSL_INIT 0 00087 #define APR_HAS_LDAPSSL_INSTALL_ROUTINES 0 00088 00089 /* 00090 * Make sure the secure LDAP port is defined 00091 */ 00092 #ifndef LDAPS_PORT 00093 #define LDAPS_PORT 636 /* ldaps:/// default LDAP over TLS port */ 00094 #endif 00095 00096 00097 /* Note: Macros defining const casting has been removed in APR v1.0, 00098 * pending real support for LDAP v2.0 toolkits. 00099 * 00100 * In the mean time, please use an LDAP v3.0 toolkit. 00101 */ 00102 #if LDAP_VERSION_MAX <= 2 00103 #error Support for LDAP v2.0 toolkits has been removed from apr-util. Please use an LDAP v3.0 toolkit. 00104 #endif 00105 00106 #ifdef __cplusplus 00107 extern "C" { 00108 #endif /* __cplusplus */ 00109 00110 /** 00111 * This structure allows the C LDAP API error codes to be returned 00112 * along with plain text error messages that explain to us mere mortals 00113 * what really happened. 00114 */ 00115 typedef struct apr_ldap_err_t { 00116 const char *reason; 00117 const char *msg; 00118 int rc; 00119 } apr_ldap_err_t; 00120 00121 #ifdef __cplusplus 00122 } 00123 #endif 00124 00125 #include "apr_ldap_url.h" 00126 #include "apr_ldap_init.h" 00127 #include "apr_ldap_option.h" 00128 00129 /** @} */ 00130 #endif /* APR_HAS_LDAP */ 00131 #endif /* APU_LDAP_H */