From: William Lallemand Date: Wed, 18 Dec 2019 19:36:01 +0000 (+0100) Subject: BUG/MINOR: ssl/cli: fix build for openssl < 1.0.2 X-Git-Tag: v2.2-dev1~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba22e901b3c6e8150b22e6129698785e149bfd18;p=thirdparty%2Fhaproxy.git BUG/MINOR: ssl/cli: fix build for openssl < 1.0.2 Commit d4f946c ("MINOR: ssl/cli: 'show ssl cert' give information on the certificates") introduced a build issue with openssl version < 1.0.2 because it uses the certificate bundles. --- diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 568bf3b6e5..2d6b003082 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -10200,6 +10200,7 @@ static int cli_io_handler_show_cert(struct appctx *appctx) chunk_appendf(trash, "# transaction\n"); if (!ckchs->multi) { chunk_appendf(trash, "*%s\n", ckchs->path); +#if HA_OPENSSL_VERSION_NUMBER >= 0x1000200fL } else { chunk_appendf(trash, "*%s:", ckchs->path); for (n = 0; n < SSL_SOCK_NUM_KEYTYPES; n++) { @@ -10207,6 +10208,7 @@ static int cli_io_handler_show_cert(struct appctx *appctx) chunk_appendf(trash, " %s.%s\n", ckchs->path, SSL_SOCK_KEYTYPE_NAMES[n]); } chunk_appendf(trash, "\n"); +#endif } } } @@ -10221,6 +10223,7 @@ static int cli_io_handler_show_cert(struct appctx *appctx) ckchs = ebmb_entry(node, struct ckch_store, node); if (!ckchs->multi) { chunk_appendf(trash, "%s\n", ckchs->path); +#if HA_OPENSSL_VERSION_NUMBER >= 0x1000200fL } else { chunk_appendf(trash, "%s:", ckchs->path); for (n = 0; n < SSL_SOCK_NUM_KEYTYPES; n++) { @@ -10228,6 +10231,7 @@ static int cli_io_handler_show_cert(struct appctx *appctx) chunk_appendf(trash, " %s.%s", ckchs->path, SSL_SOCK_KEYTYPE_NAMES[n]); } chunk_appendf(trash, "\n"); +#endif } node = ebmb_next(node);