From b6fe6e6968f8b5e4f64448804f3765cb5eb3107f Mon Sep 17 00:00:00 2001 From: joe Date: Wed, 2 Sep 2015 09:45:26 +0000 Subject: * 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 --- test/ssl.c | 8 +++----- 1 file 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; -- cgit v1.2.1