Skip to content

Commit

Permalink
Fixed conditional compilation for CURL and proxy support
Browse files Browse the repository at this point in the history
  • Loading branch information
olszomal authored and mtrojnar committed Oct 25, 2024
1 parent db5b4c4 commit 40ce811
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion osslsigncode.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,8 @@ static int attach_authenticode_response(PKCS7 *p7, PKCS7 *resp, int verbose)
return 0; /* OK */
}

#if defined(ENABLE_CURL) || OPENSSL_VERSION_NUMBER >= 0x30000000L

static void print_proxy(char *proxy)
{
if (proxy) {
Expand All @@ -553,6 +555,8 @@ static void print_proxy(char *proxy)
}
}

#endif /* ENABLE_CURL || OPENSSL_VERSION_NUMBER < 0x30000000L */

#if OPENSSL_VERSION_NUMBER<0x30000000L
#ifdef ENABLE_CURL

Expand Down Expand Up @@ -1004,7 +1008,7 @@ static int add_timestamp(PKCS7 *p7, FILE_FORMAT_CTX *ctx, char *url, int rfc3161
(void)rfc3161;
fprintf(stderr, "Could NOT find CURL\n");
BIO_free_all(req);
return NULL; /* FAILED */
return 1; /* FAILED */
#else /* ENABLE_CURL */
if (rfc3161) {
resp = bio_get_http_curl(&http_code, url, req, ctx->options->proxy,
Expand Down Expand Up @@ -2045,6 +2049,7 @@ static X509_CRL *x509_crl_get(FILE_FORMAT_CTX *ctx, char *url)

#if OPENSSL_VERSION_NUMBER<0x30000000L
#ifndef ENABLE_CURL
(void)ctx;
fprintf(stderr, "Could NOT find CURL\n");
return NULL; /* FAILED */
#else /* ENABLE_CURL */
Expand Down

0 comments on commit 40ce811

Please sign in to comment.