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/21 15:09:47 UTC

svn commit: r125930 - /apr/apr-util/branches/1.1.x/include/apr_ldap.h.in /apr/apr-util/branches/1.1.x/ldap/apr_ldap_option.c

Author: minfrin
Date: Fri Jan 21 06:09:46 2005
New Revision: 125930

URL: http://svn.apache.org/viewcvs?view=rev&rev=125930
Log:
Solaris v2.9's LDAP is a repackaged Netscape/Mozilla SDK. Detect and handle
it correctly.

Modified:
   apr/apr-util/branches/1.1.x/include/apr_ldap.h.in
   apr/apr-util/branches/1.1.x/ldap/apr_ldap_option.c

Modified: apr/apr-util/branches/1.1.x/include/apr_ldap.h.in
Url: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.1.x/include/apr_ldap.h.in?view=diff&rev=125930&p1=apr/apr-util/branches/1.1.x/include/apr_ldap.h.in&r1=125929&p2=apr/apr-util/branches/1.1.x/include/apr_ldap.h.in&r2=125930
==============================================================================
--- apr/apr-util/branches/1.1.x/include/apr_ldap.h.in	(original)
+++ apr/apr-util/branches/1.1.x/include/apr_ldap.h.in	Fri Jan 21 06:09:46 2005
@@ -77,7 +77,6 @@
 #define APR_HAS_LDAP_SSLINIT @apu_has_ldap_sslinit@
 #define APR_HAS_LDAPSSL_INIT @apu_has_ldapssl_init@
 
-
 /*
  * Make sure the secure LDAP port is defined
  */

Modified: apr/apr-util/branches/1.1.x/ldap/apr_ldap_option.c
Url: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.1.x/ldap/apr_ldap_option.c?view=diff&rev=125930&p1=apr/apr-util/branches/1.1.x/ldap/apr_ldap_option.c&r1=125929&p2=apr/apr-util/branches/1.1.x/ldap/apr_ldap_option.c&r2=125930
==============================================================================
--- apr/apr-util/branches/1.1.x/ldap/apr_ldap_option.c	(original)
+++ apr/apr-util/branches/1.1.x/ldap/apr_ldap_option.c	Fri Jan 21 06:09:46 2005
@@ -140,8 +140,9 @@
 
 #if APR_HAS_LDAP_SSL /* compiled with ssl support */
 
-    /* Netscape SDK */
-#if APR_HAS_NETSCAPE_LDAPSDK
+    /* Netscape/Mozilla/Solaris SDK */
+#if APR_HAS_NETSCAPE_LDAPSDK || APR_HAS_SOLARIS_LDAPSDK
+#ifdef LDAP_OPT_SSL
     if (tls == APR_LDAP_SSL) {
         result->rc = ldapssl_install_routines(ldap);
         if (result->rc == LDAP_SUCCESS) {
@@ -155,15 +156,22 @@
     }
     else if (tls == APR_LDAP_STARTTLS) {
         result->reason = "LDAP: STARTTLS is not supported by the "
-                         "Netscape/Mozilla SDK";
+                         "Netscape/Mozilla/Solaris SDK";
         result->rc = -1;
     }
     else if (tls == APR_LDAP_STOPTLS) {
         result->reason = "LDAP: STOPTLS is not supported by the "
-                         "Netscape/Mozilla SDK";
+                         "Netscape/Mozilla/Solaris SDK";
+        result->rc = -1;
+    }
+#else
+    if (tls != APR_LDAP_NONE) {
+        result->reason = "LDAP: SSL/TLS is not supported by this version "
+                         "of the Netscape/Mozilla/Solaris SDK";
         result->rc = -1;
     }
 #endif
+#endif
 
     /* Novell SDK */
 #if APR_HAS_NOVELL_LDAPSDK
@@ -224,20 +232,13 @@
         result->rc = -1;
     }
 #else
-    result->reason = "LDAP: SSL/TLS not yet supported by APR on this "
-                     "version of the OpenLDAP toolkit";
-    result->rc = -1;
-#endif
-#endif
-
-    /* Solaris SDK */
-#if APR_HAS_SOLARIS_LDAPSDK
     if (tls != APR_LDAP_NONE) {
-        result->reason = "LDAP: SSL/TLS is currently not supported by "
-                         "APR on the Solaris SDK";
+        result->reason = "LDAP: SSL/TLS not yet supported by APR on this "
+                         "version of the OpenLDAP toolkit";
         result->rc = -1;
     }
 #endif
+#endif
 
     /* Microsoft SDK */
 #if APR_HAS_MICROSOFT_LDAPSDK
@@ -307,8 +308,9 @@
 
 #if APR_HAS_LDAP_SSL
 
-#if APR_HAS_NETSCAPE_LDAPSDK
-#if APR_HAS_LDAP_SSL_CLIENT_INIT
+    /* Netscape/Mozilla/Solaris SDK */
+#if APR_HAS_NETSCAPE_LDAPSDK || APR_HAS_SOLARIS_LDAPSDK
+#if APR_HAS_LDAPSSL_CLIENT_INIT
     const char *nickname = NULL;
     const char *secmod = NULL;
     const char *key3db = NULL;
@@ -381,9 +383,9 @@
         }
     }
 #else
-    result->reason = "LDAP: ldapssl_client_init() function not "
-                     "supported by this Netscape SDK. Certificate "
-                     "authority file not set";
+    result->reason = "LDAP: SSL/TLS ldapssl_client_init() function not "
+                     "supported by this Netscape/Mozilla/Solaris SDK. "
+                     "Certificate authority file not set";
     result->rc = -1;
 #endif
 #endif
@@ -525,14 +527,6 @@
      * here with a message explaining this. */
     result->reason = "LDAP: CA certificates cannot be set using this method, "
                      "as they are stored in the registry instead.";
-    result->rc = -1;
-#endif
-
-    /* Sun SDK */
-#if APR_HAS_SOLARIS_LDAPSDK
-    result->reason = "LDAP: Attempt to set certificate store failed. "
-                     "APR does not yet know how to set a certificate "
-                     "store on the Sun toolkit";
     result->rc = -1;
 #endif