diff options
author | Roxie Linden <roxie@lindenlab.com> | 2010-04-26 17:41:21 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2010-04-26 17:41:21 -0700 |
commit | d82a10217ad5ac09500e272b74cdacb4bf04414b (patch) | |
tree | 3ab2f46f116e355c0643ef96e8342564f4cf6902 /indra/newview/tests | |
parent | a42dcc3f5e8dbddbc83500371bcb3d0ca8d91a3b (diff) |
Fix issue parsing wildcard cns in certificates
CR: Karina
Diffstat (limited to 'indra/newview/tests')
-rw-r--r-- | indra/newview/tests/llsechandler_basic_test.cpp | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp index 3f4474e23a..ba448d4b5b 100644 --- a/indra/newview/tests/llsechandler_basic_test.cpp +++ b/indra/newview/tests/llsechandler_basic_test.cpp @@ -702,12 +702,18 @@ namespace tut { ensure("simple name match", _cert_hostname_wildcard_match("foo", "foo")); - + ensure("simple name match, with end period", _cert_hostname_wildcard_match("foo.", "foo.")); ensure("simple name match, with begin period", _cert_hostname_wildcard_match(".foo", ".foo")); + + ensure("simple name match, with mismatched period cn", + _cert_hostname_wildcard_match("foo.", "foo")); + + ensure("simple name match, with mismatched period hostname", + _cert_hostname_wildcard_match("foo", "foo.")); ensure("simple name match, with subdomain", _cert_hostname_wildcard_match("foo.bar", "foo.bar")); @@ -772,11 +778,26 @@ namespace tut ensure("end periods", _cert_hostname_wildcard_match("foo.bar.com.", "*.b*r.com.")); - ensure("mismatch end period", - !_cert_hostname_wildcard_match("foo.bar.com.", "*.b*r.com")); + ensure("match end period", + _cert_hostname_wildcard_match("foo.bar.com.", "*.b*r.com")); + + ensure("match end period2", + _cert_hostname_wildcard_match("foo.bar.com", "*.b*r.com.")); + + ensure("wildcard mismatch", + !_cert_hostname_wildcard_match("bar.com", "*.bar.com")); + + ensure("wildcard match", + _cert_hostname_wildcard_match("foo.bar.com", "*.bar.com")); + + ensure("wildcard match", + _cert_hostname_wildcard_match("foo.foo.bar.com", "*.bar.com")); + + ensure("wildcard match", + _cert_hostname_wildcard_match("foo.foo.bar.com", "*.*.com")); - ensure("mismatch end period2", - !_cert_hostname_wildcard_match("foo.bar.com", "*.b*r.com.")); + ensure("wildcard mismatch", + !_cert_hostname_wildcard_match("foo.foo.bar.com", "*.foo.com")); } // test cert chain |