From 57ad8bf35d84bae26513c680981a9d581756908d Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Wed, 26 Aug 2020 10:30:36 +0200 Subject: [PATCH] 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 --- openssl.c | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- 2.39.2