[svn] GnuPG - r4033 - trunk/keyserver
svn author dshaw
cvs at cvs.gnupg.org
Fri Mar 3 22:55:39 CET 2006
Author: dshaw
Date: 2006-03-03 22:55:38 +0100 (Fri, 03 Mar 2006)
New Revision: 4033
Modified:
trunk/keyserver/ChangeLog
trunk/keyserver/gpgkeys_ldap.c
Log:
* gpgkeys_ldap.c (main): Fix build problem with non-OpenLDAP LDAP
libraries that have TLS.
Modified: trunk/keyserver/ChangeLog
===================================================================
--- trunk/keyserver/ChangeLog 2006-03-01 18:16:55 UTC (rev 4032)
+++ trunk/keyserver/ChangeLog 2006-03-03 21:55:38 UTC (rev 4033)
@@ -1,3 +1,8 @@
+2006-03-03 David Shaw <dshaw at jabberwocky.com>
+
+ * gpgkeys_ldap.c (main): Fix build problem with non-OpenLDAP LDAP
+ libraries that have TLS.
+
2006-02-23 David Shaw <dshaw at jabberwocky.com>
* ksutil.c (init_ks_options): Default include-revoked and
Modified: trunk/keyserver/gpgkeys_ldap.c
===================================================================
--- trunk/keyserver/gpgkeys_ldap.c 2006-03-01 18:16:55 UTC (rev 4032)
+++ trunk/keyserver/gpgkeys_ldap.c 2006-03-03 21:55:38 UTC (rev 4033)
@@ -1928,7 +1928,8 @@
return KEYSERVER_INTERNAL_ERROR;
}
-#if defined(HAVE_LDAP_SET_OPTION) && defined(LDAP_OPT_X_TLS_CACERTFILE)
+#if defined(LDAP_OPT_X_TLS_CACERTFILE) && defined(HAVE_LDAP_SET_OPTION)
+
if(opt->ca_cert_file)
{
err=ldap_set_option(NULL,LDAP_OPT_X_TLS_CACERTFILE,opt->ca_cert_file);
@@ -1940,7 +1941,7 @@
goto fail;
}
}
-#endif /* HAVE_LDAP_SET_OPTION && LDAP_OPT_X_TLS_CACERTFILE */
+#endif /* LDAP_OPT_X_TLS_CACERTFILE && HAVE_LDAP_SET_OPTION */
/* SSL trumps TLS */
if(use_ssl)
@@ -2104,6 +2105,8 @@
int ver=LDAP_VERSION3;
err=ldap_set_option(ldap,LDAP_OPT_PROTOCOL_VERSION,&ver);
+
+#ifdef LDAP_OPT_X_TLS
if(err==LDAP_SUCCESS)
{
if(opt->flags.check_cert)
@@ -2112,10 +2115,12 @@
ver=LDAP_OPT_X_TLS_NEVER;
err=ldap_set_option(ldap,LDAP_OPT_X_TLS_REQUIRE_CERT,&ver);
- if(err==LDAP_SUCCESS)
- err=ldap_start_tls_s(ldap,NULL,NULL);
}
+#endif
+ if(err==LDAP_SUCCESS)
+ err=ldap_start_tls_s(ldap,NULL,NULL);
+
if(err!=LDAP_SUCCESS)
{
if(use_tls>=2 || opt->verbose>2)
@@ -2128,7 +2133,7 @@
goto fail;
}
}
- else if(err==LDAP_SUCCESS && opt->verbose>1)
+ else if(opt->verbose>1)
fprintf(console,"gpgkeys: TLS started successfully.\n");
#else
if(use_tls>=2)
More information about the Gnupg-commits
mailing list