From: Fabian Keil Date: Wed, 26 Aug 2020 08:30:36 +0000 (+0200) Subject: ssl_store_cert(): Only use X509_get0_tbs_sigalg() on more recent OpenSSL versions X-Git-Tag: v_3_0_29~212 X-Git-Url: http://www.privoxy.org/gitweb/team/%22/11member_t.jpg?a=commitdiff_plain;h=57ad8bf35d84bae26513c680981a9d581756908d;p=privoxy.git ssl_store_cert(): Only use X509_get0_tbs_sigalg() on more recent OpenSSL versions ... so the function compiles with OpenSSL 1.0.2. Sponsored by: Robert Klemme --- diff --git a/openssl.c b/openssl.c index 3618dfa8..c8df4361 100644 --- a/openssl.c +++ b/openssl.c @@ -260,7 +260,9 @@ static int ssl_store_cert(struct client_state *csp, X509* crt) char *encoded_text; long l; const ASN1_INTEGER *bs; +#if OPENSSL_VERSION_NUMBER > 0x10100000L const X509_ALGOR *tsig_alg; +#endif int loc; if (!bio) @@ -450,6 +452,7 @@ static int ssl_store_cert(struct client_state *csp, X509* crt) goto exit; } +#if OPENSSL_VERSION_NUMBER > 0x10100000L if (BIO_puts(bio, "\nsigned using : ") <= 0) { log_ssl_errors(LOG_LEVEL_ERROR, "BIO_puts() for signed using failed"); @@ -463,6 +466,7 @@ static int ssl_store_cert(struct client_state *csp, X509* crt) ret = -1; goto exit; } +#endif pkey = X509_get_pubkey(crt); if (!pkey) {