diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-02-04 14:01:36 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-02-04 23:48:37 +0100 |
commit | 90deae35fed78b5c617489e1dfc9506181b27d4b (patch) | |
tree | 88750027aa72838547b34076cb30d1b512f0eb26 /tests/hostname-check-utf8.c | |
parent | 35bb9d4bc9f66293cd75cb405d5af3b291054e1f (diff) | |
download | gnutls-90deae35fed78b5c617489e1dfc9506181b27d4b.tar.gz |
tests: enable all IDNA tests when compiled with libidn2
Keep IDNA2003-only tests on the ifdef HAVE_LIBIDN.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'tests/hostname-check-utf8.c')
-rw-r--r-- | tests/hostname-check-utf8.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/hostname-check-utf8.c b/tests/hostname-check-utf8.c index 4f521c5690..10128bc774 100644 --- a/tests/hostname-check-utf8.c +++ b/tests/hostname-check-utf8.c @@ -188,7 +188,7 @@ void doit(void) if (ret) fail("%d: Hostname incorrectly matches (%d)\n", __LINE__, ret); -#ifdef HAVE_LIBIDN +#if defined(HAVE_LIBIDN) || defined(HAVE_LIBIDN2) ret = gnutls_x509_crt_check_hostname(x509, "www.teχ.gr"); if (!ret) fail("%d: Hostname incorrectly does not match (%d)\n", __LINE__, ret); @@ -197,11 +197,12 @@ void doit(void) if (!ret) fail("%d: Hostname incorrectly does not match (%d)\n", __LINE__, ret); - ret = gnutls_x509_crt_check_hostname(x509, "γΓγ.τόΣτ.gr"); + ret = gnutls_x509_crt_check_hostname(x509, "τέστ.gr"); if (!ret) fail("%d: Hostname incorrectly does not match (%d)\n", __LINE__, ret); - ret = gnutls_x509_crt_check_hostname(x509, "τέστ.gr"); +#if defined(HAVE_LIBIDN) /* There are IDNA2003 */ + ret = gnutls_x509_crt_check_hostname(x509, "γΓγ.τόΣτ.gr"); if (!ret) fail("%d: Hostname incorrectly does not match (%d)\n", __LINE__, ret); @@ -209,6 +210,7 @@ void doit(void) if (!ret) fail("%d: Hostname incorrectly does not match (%d)\n", __LINE__, ret); #endif +#endif gnutls_x509_crt_deinit(x509); |