diff options
author | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2015-09-02 09:45:26 +0000 |
---|---|---|
committer | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2015-09-02 09:45:26 +0000 |
commit | b6fe6e6968f8b5e4f64448804f3765cb5eb3107f (patch) | |
tree | 3a847e99ed02652efed46e16a3aef6abab326c75 | |
parent | f9563c5e952e67307cbe004702f078e316f955e5 (diff) | |
download | neon-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.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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; |