diff --git a/contrib/examples/httpd/https_example/https_example.c b/contrib/examples/httpd/https_example/https_example.c index 80cea3c7..76198969 100644 --- a/contrib/examples/httpd/https_example/https_example.c +++ b/contrib/examples/httpd/https_example/https_example.c @@ -63,10 +63,7 @@ #define LWIP_HTTPD_EXAMPLE_HTTPS 0 #endif -#define LWIP_HTTPD_EXAMPLE_HTTPS_KEY_FILE "f:\\dev\\lwip\\https_test\\privateKey.key" -#define LWIP_HTTPD_EXAMPLE_HTTPS_CERT_FILE "f:\\dev\\lwip\\https_test\\certificate.crt" - -#if LWIP_HTTPD_EXAMPLE_HTTPS +#if LWIP_HTTPD_EXAMPLE_HTTPS && LWIP_ALTCP_TLS #ifndef LWIP_HTTPD_EXAMPLE_HTTPS_KEY_FILE #error "define LWIP_HTTPD_EXAMPLE_HTTPS_KEY_FILE to the created server private key" @@ -98,7 +95,7 @@ static u8_t *read_file(const char *filename, size_t *file_size) fsize = ftell(f); fseek(f, 0, SEEK_SET); - buf = malloc(fsize + 1); + buf = (u8_t *)malloc(fsize + 1); if (!buf) { fclose(f); return NULL; diff --git a/contrib/examples/httpd/https_example/https_example.h b/contrib/examples/httpd/https_example/https_example.h index 0f92214e..c1525e6a 100644 --- a/contrib/examples/httpd/https_example/https_example.h +++ b/contrib/examples/httpd/https_example/https_example.h @@ -32,7 +32,7 @@ #ifndef LWIP_HDR_HTTP_EXAMPLES_HTTPS_EXAMPLE #define LWIP_HDR_HTTP_EXAMPLES_HTTPS_EXAMPLE -#define LWIP_HTTPD_EXAMPLE_HTTPS 1 + void https_ex_init(void); #endif /* LWIP_HDR_HTTP_EXAMPLES_HTTPS_EXAMPLE */