diff options
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); |