diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-10-12 09:01:06 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-10-31 08:46:35 +0100 |
commit | 9c91ec778104ae3b744b39444d544e82d5ee9ece (patch) | |
tree | e0473f3b118c745a1acae34f24408fa5de1436ad /lib/version.c | |
parent | 42b650b9ea5f26b2f5347af3072eaf690658ed62 (diff) | |
download | curl-9c91ec778104ae3b744b39444d544e82d5ee9ece.tar.gz |
idn: switch to libidn2 use and IDNA2008 support
CVE-2016-8625
Bug: https://curl.haxx.se/docs/adv_20161102K.html
Reported-by: Christian Heimes
Diffstat (limited to 'lib/version.c')
-rw-r--r-- | lib/version.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/version.c b/lib/version.c index 12924453c..a434a6287 100644 --- a/lib/version.c +++ b/lib/version.c @@ -36,8 +36,8 @@ # include <ares.h> #endif -#ifdef USE_LIBIDN -#include <stringprep.h> +#ifdef USE_LIBIDN2 +#include <idn2.h> #endif #ifdef USE_LIBPSL @@ -111,9 +111,9 @@ char *curl_version(void) left -= len; ptr += len; #endif -#ifdef USE_LIBIDN - if(stringprep_check_version(LIBIDN_REQUIRED_VERSION)) { - len = snprintf(ptr, left, " libidn/%s", stringprep_check_version(NULL)); +#ifdef USE_LIBIDN2 + if(idn2_check_version(IDN2_VERSION)) { + len = snprintf(ptr, left, " libidn2/%s", idn2_check_version(NULL)); left -= len; ptr += len; } @@ -365,10 +365,10 @@ curl_version_info_data *curl_version_info(CURLversion stamp) version_info.ares_num = aresnum; } #endif -#ifdef USE_LIBIDN +#ifdef USE_LIBIDN2 /* This returns a version string if we use the given version or later, otherwise it returns NULL */ - version_info.libidn = stringprep_check_version(LIBIDN_REQUIRED_VERSION); + version_info.libidn = idn2_check_version(IDN2_VERSION); if(version_info.libidn) version_info.features |= CURL_VERSION_IDN; #elif defined(USE_WIN32_IDN) |