diff options
author | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2016-09-26 21:26:40 +0000 |
---|---|---|
committer | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2016-09-26 21:26:40 +0000 |
commit | f2b52d0618dfb424d09c2a5c4c19e068e6d86037 (patch) | |
tree | 94080a9565b6366d63d1ace622e40f57f6ee4e90 | |
parent | 536106c324a13d67182f1a91fc90846a028b7aba (diff) | |
download | neon-f2b52d0618dfb424d09c2a5c4c19e068e6d86037.tar.gz |
* test/ssl.c (init, fail_expired, fail_notvalid): Fix for VPATH
builds.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1977 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
-rw-r--r-- | test/ssl.c | 32 |
1 files changed, 13 insertions, 19 deletions
@@ -231,13 +231,13 @@ static int any_ssl_request(ne_session *sess, server_fn fn, void *server_ud, static int init(void) { - /* take srcdir as argv[1]. */ + /* take srcdir as argv[1] for VPATH builds. */ if (test_argc > 1) { - srcdir = test_argv[1]; - server_key = ne_concat(srcdir, "/server.key", NULL); - } else { - server_key = "server.key"; + srcdir = test_argv[1]; } + + /* take srcdir as argv[1]. */ + server_key = "server.key"; if (ne_sock_init()) { t_context("could not initialize socket/SSL library."); @@ -926,24 +926,18 @@ static int fail_nul_san(void) /* Check that an expired certificate is flagged as such. */ static int fail_expired(void) { - char *c = ne_concat(srcdir, "/expired.cert", NULL); - CALL(fail_ssl_request_with_error(c, CA_CERT, "localhost", - "expired certificate was accepted", - NE_SSL_EXPIRED, - "certificate has expired")); - ne_free(c); - return OK; + return fail_ssl_request_with_error("expired.cert", CA_CERT, "localhost", + "expired certificate was accepted", + NE_SSL_EXPIRED, + "certificate has expired"); } static int fail_notvalid(void) { - char *c = ne_concat(srcdir, "/notyet.cert", NULL); - CALL(fail_ssl_request_with_error(c, CA_CERT, "localhost", - "not yet valid certificate was accepted", - NE_SSL_NOTYETVALID, - "certificate is not yet valid")); - ne_free(c); - return OK; + return fail_ssl_request_with_error("notyet.cert", CA_CERT, "localhost", + "not yet valid certificate was accepted", + NE_SSL_NOTYETVALID, + "certificate is not yet valid"); } /* Check that a server cert with a random issuer and self-signed cert |