fixed compilation warnings and errors when not using curl
This commit is contained in:
@@ -54,6 +54,10 @@ if USE_LEAK_DETECTIVE
|
|||||||
AM_CFLAGS = -DLEAK_DETECTIVE
|
AM_CFLAGS = -DLEAK_DETECTIVE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if USE_LIBCURL
|
||||||
|
libstrongswan_la_LIBADD += -lcurl
|
||||||
|
endif
|
||||||
|
|
||||||
asn1/oid.c : asn1/oid.txt asn1/oid.pl
|
asn1/oid.c : asn1/oid.txt asn1/oid.pl
|
||||||
cd asn1 && $(PERL) oid.pl
|
cd asn1 && $(PERL) oid.pl
|
||||||
|
|
||||||
|
|||||||
@@ -456,7 +456,6 @@ static int print(FILE *stream, const struct printf_info *info,
|
|||||||
bool utc = TRUE;
|
bool utc = TRUE;
|
||||||
int written = 0;
|
int written = 0;
|
||||||
const x509_t *cacert;
|
const x509_t *cacert;
|
||||||
chunk_t keyid;
|
|
||||||
|
|
||||||
if (info->alt)
|
if (info->alt)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -467,7 +467,6 @@ static bool ocsp_parse_basic_response(chunk_t blob, int level0, response_t *res)
|
|||||||
{
|
{
|
||||||
u_int level, version;
|
u_int level, version;
|
||||||
u_int extn_oid = OID_UNKNOWN;
|
u_int extn_oid = OID_UNKNOWN;
|
||||||
u_char buf[BUF_LEN];
|
|
||||||
asn1_ctx_t ctx;
|
asn1_ctx_t ctx;
|
||||||
bool critical;
|
bool critical;
|
||||||
chunk_t object;
|
chunk_t object;
|
||||||
|
|||||||
@@ -137,7 +137,9 @@ static chunk_t post(private_fetcher_t *this, const char *request_type, chunk_t r
|
|||||||
*/
|
*/
|
||||||
static void destroy(private_fetcher_t *this)
|
static void destroy(private_fetcher_t *this)
|
||||||
{
|
{
|
||||||
|
#ifdef LIBCURL
|
||||||
curl_easy_cleanup(this->curl);
|
curl_easy_cleanup(this->curl);
|
||||||
|
#endif /* LIBCURL */
|
||||||
free(this);
|
free(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -176,8 +176,9 @@ struct whitelist_t {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef LIBCURL
|
#ifdef LIBCURL
|
||||||
|
/* dummy declaration for whitelisting */
|
||||||
void *Curl_getaddrinfo(void);
|
void *Curl_getaddrinfo(void);
|
||||||
#endif
|
#endif /* LIBCURL */
|
||||||
|
|
||||||
whitelist_t whitelist[] = {
|
whitelist_t whitelist[] = {
|
||||||
{pthread_create, 2542},
|
{pthread_create, 2542},
|
||||||
@@ -191,8 +192,10 @@ whitelist_t whitelist[] = {
|
|||||||
{register_printf_function, 159},
|
{register_printf_function, 159},
|
||||||
{syslog, 45},
|
{syslog, 45},
|
||||||
{dlopen, 109},
|
{dlopen, 109},
|
||||||
|
# ifdef LIBCURL
|
||||||
/* from /usr/lib/libcurl.so.3 */
|
/* from /usr/lib/libcurl.so.3 */
|
||||||
{Curl_getaddrinfo, 480},
|
{Curl_getaddrinfo, 480},
|
||||||
|
# endif /* LIBCURL */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user