Changeset 447

Show
Ignore:
Timestamp:
11/02/06 17:07:31 (2 years ago)
Author:
alo
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cherokee/trunk/ChangeLog

    r445 r447  
    112006-11-02  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
     2 
     3        * cherokee/validator_ldap.c (LDAP_OPT_SUCCESS): Defines it if it 
     4        wasn't defined previously (like in Solaris). 
     5 
     6        * cherokee/validator_ldap.c (validate_dn): Takes care of 
     7        ldap_start_tls_s(), if the system doesn't support it, it won't use 
     8        it. 
     9 
     10        * configure.in: Added check for ldap_start_tls_s() 
    211 
    312        * cherokee/thread.c (process_active_connections): 
  • cherokee/trunk/cherokee/validator_ldap.c

    r393 r447  
    3636#define LDAP_DEFAULT_PORT 389 
    3737 
     38#ifndef LDAP_OPT_SUCCESS 
     39# define LDAP_OPT_SUCCESS 0 
     40#endif 
     41 
    3842 
    3943static ret_t  
     
    176180         */ 
    177181        if (props->tls) { 
     182#ifdef LDAP_OPT_X_TLS 
    178183                if (! cherokee_buffer_is_empty (&props->ca_file)) { 
    179184                        re = ldap_set_option (NULL, LDAP_OPT_X_TLS_CACERTFILE, props->ca_file.buf); 
     
    184189                        } 
    185190                } 
     191#else 
     192                PRINT_ERROR_S ("Can't StartTLS, it isn't supported by LDAP client libraries\n"); 
     193#endif 
    186194        } 
    187195 
     
    262270         
    263271        if (props->tls) { 
     272#ifdef LDAP_HAVE_START_TLS_S 
    264273                re = ldap_start_tls_s (conn, NULL,  NULL); 
    265274                if (re != LDAP_OPT_SUCCESS) { 
     
    267276                        goto error; 
    268277                } 
     278#else 
     279                PRINT_ERROR_S ("Can't StartTLS, it isn't supported by LDAP client libraries\n"); 
     280#endif 
    269281        } 
    270282 
  • cherokee/trunk/configure.in

    r443 r447  
    908908       AC_CHECK_LIB(ldap, ldap_init, have_ldap_lib=yes, have_ldap_lib=no) 
    909909       AC_CHECK_HEADER(ldap.h, have_ldap_include=yes, have_ldap_include=no) 
     910 
     911          AC_CHECK_LIB(ldap, ldap_start_tls_s, [ 
     912                AC_DEFINE(LDAP_HAVE_START_TLS_S,, Define if you have ldap_start_tls_s) 
     913          ]) 
     914 
    910915       if test "$have_ldap_lib $have_ldap_include" = "yes yes"; then 
    911916          have_ldap="yes"