diff options
author | Stig Venaas <venaas@php.net> | 2002-06-22 11:41:36 +0000 |
---|---|---|
committer | Stig Venaas <venaas@php.net> | 2002-06-22 11:41:36 +0000 |
commit | c83f5a530d867fe3d3fb0ebe89f0d63d6c34ed24 (patch) | |
tree | bc0c3944811c1cffeda387e63bf29a872ef9d14f /ext/ldap | |
parent | f26fbd2bd5432397dc256292a6c1cf158f77430a (diff) | |
download | php-git-c83f5a530d867fe3d3fb0ebe89f0d63d6c34ed24.tar.gz |
Added test for ldap_start_tls_s()
Diffstat (limited to 'ext/ldap')
-rw-r--r-- | ext/ldap/config.m4 | 4 | ||||
-rw-r--r-- | ext/ldap/ldap.c | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ext/ldap/config.m4 b/ext/ldap/config.m4 index ab9de937e5..2113ca2961 100644 --- a/ext/ldap/config.m4 +++ b/ext/ldap/config.m4 @@ -103,6 +103,8 @@ if test "$PHP_LDAP" != "no"; then fi CPPFLAGS=$_SAVE_CPPFLAGS - dnl Solaris 2.8 claims to be 2004 API, but doesn't have ldap_parse_reference + dnl Solaris 2.8 claims to be 2004 API, but doesn't have + dnl ldap_parse_reference() nor ldap_start_tls_s() AC_CHECK_FUNCS(ldap_parse_reference) + AC_CHECK_FUNCS(ldap_start_tls_s) fi diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 2cec061ff1..5d8b03559f 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -2028,6 +2028,7 @@ PHP_FUNCTION(ldap_rename) Start TLS */ PHP_FUNCTION(ldap_start_tls) { +#ifdef HAVE_LDAP_START_TLS_S pval **link; ldap_linkdata *ld; @@ -2044,6 +2045,10 @@ PHP_FUNCTION(ldap_start_tls) } else { RETURN_TRUE; } +#else + php_error(E_ERROR, "ldap_start_tls not available in this LDAP library"); + RETURN_FALSE; +#endif } /* }}} */ #endif |