support of ldap-based crl fetching

This commit is contained in:
Andreas Steffen
2007-04-06 09:44:06 +00:00
parent 4c56bd64e5
commit 241d2ff3bc
6 changed files with 208 additions and 34 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ if USE_LIBCURL
endif
# This compile option activates dynamic LDAP CRL fetching
if USE_LDAP
if USE_LIBLDAP
pluto_LDADD += -lldap -llber
endif
+2 -6
View File
@@ -41,12 +41,8 @@ const char compile_time_interop_options[] = ""
#ifdef LIBCURL
" LIBCURL"
#endif
#ifdef LDAP_VER
#if LDAP_VER == 2
" LDAP_V2"
#else
" LDAP_V3"
#endif
#ifdef LIBLDAP
" LIBLDAP"
#endif
#ifdef SMARTCARD
" SMARTCARD"
+5 -5
View File
@@ -31,7 +31,7 @@
#include <freeswan.h>
#ifdef LDAP_VER
#ifdef LIBLDAP
#include <ldap.h>
#endif
@@ -347,7 +347,7 @@ fetch_curl(char *url, chunk_t *blob)
#endif /* !LIBCURL */
}
#ifdef LDAP_VER
#ifdef LIBLDAP
/*
* parses the result returned by an ldap query
*/
@@ -428,7 +428,7 @@ fetch_ldap_url(char *url, chunk_t *blob)
if (ldap != NULL)
{
int ldap_version = (LDAP_VER == 2)? LDAP_VERSION2 : LDAP_VERSION3;
int ldap_version = LDAP_VERSION3;
struct timeval timeout;
timeout.tv_sec = FETCH_CMD_TIMEOUT;
@@ -479,13 +479,13 @@ fetch_ldap_url(char *url, chunk_t *blob)
}
return ugh;
}
#else /* !LDAP_VER */
#else /* !LIBLDAP */
static err_t
fetch_ldap_url(char *url, chunk_t *blob)
{
return "LDAP URL fetching not activated in pluto source code";
}
#endif /* !LDAP_VER */
#endif /* !LIBLDAP */
/*
* fetch an ASN.1 blob coded in PEM or DER format from a URL