diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-05-09 21:56:34 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-05-11 14:25:01 -0400 |
commit | 87057e244b4d2e723dc98b2b3cef1901c155f005 (patch) | |
tree | c7505157bfa7609a15700082336e4f04311243cd /configure.ac | |
parent | 9bfc0df113edd50bd01acba02a42f2a13db83d71 (diff) | |
download | systemd-87057e244b4d2e723dc98b2b3cef1901c155f005.tar.gz |
resolved: support libidn2 in addition to libidn
libidn2 2.0.0 supports IDNA2008, in contrast to libidn which supports IDNA2003.
https://bugzilla.redhat.com/show_bug.cgi?id=1449145
From that bug report:
Internationalized domain names exist for quite some time (IDNA2003), although
the protocols describing them have evolved in an incompatible way (IDNA2008).
These incompatibilities will prevent applications written for IDNA2003 to
access certain problematic domain names defined with IDNA2008, e.g., faß.de is
translated to domain xn--fa-hia.de with IDNA2008, while in IDNA2003 it is
translated to fass.de domain. That not only causes incompatibility problems,
but may be used as an attack vector to redirect users to different web sites.
v2:
- keep libidn support
- require libidn2 >= 2.0.0
v3:
- keep dns_name_apply_idna caller dumb, and keep the #ifdefs inside of the
function.
- use both ±IDN and ±IDN2 in the version string
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index f59f3faf38..a934fe85c9 100644 --- a/configure.ac +++ b/configure.ac @@ -1015,16 +1015,32 @@ AM_CONDITIONAL(HAVE_LIBCURL, [test "$have_libcurl" = "yes"]) AM_CONDITIONAL(HAVE_REMOTE, [test "$have_microhttpd" = "yes" -o "$have_libcurl" = "yes"]) # ------------------------------------------------------------------------------ +have_libidn2=no +AC_ARG_ENABLE(libidn2, AS_HELP_STRING([--disable-libidn2], [disable optional LIBIDN2 support])) +if test "x$enable_libidn2" != "xno"; then + PKG_CHECK_MODULES(LIBIDN2, [libidn2 >= 2.0.0], + [AC_DEFINE(HAVE_LIBIDN2, 1, [Define if libidn2 is available]) + have_libidn2=yes + M4_DEFINES="$M4_DEFINES -DHAVE_LIBIDN2"], + [have_libidn2=no]) + if test "x$have_libidn2" = "xno" -a "x$enable_libidn2" = "xyes"; then + AC_MSG_ERROR([*** libidn2 support requested but libraries not found]) + fi +fi +AM_CONDITIONAL(HAVE_LIBIDN2, [test "$have_libidn2" = "yes"]) + have_libidn=no AC_ARG_ENABLE(libidn, AS_HELP_STRING([--disable-libidn], [disable optional LIBIDN support])) -if test "x$enable_libidn" != "xno"; then - PKG_CHECK_MODULES(LIBIDN, [libidn], - [AC_DEFINE(HAVE_LIBIDN, 1, [Define if libidn is available]) - have_libidn=yes - M4_DEFINES="$M4_DEFINES -DHAVE_LIBIDN"], - [have_libidn=no]) - if test "x$have_libidn" = "xno" -a "x$enable_libidn" = "xyes"; then - AC_MSG_ERROR([*** libidn support requested but libraries not found]) +if test "$have_libidn2" != "yes"; then + if test "x$enable_libidn" != "xno"; then + PKG_CHECK_MODULES(LIBIDN, [libidn], + [AC_DEFINE(HAVE_LIBIDN, 1, [Define if libidn is available]) + have_libidn=yes + M4_DEFINES="$M4_DEFINES -DHAVE_LIBIDN"], + [have_libidn=no]) + if test "x$have_libidn" = "xno" -a "x$enable_libidn" = "xyes"; then + AC_MSG_ERROR([*** libidn support requested but libraries not found]) + fi fi fi AM_CONDITIONAL(HAVE_LIBIDN, [test "$have_libidn" = "yes"]) @@ -1715,6 +1731,7 @@ AC_MSG_RESULT([ MICROHTTPD: ${have_microhttpd} GNUTLS: ${have_gnutls} libcurl: ${have_libcurl} + libidn2: ${have_libidn2} libidn: ${have_libidn} libiptc: ${have_libiptc} ELFUTILS: ${have_elfutils} |