26#include "apu_config.h"
29#define APU_DSO_LDAP_BUILD
113#if APR_HAS_NETSCAPE_LDAPSDK || APR_HAS_SOLARIS_LDAPSDK || APR_HAS_MOZILLA_LDAPSK
114 result->reason =
"LDAP: Verify certificate not yet supported by APR on the "
115 "Netscape, Solaris or Mozilla LDAP SDKs";
119#if APR_HAS_NOVELL_LDAPSDK
127#if APR_HAS_OPENLDAP_LDAPSDK
140 result->reason =
"LDAP: SSL/TLS not yet supported by APR on this "
141 "version of the OpenLDAP toolkit";
150 result->reason =
"LDAP: Could not set verify mode";
163 result->reason =
"Unable to set LDAP_OPT_REFERRALS.";
169#if !defined(LDAP_OPT_REFHOPLIMIT) || APR_HAS_NOVELL_LDAPSDK
187 result->reason =
"Unable to set LDAP_OPT_REFHOPLIMIT.";
199 result->reason =
"LDAP: Could not set an option";
231#if APR_HAS_NETSCAPE_LDAPSDK || APR_HAS_SOLARIS_LDAPSDK || APR_HAS_MOZILLA_LDAPSK
232#if APR_HAS_LDAPSSL_INSTALL_ROUTINES
243 result->reason =
"LDAP: Could not switch SSL on for this "
248 result->reason =
"LDAP: STARTTLS is not supported by the "
249 "Netscape/Mozilla/Solaris SDK";
253 result->reason =
"LDAP: STOPTLS is not supported by the "
254 "Netscape/Mozilla/Solaris SDK";
259 result->reason =
"LDAP: SSL/TLS is not supported by this version "
260 "of the Netscape/Mozilla/Solaris SDK";
267#if APR_HAS_NOVELL_LDAPSDK
279 result->reason =
"LDAP: Could not switch SSL on for this "
287 result->reason =
"LDAP: Could not start TLS on this connection";
294 result->reason =
"LDAP: Could not stop TLS on this connection";
300#if APR_HAS_OPENLDAP_LDAPSDK
306 result->reason =
"LDAP: ldap_set_option failed. "
307 "Could not set LDAP_OPT_X_TLS to "
308 "LDAP_OPT_X_TLS_HARD";
315 result->reason =
"LDAP: ldap_start_tls_s() failed";
320 result->reason =
"LDAP: STOPTLS is not supported by the "
326 result->reason =
"LDAP: SSL/TLS not yet supported by APR on this "
327 "version of the OpenLDAP toolkit";
334#if APR_HAS_MICROSOFT_LDAPSDK
339 result->reason =
"LDAP: an attempt to set LDAP_OPT_SSL off "
348 result->reason =
"LDAP: an attempt to set LDAP_OPT_SSL on "
353#if APR_HAS_LDAP_START_TLS_S
357 result->reason =
"LDAP: ldap_start_tls_s() failed";
364 result->reason =
"LDAP: ldap_stop_tls_s() failed";
371#if APR_HAS_OTHER_LDAPSDK
373 result->reason =
"LDAP: SSL/TLS is currently not supported by "
374 "APR on this LDAP SDK";
400#if APR_HAS_LDAPSSL_CLIENT_INIT || APR_HAS_OPENLDAP_LDAPSDK
407#if APR_HAS_NETSCAPE_LDAPSDK || APR_HAS_SOLARIS_LDAPSDK || APR_HAS_MOZILLA_LDAPSDK
408#if APR_HAS_LDAPSSL_CLIENT_INIT
416 for (
i = 0;
i < certs->nelts;
i++) {
433 result->reason =
"LDAP: The Netscape/Mozilla LDAP SDK only "
434 "understands the CERT7, KEY3 and SECMOD "
450 result->reason =
"LDAP: could not set client certificate: "
451 "ldapssl_enable_clientauth() failed.";
460 result->reason =
"LDAP: ldapssl_advclientauth_init() failed.";
468 result->reason =
"LDAP: ldapssl_clientauth_init() failed.";
475 result->reason =
"LDAP: ldapssl_client_init() failed.";
481 result->reason =
"LDAP: SSL/TLS ldapssl_client_init() function not "
482 "supported by this Netscape/Mozilla/Solaris SDK. "
483 "Certificate authority file not set";
489#if APR_HAS_NOVELL_LDAPSDK
490#if APR_HAS_LDAPSSL_CLIENT_INIT && APR_HAS_LDAPSSL_ADD_TRUSTED_CERT && APR_HAS_LDAPSSL_CLIENT_DEINIT
496 result->reason =
"LDAP: The Novell LDAP SDK cannot support the setting "
497 "of certificates or keys on a per connection basis.";
560 result->reason =
"LDAP: The Novell LDAP SDK only understands the "
561 "DER and PEM (BASE64) file types.";
569 result->reason =
"LDAP: ldapssl_client_init(), "
570 "ldapssl_add_trusted_cert() or "
571 "ldapssl_client_deinit() functions not supported "
572 "by this Novell SDK. Certificate authority file "
579#if APR_HAS_OPENLDAP_LDAPSDK
580#ifdef LDAP_OPT_X_TLS_CACERTFILE
583 for (
i = 0;
i < certs->nelts;
i++) {
601#ifdef LDAP_OPT_X_TLS_CACERTDIR
610 result->reason =
"LDAP: The OpenLDAP SDK only understands the "
611 "PEM (BASE64) file type.";
619 result->reason =
"LDAP: LDAP_OPT_X_TLS_CACERTFILE not "
620 "defined by this OpenLDAP SDK. Certificate "
621 "authority file not set";
627#if APR_HAS_MICROSOFT_LDAPSDK
630 result->reason =
"LDAP: CA certificates cannot be set using this method, "
631 "as they are stored in the registry instead.";
636#if APR_HAS_OTHER_LDAPSDK
637 result->reason =
"LDAP: LDAP_OPT_X_TLS_CACERTFILE not "
638 "defined by this LDAP SDK. Certificate "
639 "authority file not set";
644 result->reason =
"LDAP: Attempt to set certificate(s) failed. "
645 "Not built with SSL support";
request_rec int int apr_table_t const char * path
const char int apr_pool_t * pool
apr_array_header_t ** result
#define apr_pcalloc(p, size)
const char const char * password