You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by mi...@apache.org on 2005/01/05 18:47:46 UTC
svn commit: r124236 - in apr/apr-util/branches/1.0.x: . include ldap
Author: minfrin
Date: Wed Jan 5 09:47:42 2005
New Revision: 124236
URL: http://svn.apache.org/viewcvs?view=rev&rev=124236
Log:
Revert the STARTTLS fixes from the v1.0.x tree
Removed:
apr/apr-util/branches/1.0.x/include/apr_ldap_option.h
apr/apr-util/branches/1.0.x/ldap/apr_ldap_option.c
Modified:
apr/apr-util/branches/1.0.x/CHANGES
apr/apr-util/branches/1.0.x/aprutil.dsp
apr/apr-util/branches/1.0.x/include/apr_ldap.h.in
apr/apr-util/branches/1.0.x/include/apr_ldap.hnw
apr/apr-util/branches/1.0.x/include/apr_ldap.hw
apr/apr-util/branches/1.0.x/ldap/apr_ldap_init.c
apr/apr-util/branches/1.0.x/libaprutil.dsp
Modified: apr/apr-util/branches/1.0.x/CHANGES
Url: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.0.x/CHANGES?view=diff&rev=124236&p1=apr/apr-util/branches/1.0.x/CHANGES&r1=124235&p2=apr/apr-util/branches/1.0.x/CHANGES&r2=124236
==============================================================================
--- apr/apr-util/branches/1.0.x/CHANGES (original)
+++ apr/apr-util/branches/1.0.x/CHANGES Wed Jan 5 09:47:42 2005
@@ -1,8 +1,5 @@
Changes with APR-util 1.0.2
- *) Teach apr_ldap_init() how to handle STARTTLS in addition to the existing
- SSL support. Add apr_ldap_option API. [Graham Leggett]
-
*) Make install passed a shell expanded list of header files to the
build/install.sh script, which can only install one file at a time.
Changed to install one header file at a time. [Justin Erenkrantz,
Modified: apr/apr-util/branches/1.0.x/aprutil.dsp
Url: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.0.x/aprutil.dsp?view=diff&rev=124236&p1=apr/apr-util/branches/1.0.x/aprutil.dsp&r1=124235&p2=apr/apr-util/branches/1.0.x/aprutil.dsp&r2=124236
==============================================================================
--- apr/apr-util/branches/1.0.x/aprutil.dsp (original)
+++ apr/apr-util/branches/1.0.x/aprutil.dsp Wed Jan 5 09:47:42 2005
@@ -211,10 +211,6 @@
SOURCE=.\ldap\apr_ldap_url.c
# End Source File
-# Begin Source File
-
-SOURCE=.\ldap\apr_ldap_option.c
-# End Source File
# End Group
# Begin Group "misc"
Modified: apr/apr-util/branches/1.0.x/include/apr_ldap.h.in
Url: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.0.x/include/apr_ldap.h.in?view=diff&rev=124236&p1=apr/apr-util/branches/1.0.x/include/apr_ldap.h.in&r1=124235&p2=apr/apr-util/branches/1.0.x/include/apr_ldap.h.in&r2=124236
==============================================================================
--- apr/apr-util/branches/1.0.x/include/apr_ldap.h.in (original)
+++ apr/apr-util/branches/1.0.x/include/apr_ldap.h.in Wed Jan 5 09:47:42 2005
@@ -75,7 +75,9 @@
@lber_h@
@ldap_h@
+#if APR_HAS_LDAP_SSL
@ldap_ssl_h@
+#endif
/*
@@ -130,7 +132,7 @@
#include "apr_ldap_url.h"
#include "apr_ldap_init.h"
-#include "apr_ldap_option.h"
+
/** @} */
#endif /* APR_HAS_LDAP */
Modified: apr/apr-util/branches/1.0.x/include/apr_ldap.hnw
Url: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.0.x/include/apr_ldap.hnw?view=diff&rev=124236&p1=apr/apr-util/branches/1.0.x/include/apr_ldap.hnw&r1=124235&p2=apr/apr-util/branches/1.0.x/include/apr_ldap.hnw&r2=124236
==============================================================================
--- apr/apr-util/branches/1.0.x/include/apr_ldap.hnw (original)
+++ apr/apr-util/branches/1.0.x/include/apr_ldap.hnw Wed Jan 5 09:47:42 2005
@@ -132,7 +132,7 @@
#include "apr_ldap_url.h"
#include "apr_ldap_init.h"
-#include "apr_ldap_option.h"
+
/** @} */
#endif /* APR_HAS_LDAP */
Modified: apr/apr-util/branches/1.0.x/include/apr_ldap.hw
Url: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.0.x/include/apr_ldap.hw?view=diff&rev=124236&p1=apr/apr-util/branches/1.0.x/include/apr_ldap.hw&r1=124235&p2=apr/apr-util/branches/1.0.x/include/apr_ldap.hw&r2=124236
==============================================================================
--- apr/apr-util/branches/1.0.x/include/apr_ldap.hw (original)
+++ apr/apr-util/branches/1.0.x/include/apr_ldap.hw Wed Jan 5 09:47:42 2005
@@ -128,7 +128,7 @@
#include "apr_ldap_url.h"
#include "apr_ldap_init.h"
-#include "apr_ldap_option.h"
+
/** @} */
#endif /* APR_HAS_LDAP */
Deleted: /apr/apr-util/branches/1.0.x/include/apr_ldap_option.h
Url: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.0.x/include/apr_ldap_option.h?view=auto&rev=124235
==============================================================================
Modified: apr/apr-util/branches/1.0.x/ldap/apr_ldap_init.c
Url: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.0.x/ldap/apr_ldap_init.c?view=diff&rev=124236&p1=apr/apr-util/branches/1.0.x/ldap/apr_ldap_init.c&r1=124235&p2=apr/apr-util/branches/1.0.x/ldap/apr_ldap_init.c&r2=124236
==============================================================================
--- apr/apr-util/branches/1.0.x/ldap/apr_ldap_init.c (original)
+++ apr/apr-util/branches/1.0.x/ldap/apr_ldap_init.c Wed Jan 5 09:47:42 2005
@@ -298,16 +298,6 @@
* to hide the complexity setup from the user. This function
* assumes that any certificate setup necessary has already
* been done.
- *
- * If SSL or STARTTLS needs to be enabled, and the underlying
- * toolkit supports it, the following values are accepted for
- * secure:
- *
- * APR_LDAP_OPT_TLS_NEVER: No encryption
- * APR_LDAP_OPT_TLS_HARD: SSL encryption (ldaps://)
- * APR_LDAP_OPT_TLS_DEMAND: Force STARTTLS on ldap://
- * APR_LDAP_OPT_TLS_ALLOW: Allow STARTTLS on ldap://
- * APR_LDAP_OPT_TLS_TRY: Optionally try STARTLS on ldap://
*/
APU_DECLARE(int) apr_ldap_init(apr_pool_t *pool,
LDAP **ldap,
@@ -343,20 +333,19 @@
#ifdef LDAP_OPT_X_TLS
*ldap = ldap_init(hostname, portno);
if (NULL != *ldap) {
- int SSLmode = secure;
+ int SSLmode = LDAP_OPT_X_TLS_HARD;
result->rc = ldap_set_option(*ldap, LDAP_OPT_X_TLS, &SSLmode);
if (LDAP_SUCCESS != result->rc) {
ldap_unbind_s(*ldap);
- result->reason = "LDAP: ldap_set_option failed, "
- "could not set security mode for "
- "apr_ldap_init()";
+ result->reason = "LDAP: ldap_set_option - "
+ "LDAP_OPT_X_TLS_HARD failed";
result->msg = ldap_err2string(result->rc);
*ldap = NULL;
return APR_EGENERAL;
}
}
#else
- result->reason = "LDAP: SSL/TLS not yet supported by APR on this "
+ result->reason = "LDAP: SSL not yet supported by APR on this "
"version of the OpenLDAP toolkit";
return APR_ENOTIMPL;
#endif
@@ -364,46 +353,13 @@
/* microsoft toolkit */
else if (!strcmp(LDAP_VENDOR_NAME, APR_LDAP_VENDOR_MICROSOFT)) {
- if (APR_LDAP_OPT_TLS_HARD == secure) {
#if APR_HAS_LDAP_SSLINIT
- *ldap = ldap_sslinit((char *)hostname, portno, 1);
+ *ldap = ldap_sslinit((char *)hostname, portno, 1);
#else
- result->reason = "LDAP: ldap_sslinit() not yet supported by APR on "
- "this version of the Microsoft toolkit";
- return APR_ENOTIMPL;
-#endif
- }
- else {
-#if APR_HAS_LDAP_START_TLS_S
- if (APR_LDAP_OPT_TLS_DEMAND == secure) {
- *ldap = ldap_init(hostname, portno);
- if (NULL != *ldap) {
- result->rc = ldap_start_tls_s(*ldap, NULL, NULL, NULL, NULL);
- if (LDAP_SUCCESS != result->rc) {
- ldap_unbind_s(*ldap);
- result->reason = "LDAP: ldap_start_tls_s() failed, "
- "could not set STARTTLS mode for "
- "apr_ldap_init()";
- result->msg = ldap_err2string(result->rc);
- *ldap = NULL;
- return APR_EGENERAL;
- }
- }
- }
- else {
- result->reason = "LDAP: APR_LDAP_OPT_TLS_ALLOW and "
- "APR_LDAP_OPT_TLS_TRY are not supported "
- "by APR on this version of the Microsoft "
- "toolkit. Use APR_LDAP_OPT_TLS_DEMAND "
- "instead to enable STARTTLS";
- return APR_ENOTIMPL;
- }
-#else
- result->reason = "LDAP: ldap_start_tls_s() not yet supported "
- "by APR on this version of the Microsoft toolkit";
- return APR_ENOTIMPL;
+ result->reason = "LDAP: SSL not yet supported by APR on "
+ "this version of the Microsoft toolkit";
+ return APR_ENOTIMPL;
#endif
- }
}
/* sun toolkit */
Deleted: /apr/apr-util/branches/1.0.x/ldap/apr_ldap_option.c
Url: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.0.x/ldap/apr_ldap_option.c?view=auto&rev=124235
==============================================================================
Modified: apr/apr-util/branches/1.0.x/libaprutil.dsp
Url: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.0.x/libaprutil.dsp?view=diff&rev=124236&p1=apr/apr-util/branches/1.0.x/libaprutil.dsp&r1=124235&p2=apr/apr-util/branches/1.0.x/libaprutil.dsp&r2=124236
==============================================================================
--- apr/apr-util/branches/1.0.x/libaprutil.dsp (original)
+++ apr/apr-util/branches/1.0.x/libaprutil.dsp Wed Jan 5 09:47:42 2005
@@ -217,10 +217,6 @@
SOURCE=.\ldap\apr_ldap_url.c
# End Source File
-# Begin Source File
-
-SOURCE=.\ldap\apr_ldap_option.c
-# End Source File
# End Group
# Begin Group "misc"