summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-12-08 15:54:07 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-12-08 15:59:03 +0100
commitddca30ed625d9f5f7efb628e4467ff7ab5a65701 (patch)
tree003e73cc42c2cbfbc516430838c09af7ddf6e859
parente40393e5685743e185ea284337b6a0ed5d756a0f (diff)
downloadgnutls-ddca30ed625d9f5f7efb628e4467ff7ab5a65701.tar.gz
tests: make conditional (to HAVE_LIBIDN) any IDN related checks
This allows the test suite to successfully complete even when compiled without libidn.
-rw-r--r--tests/crq_apis.c2
-rw-r--r--tests/crt_apis.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/crq_apis.c b/tests/crq_apis.c
index 99c02cb4cf..7ad717ff13 100644
--- a/tests/crq_apis.c
+++ b/tests/crq_apis.c
@@ -448,8 +448,10 @@ void doit(void)
assert(gnutls_x509_crq_export2(crq, GNUTLS_X509_FMT_PEM, &out) >= 0);
+#ifdef HAVE_LIBIDN
assert(out.size == saved_crq.size);
assert(memcmp(out.data, saved_crq.data, out.size)==0);
+#endif
gnutls_free(out.data);
gnutls_x509_crq_deinit(crq);
diff --git a/tests/crt_apis.c b/tests/crt_apis.c
index 8b8ebbea9b..ed31640823 100644
--- a/tests/crt_apis.c
+++ b/tests/crt_apis.c
@@ -183,10 +183,12 @@ void doit(void)
if (ret != 0)
fail("gnutls_x509_crt_set_subject_alt_name\n");
+#ifdef HAVE_LIBIDN
ret = gnutls_x509_crt_set_subject_alt_name(crt, GNUTLS_SAN_RFC822NAME,
"test@νίκο.org", strlen("test@νίκο.org"), 1);
if (ret != 0)
fail("gnutls_x509_crt_set_subject_alt_name\n");
+#endif
s = 0;
ret = gnutls_x509_crt_get_key_purpose_oid(crt, 0, NULL, &s, NULL);
@@ -275,8 +277,10 @@ void doit(void)
}
assert(gnutls_x509_crt_export2(crt, GNUTLS_X509_FMT_PEM, &out) >= 0);
+#ifdef HAVE_LIBIDN
assert(out.size == saved_crt.size);
assert(memcmp(out.data, saved_crt.data, out.size)==0);
+#endif
gnutls_free(out.data);