File tree Expand file tree Collapse file tree
prov/src/test/java/org/bouncycastle/jce/provider/test Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -335,8 +335,13 @@ private void testEmptyLabelRefused() throws Exception
335335 isTrue ("a doubled dot in a quoted local part must not be refused, and the host still matches" ,
336336 isExcluded (emailName ("bank.com" ), emailName ("\" a..b\" @bank.com" )));
337337
338- // a bare "." is the root label, not an empty one, and is left alone.
339- isTrue ("a bare root label must not be refused" , !isExcluded (dnsName ("example.com" ), dnsName ("." )));
338+ // a bare "." is the root label, not an empty one: it is not refused as malformed, it is simply
339+ // outside the subtree in both directions. (bc-csharp fails it closed as a tested name; aligning
340+ // that is deferred to a broader constraint-name vs tested-name rework.)
341+ isTrue ("a bare root label as a tested name must not be refused" ,
342+ !isExcluded (dnsName ("example.com" ), dnsName ("." )));
343+ isTrue ("a bare root label as a tested name must not be permitted" ,
344+ !isPermitted (dnsName ("example.com" ), dnsName ("." )));
340345
341346 // nothing is refused where no constraint of that type is in force.
342347 isTrue ("an empty label is immaterial with no dNSName constraint" ,
You can’t perform that action at this time.
0 commit comments