summaryrefslogtreecommitdiff
path: root/include/apr_ldap.h.in
diff options
context:
space:
mode:
authorbnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68>2003-02-14 16:07:19 +0000
committerbnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68>2003-02-14 16:07:19 +0000
commit6673078a15390a1e121bb066385e5685c9ab94e6 (patch)
tree57c1e7f12fcf46123c9a8403c924909951fd6161 /include/apr_ldap.h.in
parent3d2ec1e93cef95e530bcbcffa5f299808b6b4828 (diff)
downloadlibapr-util-6673078a15390a1e121bb066385e5685c9ab94e6.tar.gz
Added support for Novell LDAP SDK and standardized the SSL support across
the various LDAP SDKs. Isolated the SSL functionality to mod_ldap rather than speading it across mod_auth_ldap and mod_ldap. Submitted by: Dave Ward, Brad Nicholes (bnicholes@apache.org) git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@58853 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_ldap.h.in')
-rw-r--r--include/apr_ldap.h.in87
1 files changed, 59 insertions, 28 deletions
diff --git a/include/apr_ldap.h.in b/include/apr_ldap.h.in
index 8ee41b8e..b2778988 100644
--- a/include/apr_ldap.h.in
+++ b/include/apr_ldap.h.in
@@ -79,18 +79,49 @@
/* this whole thing disappears if LDAP is not enabled */
#if !APR_HAS_LDAP
+#define APR_HAS_NETSCAPE_LDAPSDK 0
+#define APR_HAS_NOVELL_LDAPSDK 0
+#define APR_HAS_OPENLDAP_LDAPSDK 0
+#define APR_HAS_MICROSOFT_LDAPSDK 0
+#define APR_HAS_OTHER_LDAPSDK 0
+
+#define APR_HAS_LDAP_SSL 0
#define APR_HAS_LDAP_URL_PARSE 0
-#define APU_HAS_LDAP_NETSCAPE_SSL 0
-#define APU_HAS_LDAP_STARTTLS 0
-#else
-/* presume all unices do, win32, for example, does not */
-#define APR_HAS_LDAP_URL_PARSE 1
+#else /* ldap support available */
+
-/* LDAP secure capabilities */
-#define APR_HAS_LDAP_NETSCAPE_SSL @apu_has_ldap_netscape_ssl@
-#define APR_HAS_LDAP_STARTTLS @apu_has_ldap_starttls@
+ /* There a several LDAPv3 SDKs available on various platforms
+ * define which LDAP SDK is used
+ */
+#define APR_HAS_NETSCAPE_LDAPSDK @apu_has_ldap_netscape@
+#define APR_HAS_NOVELL_LDAPSDK @apu_has_ldap_novell@
+#define APR_HAS_OPENLDAP_LDAPSDK @apu_has_ldap_openldap@
+#define APR_HAS_MICROSOFT_LDAPSDK @apu_has_ldap_microsoft@
+#define APR_HAS_OTHER_LDAPSDK @apu_has_ldap_other@
+
+ /* define if LDAP SSL support is available
+ */
+#define APR_HAS_LDAP_SSL @apu_has_ldap_ssl@
+
+ /* If no APR_HAS_xxx_LDAPSDK is defined error out
+ * Define if the SDK supports the ldap_url_parse function
+ */
+#if APR_HAS_NETSCAPE_LDAPSDK
+ #define APR_HAS_LDAP_URL_PARSE 1
+#elif APR_HAS_NOVELL_LDAPSDK
+ #define APR_HAS_LDAP_URL_PARSE 1
+#elif APR_HAS_OPENLDAP_LDAPSDK
+ #define APR_HAS_LDAP_URL_PARSE 1
+#elif APR_HAS_MICROSOFT_LDAPSDK
+ #define APR_HAS_LDAP_URL_PARSE 0
+#elif APR_HAS_OTHER_LDAPSDK
+ #define APR_HAS_LDAP_URL_PARSE 0
+#else
+ #define APR_HAS_LDAP_URL_PARSE 0
+ #error "ERROR no LDAP SDK defined!"
+#endif
/* These are garbage, our public macros are always APR_HAS_ prefixed,
* and use 0/1 values, not defined/undef semantics.
@@ -101,38 +132,38 @@
#define APU_HAS_LDAP
#endif
-#if APR_HAS_LDAP_NETSCAPE_SSL
-#define APU_HAS_LDAP_NETSCAPE_SSL
-#endif
+/* LDAP header files */
-#if APR_HAS_LDAP_STARTTLS
-#define APU_HAS_LDAP_STARTTLS
+#if APR_HAS_NETSCAPE_LDAPSDK
+@ldap_h@
+@lber_h@
+#if APR_HAS_LDAP_SSL
+@ldap_ssl_h@
+#endif
#endif
-/* LDAP header files */
+#if APR_HAS_NOVELL_LDAPSDK
@ldap_h@
@lber_h@
+#if APR_HAS_LDAP_SSL
@ldap_ssl_h@
+#endif
+#endif
+#if APR_HAS_OPENLDAP_LDAPSDK
+@ldap_h@
+@lber_h@
+#endif
-/*
- * LDAP Compatibility
+/* LDAPv2 SDKs don't use const parameters in their prototypes.
+ * LDAPv3 SDKs do use const. When compiling with LDAPv2 SDKs, const_cast
+ * casts away the constness, but won't under LDAPv3
*/
-
#if LDAP_VERSION_MAX <= 2
-int ldap_search_ext_s(LDAP *ldap, char *base, int scope, char *filter,
- char **attrs, int attrsonly, void *servertrls, void *clientctrls,
- void *timeout, int sizelimit, LDAPMessage **res);
-void ldap_memfree(void *p);
-
-/* The const_cast is used to get around the fact that some of the LDAPv2 prototypes
- * have non-const parameters, while the same ones in LDAPv3 are const. If compiling
- * with LDAPv2, the const_cast casts away the constness, but won't under LDAPv3
- */
#define const_cast(x) ((char *)(x))
#else
#define const_cast(x) (x)
-#endif /* LDAP_VERSION_MAX */
+#endif
#include "apr_ldap_url.h"
@@ -146,5 +177,5 @@ void ldap_memfree(void *p);
#endif
/** @} */
-#endif /* APU_HAS_LDAP */
+#endif /* APR_HAS_LDAP */
#endif /* APU_LDAP_H */