]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove support for libidn (IDN 2003)
authorPetr Menšík <pemensik@redhat.com>
Wed, 6 Dec 2017 16:12:44 +0000 (17:12 +0100)
committerOndřej Surý <ondrej@sury.org>
Sat, 17 Mar 2018 13:13:47 +0000 (13:13 +0000)
Signed-off-by: Petr Menšík <pemensik@redhat.com>
bin/dig/Makefile.in
bin/dig/dighost.c
configure.in

index 0545902ebb776c4e8524439d52848febd6c27e41..3531c9b6c264c32f4bab566fc6e4209aa5d9062e 100644 (file)
@@ -41,10 +41,10 @@ DEPLIBS =   ${DNSDEPLIBS} ${IRSDEPLIBS} ${BIND9DEPLIBS} \
                ${ISCDEPLIBS} ${ISCCFGDEPLIBS}
 
 LIBS =         ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
-               ${ISCLIBS} @IDNKIT_LIBS@ @LIBIDN_LIBS@ @LIBIDN2_LIBS@ @LIBS@
+               ${ISCLIBS} @IDNKIT_LIBS@ @LIBIDN2_LIBS@ @LIBS@
 
 NOSYMLIBS =    ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
-               ${ISCNOSYMLIBS} @IDNKIT_LIBS@ @LIBIDN_LIBS@ @LIBIDN2_LIBS@ @LIBS@
+               ${ISCNOSYMLIBS} @IDNKIT_LIBS@ @LIBIDN2_LIBS@ @LIBS@
 
 SUBDIRS =
 
index efa8b49e365c3b7736c74c9b2599fcf84458ba41..b122a37f37526bc33dc4bf90c8e78399d1c11165 100644 (file)
 #include <idn/api.h>
 #endif
 
-#ifdef WITH_LIBIDN
-#include <idna.h>
-#include <stringprep.h>
-#endif
-
 #ifdef WITH_LIBIDN2
 #include <idn2.h>
 #endif
@@ -4376,77 +4371,6 @@ idn_ace_to_locale(const char *from, char *to, size_t tolen) {
 }
 #endif /* WITH_IDNKIT */
 
-#ifdef WITH_LIBIDN
-static isc_result_t
-idn_locale_to_ace(const char *from, char *to, size_t tolen) {
-       isc_result_t result = ISC_R_FAILURE;
-       int res;
-       char *tmp_str = NULL;
-       char *ace_str = NULL;
-
-       tmp_str = stringprep_locale_to_utf8(from);
-
-       if (tmp_str != NULL) {
-               if (strlen(tmp_str) >= tolen) {
-                       debug("UTF-8 string is too long");
-                       free(tmp_str);
-                       return ISC_R_NOSPACE;
-               }
-       }
-       else
-               return ISC_R_FAILURE;
-
-       res = idna_to_ascii_8z(tmp_str, &ace_str, 0);
-       if (res == IDNA_SUCCESS) {
-               /* check the length */
-               if (strlen(tmp_str) >= tolen) {
-                       debug("encoded ASC string is too long");
-                       result = ISC_R_NOSPACE;
-               } else {
-                       (void) strncpy(to, ace_str, tolen);
-                       result = ISC_R_SUCCESS;
-               }
-       }
-
-       free(tmp_str);
-       free(ace_str);
-       if (res != IDNA_SUCCESS) {
-               fatal("idna_to_ascii_8z failed: %s", idna_strerror(res));
-       }
-       return (result);
-}
-
-static isc_result_t
-idn_ace_to_locale(const char *from, char *to, size_t tolen) {
-       int res;
-       isc_result_t result;
-       char *tmp_str = NULL;
-
-       res = idna_to_unicode_8zlz(from, &tmp_str, 0);
-
-       if (res == IDNA_SUCCESS) {
-               /* check the length */
-               if (strlen(tmp_str) >= tolen) {
-                       debug("decoded locale string is too long");
-                       result = ISC_R_FAILURE;
-                       goto cleanup;
-               }
-
-               (void) strncpy(to, tmp_str, tolen);
-
-               result = ISC_R_SUCCESS;
-       } else {
-               debug("idna_to_unicode_8z8l failed: %s",
-                     idna_strerror(res));
-               result = ISC_R_FAILURE;
-       }
-
-cleanup:
-       free(tmp_str);
-       return (result);
-}
-#endif /* WITH_LIBIDN */
-
 #ifdef WITH_LIBIDN2
 static isc_result_t
 idn_locale_to_ace(const char *from, char *to, size_t tolen) {
index 79624651514578037fca658613d394888f60fa5b..dacc693b17b3f5353c8b574ab6484058dbcdc0bb 100644 (file)
@@ -4773,36 +4773,6 @@ if test "no" != "$use_idnkit"; then
 fi
 AC_SUBST(IDNKIT_LIBS)
 
-#
-# IDN support using libidn
-#
-LIBIDN_LIBS=
-AC_ARG_WITH(libidn,
-       AS_HELP_STRING([--with-libidn[=PATH]], [enable IDN support using GNU libidn [yes|no|path]]),
-       use_libidn="$withval", use_libidn="no")
-case "$use_libidn" in
-yes)
-       if test X$prefix = XNONE ; then
-               libidn_path=/usr/local
-       else
-               libidn_path=$prefix
-       fi
-       LIBIDN_LIBS="-lidn"
-       ;;
-no)
-       ;;
-*)
-       LIBIDN_LIBS="-L$use_libidn/lib -lidn"
-       libidn_path="$use_libidn"
-       ;;
-esac
-
-if test "$use_libidn" != no; then
-       AC_DEFINE(WITH_LIBIDN, 1, [define if libidn support is to be included.])
-       STD_CINCLUDES="$STD_CINCLUDES -I$libidn_path/include"
-fi
-AC_SUBST(LIBIDN_LIBS)
-
 #
 # IDN support using libidn2
 #
@@ -4855,19 +4825,12 @@ AC_SUBST(LIBIDN2_LIBS)
 # IDN support in general
 #
 
-# check if idnkit, libidn and libidn2 are not used at the same time
-if test "$use_idnkit" != no && test "$use_libidn" != no; then
-    AC_MSG_ERROR([idnkit and libidn cannot be used at the same time.])
-fi
+# check if idnkit and libidn2 are not used at the same time
 if test "$use_idnkit" != no && test "$use_libidn2" != no; then
     AC_MSG_ERROR([idnkit and libidn2 cannot be used at the same time.])
 fi
-if test "$use_libidn" != no && test "$use_libidn2" != no; then
-    AC_MSG_ERROR([libidn and libidn2 cannot be used at the same time.])
-fi
-
 # the IDN support is on
-if test "$use_idnkit" != no || test "$use_libidn" != no || test "$use_libidn2" != no; then
+if test "$use_idnkit" != no || test "$use_libidn2" != no; then
        AC_DEFINE(WITH_IDN_SUPPORT, 1, [define if IDN input support is to be included.])
        if test "$use_libidn2" = no || test "$use_libidn2_out" != no; then
                AC_DEFINE(WITH_IDN_OUT_SUPPORT, 1, [define if IDN output support is to be included.])