upd: added new test to ensure that no underscores are in domain part
authorINOPIAE <m.maengel@inopiae.de>
Wed, 19 Jun 2019 20:23:45 +0000 (22:23 +0200)
committerINOPIAE <m.maengel@inopiae.de>
Wed, 19 Jun 2019 20:23:45 +0000 (22:23 +0200)
According to BR 7.1.4.2.1 no underscores are allowed in dNSName entries.

fixes issue #172

Change-Id: I245b35198b20030292b6bf21ae91e23b53efa516

tests/club/wpia/gigi/DomainVerification.java

index 8709639..7fc111d 100644 (file)
@@ -24,6 +24,9 @@ public class DomainVerification extends ConfiguredTest {
         assertTrue(DomainAssessment.isValidDomainPart("123"));
         assertTrue(DomainAssessment.isValidDomainPart("abcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxy1234567890123"));
         assertFalse(DomainAssessment.isValidDomainPart("abcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxy12345678901234"));
+        // test underscore in domain according to BR 7.1.4.2.1
+        assertFalse(DomainAssessment.isValidDomainPart("_"));
+        assertFalse(DomainAssessment.isValidDomainPart("a_b"));
     }
 
     @Test