summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2015-09-02 09:45:26 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2015-09-02 09:45:26 +0000
commitb6fe6e6968f8b5e4f64448804f3765cb5eb3107f (patch)
tree3a847e99ed02652efed46e16a3aef6abab326c75
parentf9563c5e952e67307cbe004702f078e316f955e5 (diff)
downloadneon-b6fe6e6968f8b5e4f64448804f3765cb5eb3107f.tar.gz
* test/ssl.c (nulcn_identity): Fail only if the NUL byte was interpreted
precisely. git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1963 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
-rw-r--r--test/ssl.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/ssl.c b/test/ssl.c
index 321c9b7..ec542e2 100644
--- a/test/ssl.c
+++ b/test/ssl.c
@@ -1488,16 +1488,14 @@ static int cert_identities(void)
static int nulcn_identity(void)
{
ne_ssl_certificate *cert = ne_ssl_cert_read(nul_cn_fn);
- const char *id, *expected = "www.bank.com\\x00.badguy.com";
+ const char *id;
ONN("could not read nulcn.pem", cert == NULL);
id = ne_ssl_cert_identity(cert);
- ONV(id != NULL
- && strcmp(id, expected) != 0,
- ("certificate `nulcn.pem' had identity `%s' not `%s'",
- id, expected));
+ ONN("embedded NUL byte not quoted",
+ id != NULL && strcmp(id, "www.bank.com") == 0);
ne_ssl_cert_free(cert);
return OK;