unit-tests: Add a test to verify that there is no partial matching of RDNs
authorTobias Brunner <tobias@strongswan.org>
Wed, 9 Sep 2015 12:39:26 +0000 (14:39 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 9 Sep 2015 12:39:26 +0000 (14:39 +0200)
src/libstrongswan/tests/suites/test_identification.c

index ff14ba8..9554d29 100644 (file)
@@ -550,6 +550,7 @@ START_TEST(test_matches)
        a = identification_create_from_string("C=CH, E=moon@strongswan.org, CN=moon");
 
        ck_assert(id_matches(a, "C=CH, E=moon@strongswan.org, CN=moon", ID_MATCH_PERFECT));
+       ck_assert(id_matches(a, "C=CH, E=*@strongswan.org, CN=moon", ID_MATCH_NONE));
        ck_assert(id_matches(a, "C=CH, E=*, CN=moon", ID_MATCH_ONE_WILDCARD));
        ck_assert(id_matches(a, "C=CH, E=*, CN=*", ID_MATCH_ONE_WILDCARD - 1));
        ck_assert(id_matches(a, "C=*, E=*, CN=*", ID_MATCH_ONE_WILDCARD - 2));