diff options
author | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2008-10-24 15:13:11 +0000 |
---|---|---|
committer | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2008-10-24 15:13:11 +0000 |
commit | 8118db28547146c671d44dea3cf48efab6855c0c (patch) | |
tree | ce0113df11971f59d186bc6b4a083973b2b79704 /test | |
parent | 8671dffe97d3e7616045d7ac56674edab660f460 (diff) | |
download | neon-8118db28547146c671d44dea3cf48efab6855c0c.tar.gz |
* test/ssl.c (wildcard_match_altname, fail_wildcard): New test cases.
Submitted by: Ludwig Nussel <ludwig.nussel@suse.de>
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1585 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'test')
-rw-r--r-- | test/ssl.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -505,6 +505,20 @@ static int wildcard_match(void) return OK; } +static int wildcard_match_altname(void) +{ + ne_session *sess; + struct ssl_server_args args = {"altname9.cert", 0}; + + sess = ne_session_create("https", "anything.example.com", 443); + ne_session_proxy(sess, "localhost", 7777); + + CALL(any_ssl_request(sess, tunnel_server, &args, CA_CERT, NULL, NULL)); + ne_session_destroy(sess); + + return OK; +} + /* Check that hostname comparisons are not cases-sensitive. */ static int caseless_match(void) { @@ -844,6 +858,12 @@ static int fail_bad_urialtname(void) "bad URI altname cert", NE_SSL_IDMISMATCH); } +static int fail_wildcard(void) +{ + return fail_ssl_request("altname9.cert", CA_CERT, "localhost", + "subjaltname not honored", NE_SSL_IDMISMATCH); +} + /* Test that the SSL session is cached across connections. */ static int session_cache(void) { @@ -1695,6 +1715,7 @@ ne_test tests[] = { T(no_verify), T(cache_verify), T(wildcard_match), + T(wildcard_match_altname), T(caseless_match), T(subject_altname), @@ -1716,6 +1737,7 @@ ne_test tests[] = { T(fail_host_ipaltname), T(fail_bad_ipaltname), T(fail_bad_urialtname), + T(fail_wildcard), T(session_cache), |