libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 745673d704c48aaa719d57132abf2039bcd0169d
parent 3a1fd3476cb2075c1a7b6d4a1dacf293c7620e03
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 19 Feb 2014 06:45:03 +0000

locate host.crt-files even if doing an out-of-tree build


Diffstat:
Msrc/testcurl/https/Makefile.am | 3+++
Msrc/testcurl/https/test_https_sni.c | 6++++--
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/testcurl/https/Makefile.am b/src/testcurl/https/Makefile.am @@ -115,6 +115,9 @@ test_https_get_LDADD = \ test_https_sni_SOURCES = \ test_https_sni.c \ tls_test_common.c +test_https_sni_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + -DABS_SRCDIR=\"$(abs_srcdir)\" test_https_sni_LDADD = \ $(top_builddir)/src/testcurl/libcurl_version_check.a \ $(top_builddir)/src/microhttpd/libmicrohttpd.la \ diff --git a/src/testcurl/https/test_https_sni.c b/src/testcurl/https/test_https_sni.c @@ -67,6 +67,8 @@ load_keys(const char *hostname, struct Hosts *host; host = malloc (sizeof (struct Hosts)); + if (NULL == host) + abort (); host->hostname = hostname; host->next = hosts; hosts = host; @@ -256,8 +258,8 @@ main (int argc, char *const *argv) fprintf (stderr, "Error: %s\n", strerror (errno)); return -1; } - load_keys ("host1", "host1.crt", "host1.key"); - load_keys ("host2", "host2.crt", "host2.key"); + load_keys ("host1", ABS_SRCDIR "/host1.crt", ABS_SRCDIR "/host1.key"); + load_keys ("host2", ABS_SRCDIR "/host2.crt", ABS_SRCDIR "/host2.key"); d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_SSL | MHD_USE_DEBUG, 4233, NULL, NULL,