summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2019-05-20 12:30:50 +0000
committerTim Rühsen <tim.ruehsen@gmx.de>2019-05-20 12:30:50 +0000
commit13cc2e983446f578fa7aee7ef00231c35ddbf6e7 (patch)
tree2a760700e095f61a25888ec75a576e876c522bec /tests
parent3668ce5363b1300bb8ab25892c7e1d321596e560 (diff)
parentb697e948b6f66440ee1f15337dfc83b6816bd21a (diff)
downloadgnutls-13cc2e983446f578fa7aee7ef00231c35ddbf6e7.tar.gz
Merge branch 'tmp-fix-evil-idna' into 'master'
Apply STD3 ASCII rules in gnutls_idna_map() Closes #720 See merge request gnutls/gnutls!1001
Diffstat (limited to 'tests')
-rw-r--r--tests/str-idna.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/str-idna.c b/tests/str-idna.c
index 552e23b3a1..19a29da630 100644
--- a/tests/str-idna.c
+++ b/tests/str-idna.c
@@ -94,12 +94,16 @@ MATCH_FUNC(test_caps_german1, "Ü.ü", "xn--tda.xn--tda");
MATCH_FUNC(test_caps_german2, "Bücher.de", "xn--bcher-kva.de");
MATCH_FUNC(test_caps_german3, "Faß.de", "xn--fa-hia.de");
MATCH_FUNC(test_dots, "a.b.c。d。", "a.b.c.d.");
+
+/* without STD3 ASCII rules, the result is: evil.ca/c..example.com */
+MATCH_FUNC(test_evil, "evil.c\u2100.example.com", "evil.c.example.com");
# else
EMPTY_FUNC(test_caps_german1);
EMPTY_FUNC(test_caps_german2);
EMPTY_FUNC(test_caps_german3);
EMPTY_FUNC(test_caps_greek);
EMPTY_FUNC(test_dots);
+EMPTY_FUNC(test_evil);
# endif
int main(void)
@@ -130,6 +134,7 @@ int main(void)
cmocka_unit_test(test_jp2),
cmocka_unit_test(test_jp2_reverse),
cmocka_unit_test(test_dots),
+ cmocka_unit_test(test_evil),
cmocka_unit_test(test_valid_idna2003)
};