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 21:32:09 UTC

svn commit: r125959 - /apr/apr-util/trunk/ldap/apr_ldap_option.c

Author: minfrin
Date: Fri Jan 21 12:32:09 2005
New Revision: 125959

URL: http://svn.apache.org/viewcvs?view=rev&rev=125959
Log:
Fix a build problem on Solaris v2.9 - Solaris SDK has no LDAP_OPT_SSL.

Modified:
   apr/apr-util/trunk/ldap/apr_ldap_option.c

Modified: apr/apr-util/trunk/ldap/apr_ldap_option.c
Url: http://svn.apache.org/viewcvs/apr/apr-util/trunk/ldap/apr_ldap_option.c?view=diff&rev=125959&p1=apr/apr-util/trunk/ldap/apr_ldap_option.c&r1=125958&p2=apr/apr-util/trunk/ldap/apr_ldap_option.c&r2=125959
==============================================================================
--- apr/apr-util/trunk/ldap/apr_ldap_option.c	(original)
+++ apr/apr-util/trunk/ldap/apr_ldap_option.c	Fri Jan 21 12:32:09 2005
@@ -145,9 +145,12 @@
 #if APR_HAS_LDAPSSL_INSTALL_ROUTINES
     if (tls == APR_LDAP_SSL) {
         result->rc = ldapssl_install_routines(ldap);
+#ifdef LDAP_OPT_SSL
+        /* apparently Netscape and Mozilla need this too, Solaris doesn't */
         if (result->rc == LDAP_SUCCESS) {
             result->rc = ldap_set_option(ldap, LDAP_OPT_SSL, LDAP_OPT_ON);
         }
+#endif
         if (result->rc != LDAP_SUCCESS) {
             result->msg = ldap_err2string(result->rc);
             result->reason = "LDAP: Could not switch SSL on for this "
@@ -349,8 +352,8 @@
     if (result->rc == LDAP_SUCCESS) {
         if (nickname) {
             result->rc = ldapssl_enable_clientauth(ldap, "",
-                                                   password,
-                                                   nickname);
+                                                   (char *)password,
+                                                   (char *)nickname);
             if (result->rc != LDAP_SUCCESS) {
                 result->reason = "LDAP: could not set client certificate: "
                                  "ldapssl_enable_clientauth() failed.";