00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00021 #ifndef APR_LDAP_INIT_H
00022 #define APR_LDAP_INIT_H
00023
00030 #include "apr_ldap.h"
00031
00032 #if APR_HAS_LDAP
00033
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037
00038
00042 #if defined(LDAP_INSUFFICIENT_ACCESS)
00043 #define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_ACCESS
00044 #elif defined(LDAP_INSUFFICIENT_RIGHTS)
00045 #define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_RIGHTS
00046 #elif defined(APR_HAS_MICROSOFT_LDAPSDK)
00047
00048
00049
00050
00051 #define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_RIGHTS
00052 #else
00053 #error The security return codes must be added to support this LDAP toolkit.
00054 #endif
00055
00056 #if defined(LDAP_SECURITY_ERROR)
00057 #define APU_LDAP_SECURITY_ERROR LDAP_SECURITY_ERROR
00058 #else
00059 #define APU_LDAP_SECURITY_ERROR(n) \
00060 (LDAP_INAPPROPRIATE_AUTH == n) ? 1 \
00061 : (LDAP_INVALID_CREDENTIALS == n) ? 1 \
00062 : (APU_LDAP_INSUFFICIENT_ACCESS == n) ? 1 \
00063 : 0
00064 #endif
00065
00066
00090 APU_DECLARE_LDAP(int) apr_ldap_ssl_init(apr_pool_t *pool,
00091 const char *cert_auth_file,
00092 int cert_file_type,
00093 apr_ldap_err_t **result_err);
00094
00104 APU_DECLARE_LDAP(int) apr_ldap_ssl_deinit(void);
00105
00140 APU_DECLARE_LDAP(int) apr_ldap_init(apr_pool_t *pool,
00141 LDAP **ldap,
00142 const char *hostname,
00143 int portno,
00144 int secure,
00145 apr_ldap_err_t **result_err);
00146
00155 APU_DECLARE_LDAP(int) apr_ldap_info(apr_pool_t *pool,
00156 apr_ldap_err_t **result_err);
00157
00158 #ifdef __cplusplus
00159 }
00160 #endif
00161
00162 #endif
00163
00166 #endif