summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-02-11 08:54:23 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-02-11 16:16:45 +0100
commit1560cd1f9f5a2ecfe91d138a3189160c212855a4 (patch)
tree2d564015df79edc89d95ecc7e516af3c5306fd13
parent8d9346f1a0d880c3d904f6e072675d6953870f3e (diff)
downloadcurl-1560cd1f9f5a2ecfe91d138a3189160c212855a4.tar.gz
curl: provide libgsasl version and feature info in -V output
Closes #6592
-rw-r--r--lib/version.c15
-rw-r--r--src/tool_help.c1
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/version.c b/lib/version.c
index a9102ec1e..dfc3e0719 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -100,7 +100,7 @@ static size_t zstd_version(char *buf, size_t bufsz)
* zeros in the data.
*/
-#define VERSION_PARTS 15 /* number of substrings we can concatenate */
+#define VERSION_PARTS 16 /* number of substrings we can concatenate */
char *curl_version(void)
{
@@ -147,6 +147,9 @@ char *curl_version(void)
#ifdef USE_HYPER
char hyper_buf[30];
#endif
+#ifdef USE_GSASL
+ char gsasl_buf[30];
+#endif
int i = 0;
int j;
@@ -235,6 +238,11 @@ char *curl_version(void)
msnprintf(hyper_buf, sizeof(hyper_buf), "Hyper/%s", hyper_version());
src[i++] = hyper_buf;
#endif
+#ifdef USE_GSASL
+ msnprintf(gsasl_buf, sizeof(gsasl_buf), "libgsasl/%s",
+ gsasl_check_version(NULL));
+ src[i++] = gsasl_buf;
+#endif
DEBUGASSERT(i <= VERSION_PARTS);
@@ -431,6 +439,9 @@ static curl_version_info_data version_info = {
#if defined(USE_HSTS)
| CURL_VERSION_HSTS
#endif
+#if defined(USE_GSASL)
+ | CURL_VERSION_GSASL
+#endif
,
NULL, /* ssl_version */
0, /* ssl_version_num, this is kept at zero */
diff --git a/src/tool_help.c b/src/tool_help.c
index 30a03d959..104ab98c2 100644
--- a/src/tool_help.c
+++ b/src/tool_help.c
@@ -875,6 +875,7 @@ static const struct feat feats[] = {
{"PSL", CURL_VERSION_PSL},
{"alt-svc", CURL_VERSION_ALTSVC},
{"HSTS", CURL_VERSION_HSTS},
+ {"gsasl", CURL_VERSION_GSASL},
};
static void print_category(curlhelp_t category)