set(LWS_WITHOUT_EXTENSIONS 1)
endif()
-include_directories(include plugins)
+if (LWS_WITH_MBEDTLS)
+ include_directories(lib/tls/mbedtls/wrapper/include)
+endif()
+
+include_directories(include plugins lib/core lib/core-net lib/event-libs include/abstract lib/tls lib/roles lib/event-libs/libuv lib/event-libs/poll lib/event-libs/libevent lib/event-libs/libev lib/jose/jwe lib/jose/jws lib/jose lib/misc lib/roles/http lib/roles/http/compression lib/roles/h1 lib/roles/h2 lib/roles/ws lib/roles/cgi lib/roles/dbus lib/roles/raw-proxy)
+
+if (LWS_WITH_ESP32)
+ include_directories(lib/plat/esp32)
+else()
+ if (WIN32)
+ include_directories(lib/plat/windows)
+ else()
+ if (LWS_WITH_OPTEE)
+ include_directories(lib/plat/optee)
+ else()
+ include_directories(lib/plat/unix)
+ endif()
+ endif()
+endif()
+
if (LWS_WITH_LWSWS)
message(STATUS "LWS_WITH_LWSWS --> Enabling LWS_WITH_PLUGINS and LWS_WITH_LIBUV")
# Group headers and sources.
# Some IDEs use this for nicer file structure.
set(HDR_PRIVATE
- lib/core/private.h)
+ lib/core/private-lib-core.h)
set(HDR_PUBLIC
"${PROJECT_SOURCE_DIR}/include/libwebsockets.h"
list(APPEND SOURCES
lib/core-net/connect.c
lib/core-net/client.c
- lib/roles/http/client/client.c
+ lib/roles/http/client/client-http.c
lib/roles/http/client/client-handshake.c)
endif()
if (LWS_WITH_MBEDTLS)
list(APPEND SOURCES
- lib/tls/mbedtls/tls.c
- lib/tls/mbedtls/x509.c
+ lib/tls/mbedtls/mbedtls-tls.c
+ lib/tls/mbedtls/mbedtls-x509.c
)
if (LWS_WITH_NETWORK)
list(APPEND SOURCES
- lib/tls/mbedtls/ssl.c
+ lib/tls/mbedtls/mbedtls-ssl.c
)
endif()
if (LWS_WITH_GENCRYPTO)
endif()
else()
list(APPEND SOURCES
- lib/tls/openssl/tls.c
- lib/tls/openssl/x509.c
+ lib/tls/openssl/openssl-tls.c
+ lib/tls/openssl/openssl-x509.c
)
if (LWS_WITH_NETWORK)
list(APPEND SOURCES
- lib/tls/openssl/ssl.c
+ lib/tls/openssl/openssl-ssl.c
)
endif()
if (LWS_WITH_GENCRYPTO)
* MA 02110-1301 USA
*/
-#include <core/private.h>
-#include <abstract/private.h>
+#include <private-lib-core.h>
+#include <private-lib-abstract.h>
extern const lws_abs_transport_t lws_abs_transport_cli_raw_skt,
lws_abs_transport_cli_unit_test;
* MA 02110-1301 USA
*/
-#include "core/private.h"
-#include "abstract/private.h"
+#include "private-lib-core.h"
+#include "private-lib-abstract.h"
/** enum lwsgs_smtp_states - where we are in SMTP protocol sequence */
typedef enum lwsgs_smtp_states {
* for each test using te
*/
-#include <core/private.h>
+#include <private-lib-core.h>
struct lws_seq_test_sequencer {
lws_abs_t original_abs;
* MA 02110-1301 USA
*/
-#include "core/private.h"
-#include "abstract/private.h"
+#include "private-lib-core.h"
+#include "private-lib-abstract.h"
typedef struct lws_abstxp_raw_skt_priv {
struct lws_abs *abs;
* to provided canned packets from an array of test vectors.
*/
-#include "core/private.h"
-#include "abstract/private.h"
+#include "private-lib-core.h"
+#include "private-lib-abstract.h"
/* this is the transport priv instantiated at abs->ati */
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
static int
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
LWS_VISIBLE int
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
void
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
void
lws_client_stash_destroy(struct lws *wsi)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#if defined(LWS_WITH_HTTP_PROXY)
static int
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
struct lws_dsh_search {
size_t required;
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#if !defined(LWS_WITH_ESP32) && !defined(LWS_PLAT_OPTEE)
static int
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
/*
* notice this returns number of bytes consumed, or -1
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
int
_lws_change_pollfd(struct lws *wsi, int _and, int _or, struct lws_pollargs *pa)
#define _POSIX_C_SOURCE 200112L
#endif
-#include "roles/private.h"
+#include "private-lib-roles.h"
#ifdef LWS_WITH_IPV6
#if defined(WIN32) || defined(_WIN32)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
/*
* per pending event
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#if defined(LWS_WITH_SERVER_STATUS)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
int
lws_callback_as_writeable(struct lws *wsi)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
static int
sul_compare(const lws_dll2_t *d, const lws_dll2_t *i)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#if defined(LWS_WITH_STATS)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
const struct lws_role_ops *available_roles[] = {
#if defined(LWS_ROLE_H2)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
void
__lws_wsi_remove_from_sul(struct lws *wsi)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#if defined (_DEBUG)
void lwsi_set_role(struct lws *wsi, lws_wsi_state_t role)
-#include "core/private.h"
+#include "private-lib-core.h"
#if defined(LWS_HAVE_MALLOC_USABLE_SIZE)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#ifdef LWS_HAVE_SYS_TYPES_H
#include <sys/types.h>
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#ifndef LWS_BUILD_HASH
#define LWS_BUILD_HASH "unknown-build-hash"
#endif
#if defined(LWS_WITH_ESP32)
+#if defined(LWS_AMAZON_RTOS)
+ context->last_free_heap = xPortGetFreeHeapSize();
+#else
context->last_free_heap = esp_get_free_heap_size();
#endif
+#endif
/* default to just the platform fops implementation */
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#ifdef LWS_HAVE_SYS_TYPES_H
#include <sys/types.h>
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#ifdef LWS_HAVE_SYS_TYPES_H
#include <sys/types.h>
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#ifdef LWS_HAVE_SYS_TYPES_H
#include <sys/types.h>
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#ifdef LWS_HAVE_SYS_TYPES_H
#include <sys/types.h>
*/
#if defined(LWS_WITH_ESP32)
- #include "plat/esp32/private.h"
+ #include "private-lib-plat-esp32.h"
#else
#if defined(WIN32) || defined(_WIN32)
- #include "plat/windows/private.h"
+ #include "private-lib-plat-windows.h"
#else
#if defined(LWS_PLAT_OPTEE)
- #include "plat/optee/private.h"
+ #include "private-lib-plat.h"
#else
- #include "plat/unix/private.h"
+ #include "private-lib-plat-unix.h"
#endif
#endif
#endif
#include "libwebsockets.h"
-#include "tls/private.h"
+#include "private-lib-tls.h"
#if defined(WIN32) || defined(_WIN32)
// Visual studio older than 2015 and WIN_CE has only _stricmp
struct lws;
#if defined(LWS_WITH_NETWORK)
-#include "event-libs/private.h"
+#include "private-lib-event-libs.h"
struct lws_io_watcher {
#endif
#if defined(LWS_WITH_NETWORK)
-#include "core-net/private.h"
+#include "private-lib-core-net.h"
#endif
struct lws_deferred_free
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
LWS_VISIBLE LWS_EXTERN void
### Event loop ops struct
-The event lib support is defined by `struct lws_event_loop_ops` in `lib/event-libs/private.h`,
+The event lib support is defined by `struct lws_event_loop_ops` in `lib/event-libs/private-lib-event-libs.h`,
each event lib support instantiates one of these and fills in the appropriate ops
callbacks to perform its job. By convention that lives in
`./lib/event-libs/**lib name**/**lib_name**.c`.
Truly private declarations for the event lib can go in the event-libs directory as you like.
However when the declarations must be accessible to other things in lws build, eg,
the event lib support adds members to `struct lws` when enabled, they should be in the
-event lib supporr directory in a file `private.h`.
+event lib support directory in a file `private-lib-event-libs-myeventlib.h`.
-Search for "bring in event libs private declarations" in `./lib/core/private.h
+Search for "bring in event libs private declarations" in `./lib/core/private-lib-core.h
and add your private event lib support file there following the style used for the other
event libs, eg,
```
#if defined(LWS_WITH_LIBUV)
- #include "event-libs/libuv/private.h"
+ #include "event-libs/libuv/private-lib-event-libs-libuv.h"
#endif
```
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
static void
lws_ev_hrtimer_cb(struct ev_loop *loop, struct ev_timer *watcher, int revents)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
static void
lws_event_hrtimer_cb(int fd, short event, void *p)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
static void
lws_uv_sultimer_cb(uv_timer_t *timer
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*
- * This is included from core/private.h if LWS_ROLE_WS
+ * This is included from private-lib-core.h if LWS_ROLE_WS
*/
-#include <core/private.h>
+#include <private-lib-core.h>
struct lws_event_loop_ops event_loop_ops_poll = {
/* name */ "poll",
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*
- * This is included from core/private.h
+ * This is included from private-lib-core.h
*/
struct lws_event_loop_ops {
/* bring in event libs private declarations */
#if defined(LWS_WITH_POLL)
-#include "event-libs/poll/private.h"
+#include "private-lib-event-libs-poll.h"
#endif
#if defined(LWS_WITH_LIBUV)
-#include "event-libs/libuv/private.h"
+#include "private-lib-event-libs-libuv.h"
#endif
#if defined(LWS_WITH_LIBEVENT)
-#include "event-libs/libevent/private.h"
+#include "private-lib-event-libs-libevent.h"
#endif
#if defined(LWS_WITH_LIBEV)
-#include "event-libs/libev/private.h"
+#include "private-lib-event-libs-libev.h"
#endif
* JWE code for payload encrypt / decrypt using aescbc
*
*/
-#include "core/private.h"
-#include "jose/jwe/private.h"
+
+#include "private-lib-core.h"
+#include "private-lib-jose-jwe.h"
int
lws_jwe_encrypt_cbc_hs(struct lws_jwe *jwe, uint8_t *cek,
* JWE code related to aes gcm
*
*/
-#include "core/private.h"
-#include "jose/jwe/private.h"
+
+#include "private-lib-core.h"
+#include "private-lib-jose-jwe.h"
/*
* NOTICE this is AESGCM content encryption, it's not AES GCM key wrapping
* JWE code related to aeskw cbc
*
*/
-#include "core/private.h"
-#include "jose/jwe/private.h"
+#include "private-lib-core.h"
+#include "private-lib-jose-jwe.h"
/*
* RFC3394 Key Wrap uses a 128-bit key, and bloats what it is wrapping by
* JWE code related to ecdh-es + Concat KDF and aes kw
*
*/
-#include "core/private.h"
-#include "jose/jwe/private.h"
+
+#include "private-lib-core.h"
+#include "private-lib-jose-jwe.h"
/*
* From RFC7518 JWA
* JWE code related to rsa + aescbc
*
*/
-#include "core/private.h"
-#include "jose/jwe/private.h"
+
+#include "private-lib-core.h"
+#include "private-lib-jose-jwe.h"
/*
* Requirements on entry:
* JWE code related to aes gcm
*
*/
-#include "core/private.h"
-#include "jose/jwe/private.h"
+
+#include "private-lib-core.h"
+#include "private-lib-jose-jwe.h"
#define LWS_AESGCM_IV 12
* This supports RFC7516 JSON Web Encryption
*
*/
-#include "core/private.h"
-#include "jose/private.h"
-#include "jose/jwe/private.h"
+
+#include "private-lib-core.h"
+#include "private-lib-jose.h"
+#include "private-lib-jose-jwe.h"
/*
* Currently only support flattened or compact (implicitly single signature)
* MA 02110-1301 USA
*/
-#include "core/private.h"
-#include "jose/private.h"
+#include "private-lib-core.h"
+#include "private-lib-jose.h"
#if !defined(LWS_PLAT_OPTEE) && !defined(OPTEE_DEV_KIT)
#include <fcntl.h>
* to specify its JOSE JSON object. So it lives in ./lib/jose/jws/jose.c.
*/
-#include "core/private.h"
-#include "jose/private.h"
+#include "private-lib-core.h"
+#include "jose/private-lib-jose.h"
#include <stdint.h>
* MA 02110-1301 USA
*/
-#include "core/private.h"
-#include "private.h"
+#include "private-lib-core.h"
+#include "private-lib-jose-jws.h"
/*
* Currently only support flattened or compact (implicitly single signature)
#include <stdio.h>
#include <string.h>
-#include "core/private.h"
+#include "private-lib-core.h"
static const char encode_orig[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz0123456789+/";
#include <unistd.h>
#include <errno.h>
-#include "core/private.h"
+#include "private-lib-core.h"
pid_t pid_daemon;
static char *lock_path;
#define _DARWIN_C_SOURCE
#include <libwebsockets.h>
-#include "core/private.h"
+#include "private-lib-core.h"
#include <string.h>
#include <stdio.h>
#define _GNU_SOURCE
#include <pthread.h>
-#include "core/private.h"
+#include "private-lib-core.h"
#include <string.h>
#include <stdio.h>
* MA 02110-1301 USA
*/
-#include "core/private.h"
-#include "misc/fts/private.h"
+#include "private-lib-core.h"
+#include "private-lib-misc-fts.h"
#include <stdio.h>
#include <string.h>
* having to load it all in memory
*/
-#include "core/private.h"
-#include "misc/fts/private.h"
+#include "private-lib-core.h"
+#include "private-lib-misc-fts.h"
#include <stdio.h>
#include <string.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
-#include "core/private.h"
+#include "private-lib-core.h"
#ifdef LWS_HAVE_SYS_SOCKIO_H
#include <sys/sockio.h>
*/
#include <libwebsockets.h>
-#include "core/private.h"
+#include "private-lib-core.h"
#include <string.h>
#include <stdio.h>
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
LWS_VISIBLE LWS_EXTERN struct lws_ring *
lws_ring_create(size_t element_len, size_t count,
*/
#include <libwebsockets.h>
-#include <core/private.h>
+#include <private-lib-core.h>
#include <assert.h>
*/
#include <libwebsockets.h>
-#include <core/private.h>
+#include <private-lib-core.h>
#include <sqlite3.h>
#if !defined(LWS_PLAT_OPTEE) && !defined(OPTEE_DEV_KIT)
-#include "core/private.h"
-#include "misc/lwsac/private.h"
+#include "private-lib-core.h"
+#include "private-lib-misc-lwsac.h"
/*
* Helper for caching a file in memory in a lac, but also to check at intervals
* MA 02110-1301 USA
*/
-#include "core/private.h"
-#include "misc/lwsac/private.h"
+#include "private-lib-core.h"
+#include "private-lib-misc-lwsac.h"
void
lws_list_ptr_insert(lws_list_ptr *head, lws_list_ptr *add,
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
/* requires context->lock */
static void
* implemented by Jun-ichiro itojun Itoh <itojun@itojun.org>
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#ifdef LWS_HAVE_SYS_TYPES_H
#include <sys/types.h>
#define _GNU_SOURCE
#include <pthread.h>
-#include "core/private.h"
+#include "private-lib-core.h"
#include <string.h>
#include <stdio.h>
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
void
lws_plat_insert_socket_into_fds(struct lws_context *context, struct lws *wsi)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
int lws_plat_apply_FD_CLOEXEC(int n)
{
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
-#include "misc/romfs.h"
+#include "romfs.h"
#include <esp_ota_ops.h>
#include <tcpip_adapter.h>
#include <esp_image_format.h>
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
int
lws_plat_context_early_init(void)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
lws_usec_t
lws_now_usecs(void)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
int
lws_plat_pipe_create(struct lws *wsi)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
int
lws_plat_service(struct lws_context *context, int timeout_ms)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
int
lws_send_pipe_choked(struct lws *wsi)
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*
- * Included from lib/core/private.h if LWS_WITH_ESP32
+ * Included from lib/private-lib-core.h if LWS_WITH_ESP32
*/
#define MSG_NOSIGNAL 0
-#include "core/private.h"
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010 - 2019 Andy Green <andy@warmcat.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "private-lib-core.h"
#if !defined(LWS_WITH_NETWORK)
#include <crypto/crypto.h>
-#include "core/private.h"
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010 - 2019 Andy Green <andy@warmcat.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "private-lib-core.h"
int
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*
- * Included from lib/core/private.h if LWS_WITH_OPTEE
+ * Included from lib/private-lib-core.h if LWS_WITH_OPTEE
*/
#include <unistd.h>
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*
- * Included from lib/core/private.h if no explicit platform
+ * Included from lib/private-lib-core.h if no explicit platform
*/
#include <fcntl.h>
*/
#define _GNU_SOURCE
-#include "core/private.h"
+#include "private-lib-core.h"
#include <pwd.h>
#include <grp.h>
*/
#define _GNU_SOURCE
-#include "core/private.h"
+#include "private-lib-core.h"
struct lws *
wsi_from_fd(const struct lws_context *context, int fd)
*/
#define _GNU_SOURCE
-#include "core/private.h"
+#include "private-lib-core.h"
#include <pwd.h>
#include <grp.h>
*/
#define _GNU_SOURCE
-#include "core/private.h"
+#include "private-lib-core.h"
#include <pwd.h>
#include <grp.h>
*/
#define _GNU_SOURCE
-#include "core/private.h"
+#include "private-lib-core.h"
lws_usec_t
lws_now_usecs(void)
*/
#define _GNU_SOURCE
-#include "core/private.h"
+#include "private-lib-core.h"
int
*/
#define _GNU_SOURCE
-#include "core/private.h"
+#include "private-lib-core.h"
#include <pwd.h>
#include <grp.h>
*/
#define _GNU_SOURCE
-#include "core/private.h"
+#include "private-lib-core.h"
int
lws_poll_listen_fd(struct lws_pollfd *fd)
*/
#define _GNU_SOURCE
-#include "core/private.h"
+#include "private-lib-core.h"
#include <pwd.h>
#include <grp.h>
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*
- * Included from lib/core/private.h if defined(WIN32) || defined(_WIN32)
+ * Included from lib/private-lib-core.h if defined(WIN32) || defined(_WIN32)
*/
#ifndef WIN32_LEAN_AND_MEAN
#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#endif
-#include "core/private.h"
+#include "private-lib-core.h"
struct lws *
wsi_from_fd(const struct lws_context *context, lws_sockfd_type fd)
#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#endif
-#include "core/private.h"
+#include "private-lib-core.h"
int lws_plat_apply_FD_CLOEXEC(int n)
{
#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#endif
-#include "core/private.h"
+#include "private-lib-core.h"
int
lws_plat_drop_app_privileges(struct lws_context *context, int actually_set)
#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#endif
-#include "core/private.h"
+#include "private-lib-core.h"
lws_usec_t
#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#endif
-#include "core/private.h"
+#include "private-lib-core.h"
int
lws_plat_pipe_create(struct lws *wsi)
#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#endif
-#include "core/private.h"
+#include "private-lib-core.h"
int
lws_plat_plugins_init(struct lws_context * context, const char * const *d)
#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#endif
-#include "core/private.h"
+#include "private-lib-core.h"
LWS_EXTERN int
#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#endif
-#include "core/private.h"
+#include "private-lib-core.h"
LWS_VISIBLE int
### Role ops struct
-The role is defined by `struct lws_role_ops` in `lib/roles/private.h`,
+The role is defined by `struct lws_role_ops` in `lib/roles/private-lib-roles.h`,
each role instantiates one of these and fills in the appropriate ops
callbacks to perform its job. By convention that lives in
`./lib/roles/**role name**/ops-**role_name**.c`.
Truly private declarations for the role can go in the role directory as you like.
However when the declarations must be accessible to other things in lws build, eg,
the role adds members to `struct lws` when enabled, they should be in the role
-directory in a file `private.h`.
+directory in a file `private-lib-roles-myrole.h`.
-Search for "bring in role private declarations" in `./lib/roles/private.h
+Search for "bring in role private declarations" in `./lib/roles/private-lib-roles.h
and add your private role file there following the style used for the other roles,
eg,
```
#if defined(LWS_ROLE_WS)
- #include "roles/ws/private.h"
+ #include "roles/ws/private-lib-roles-ws.h"
#else
#define lwsi_role_ws(wsi) (0)
#endif
#define _GNU_SOURCE
-#include "core/private.h"
+#include "private-lib-core.h"
#if defined(WIN32) || defined(_WIN32)
#else
* MA 02110-1301 USA
*/
-#include <core/private.h>
+#include <private-lib-core.h>
static int
rops_handle_POLLIN_cgi(struct lws_context_per_thread *pt, struct lws *wsi,
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*
- * This is included from core/private.h if LWS_ROLE_WS
+ * This is included from private-lib-core.h if LWS_ROLE_WS
*/
#if defined(LWS_WITH_ZLIB)
* worries we create a new shadow wsi until it looks like it is closing again.
*/
-#include <core/private.h>
+#include <private-lib-core.h>
#include <libwebsockets/lws-dbus.h>
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*
- * This is included from core/private.h if LWS_ROLE_DBUS
+ * This is included from private-lib-core.h if LWS_ROLE_DBUS
*/
#include <dbus/dbus.h>
* MA 02110-1301 USA
*/
-#include <core/private.h>
+#include <private-lib-core.h>
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*
- * This is included from core/private.h if LWS_ROLE_H1
+ * This is included from private-lib-core.h if LWS_ROLE_H1
*
* Most of the h1 business is defined in the h1 / h2 common roles/http dir
*/
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
/*
* Official static header table for HPACK
* MA 02110-1301 USA
*/
-
-#include "core/private.h"
+#include "private-lib-core.h"
/*
* bitmap of control messages that are valid to receive for each http2 state
* MA 02110-1301 USA
*/
-#include <core/private.h>
+#include <private-lib-core.h>
/*
* These are the standardized defaults.
-#include "core/private.h"
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010 - 2019 Andy Green <andy@warmcat.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "private-lib-core.h"
static int
lws_getaddrinfo46(struct lws *wsi, const char *ads, struct addrinfo **result)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
LWS_VISIBLE LWS_EXTERN void
lws_client_http_body_pending(struct lws *wsi, int something_left_to_send)
The compression transforms expose an "ops" type struct and a compressor name
as used by `content-encoding`... the ops struct definition can be found in
-./private.h.
+./private-lib-roles-http-compression.h.
Because the compression transform depends on being able to send on its output
before it can process new input, the transform adds a new kind of buflist
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
static int
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
static int
lcs_init_compression_deflate(lws_comp_ctx_t *ctx, int decomp)
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*
- * This is included from core/private.h if LWS_WITH_HTTP_STREAM_COMPRESSION
+ * This is included from private-lib-core.h if LWS_WITH_HTTP_STREAM_COMPRESSION
*/
#if defined(LWS_WITH_MINIZ)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
/* compression methods listed in order of preference */
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#include "lextable-strings.h"
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*
- * This is included from core/private.h if either H1 or H2 roles are
+ * This is included from private-lib-core.h if either H1 or H2 roles are
* enabled
*/
#endif
#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
-#include "roles/http/compression/private.h"
+#include "private-lib-roles-http-compression.h"
#endif
#define lwsi_role_http(wsi) (lwsi_role_h1(wsi) || lwsi_role_h2(wsi))
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
/*
* Produce Apache-compatible log string for wsi, like this:
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#if defined(LWS_WITH_MINIZ)
#include <miniz.h>
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#ifndef _WIN32
/* this is needed for Travis CI */
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#define LWS_MAX_ELEM_NAME 32
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
static const unsigned char lextable[] = {
-#if defined(LWS_AMAZON_RTOS) || defined(LWS_AMAZON_LINUX)
- #include "roles/http/lextable.h"
-#else
- #include "../lextable.h"
-#endif
+ #include "lextable.h"
};
#define FAIL_CHAR 0x08
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
/*
* RFC7233 examples
-#include "core/private.h"
+#include "private-lib-core.h"
#if defined(LWS_WITH_HUBBUB)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
const char * const method_names[] = {
"GET", "POST", "OPTIONS", "PUT", "PATCH", "DELETE", "CONNECT", "HEAD",
* MA 02110-1301 USA
*/
-#include <core/private.h>
+#include <private-lib-core.h>
static int
rops_handle_POLLIN_listen(struct lws_context_per_thread *pt, struct lws *wsi,
* MA 02110-1301 USA
*/
-#include <core/private.h>
+#include <private-lib-core.h>
static int
rops_handle_POLLIN_pipe(struct lws_context_per_thread *pt, struct lws *wsi,
/* bring in role private declarations */
#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
- #include "roles/http/private.h"
+ #include "private-lib-roles-http.h"
#else
#define lwsi_role_http(wsi) (0)
#endif
#if defined(LWS_ROLE_H1)
- #include "roles/h1/private.h"
+ #include "private-lib-roles-h1.h"
#else
#define lwsi_role_h1(wsi) (0)
#endif
#if defined(LWS_ROLE_H2)
- #include "roles/h2/private.h"
+ #include "private-lib-roles-h2.h"
#else
#define lwsi_role_h2(wsi) (0)
#endif
#if defined(LWS_ROLE_WS)
- #include "roles/ws/private.h"
+ #include "private-lib-roles-ws.h"
#else
#define lwsi_role_ws(wsi) (0)
#endif
#if defined(LWS_ROLE_CGI)
- #include "roles/cgi/private.h"
+ #include "private-lib-roles-cgi.h"
#else
#define lwsi_role_cgi(wsi) (0)
#endif
#if defined(LWS_ROLE_DBUS)
- #include "roles/dbus/private.h"
+ #include "private-lib-roles-dbus.h"
#else
#define lwsi_role_dbus(wsi) (0)
#endif
#if defined(LWS_ROLE_RAW_PROXY)
- #include "roles/raw-proxy/private.h"
+ #include "private-lib-roles-raw-proxy.h"
#else
#define lwsi_role_raw_proxy(wsi) (0)
#endif
* MA 02110-1301 USA
*/
-#include <core/private.h>
+#include <private-lib-core.h>
static int
rops_handle_POLLIN_raw_file(struct lws_context_per_thread *pt, struct lws *wsi,
* MA 02110-1301 USA
*/
-#include <core/private.h>
+#include <private-lib-core.h>
static int
rops_handle_POLLIN_raw_proxy(struct lws_context_per_thread *pt, struct lws *wsi,
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*
- * This is included from core/private.h if LWS_ROLE_RAW_PROXY
+ * This is included from private-lib-core.h if LWS_ROLE_RAW_PROXY
*/
extern struct lws_role_ops role_ops_raw_proxy;
* MA 02110-1301 USA
*/
-#include <core/private.h>
+#include <private-lib-core.h>
static int
rops_handle_POLLIN_raw_skt(struct lws_context_per_thread *pt, struct lws *wsi,
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
/*
* parsers.c: lws_ws_rx_sm() needs to be roughly kept in
* MA 02110-1301 USA
*/
-#include <core/private.h>
+#include <private-lib-core.h>
/*
* In-place str to lower case
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#include "extension-permessage-deflate.h"
#include <stdio.h>
#include <string.h>
-#include "core/private.h"
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010 - 2019 Andy Green <andy@warmcat.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "private-lib-core.h"
#include "extension-permessage-deflate.h"
* MA 02110-1301 USA
*/
-#include <core/private.h>
+#include <private-lib-core.h>
#define LWS_CPYAPP(ptr, str) { strcpy(ptr, str); ptr += strlen(str); }
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*
- * This is included from core/private.h if LWS_ROLE_WS
+ * This is included from private-lib-core.h if LWS_ROLE_WS
*/
extern struct lws_role_ops role_ops_ws;
* MA 02110-1301 USA
*/
-#include <core/private.h>
+#include <private-lib-core.h>
#define LWS_CPYAPP(ptr, str) { strcpy(ptr, str); ptr += strlen(str); }
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
-#include "core/private.h"
+
+#include "private-lib-core.h"
/*
* These came from RFC7518 (JSON Web Algorithms) Section 3
* lws_genec provides an EC abstraction api in lws that works the
* same whether you are using openssl or mbedtls crypto functions underneath.
*/
-#include "core/private.h"
+#include "private-lib-core.h"
const struct lws_ec_curves *
lws_genec_curve(const struct lws_ec_curves *table, const char *name)
* lws_genaes provides an abstraction api for AES in lws that works the
* same whether you are using openssl or mbedtls hash functions underneath.
*/
-#include "core/private.h"
-#include "../../jose/private.h"
+#include "private-lib-core.h"
+#include "../../jose/private-lib-jose.h"
static int operation_map[] = { MBEDTLS_AES_ENCRYPT, MBEDTLS_AES_DECRYPT };
* lws-gencrypto openssl-specific common code
*/
-#include "core/private.h"
-#include "tls/mbedtls/private.h"
+#include "private-lib-core.h"
+#include "private-lib-tls-mbedtls.h"
mbedtls_md_type_t
lws_gencrypto_mbedtls_hash_to_MD_TYPE(enum lws_genhash_types hash_type)
* lws_genec provides an EC abstraction api in lws that works the
* same whether you are using openssl or mbedtls crypto functions underneath.
*/
-#include "core/private.h"
-#include "tls/mbedtls/private.h"
+#include "private-lib-core.h"
+#include "private-lib-tls-mbedtls.h"
const struct lws_ec_curves lws_ec_curves[] = {
/*
* lws_genrsa provides an RSA abstraction api in lws that works the
* same whether you are using openssl or mbedtls crypto functions underneath.
*/
-#include "core/private.h"
-#include "tls/mbedtls/private.h"
+#include "private-lib-core.h"
+#include "private-lib-tls-mbedtls.h"
#include <mbedtls/rsa.h>
LWS_VISIBLE void
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
static int
OpenSSL_client_verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#include <mbedtls/x509_csr.h>
int
* MA 02110-1301 USA
*/
-#include "core/private.h"
-#include "tls/mbedtls/private.h"
+#include "private-lib-core.h"
+#include "private-lib-tls-mbedtls.h"
LWS_VISIBLE void
* MA 02110-1301 USA
*/
-#include "core/private.h"
-#include "tls/mbedtls/private.h"
+#include "private-lib-core.h"
+#include "private-lib-tls-mbedtls.h"
void
lws_tls_err_describe_clear(void)
* MA 02110-1301 USA
*/
-#include "core/private.h"
-#include "tls/mbedtls/private.h"
+#include "private-lib-core.h"
+#include "private-lib-tls-mbedtls.h"
#include <mbedtls/oid.h>
#if defined(LWS_PLAT_OPTEE) || defined(OPTEE_DEV_KIT)
#ifndef _SSL_DEBUG_H_
#define _SSL_DEBUG_H_
-#include "platform/ssl_port.h"
+#include "ssl_port.h"
#ifdef __cplusplus
extern "C" {
extern "C" {
#endif
-//#include "core/private.h"
+//#include "private-lib-core.h"
#include <lws_config.h>
#if defined(LWS_WITH_ESP32)
/* AMAZON RTOS has its own setting via MTK_MBEDTLS_CONFIG_FILE */
#endif\r
\r
#include <stdlib.h>\r
-#include "internal/ssl_x509.h"\r
-#include "internal/ssl_pkey.h"\r
+#include "ssl_x509.h"\r
+#include "ssl_pkey.h"\r
\r
/*\r
{\r
#include "ssl_dbg.h"
#include "ssl_port.h"
-#include "core/private.h"
+#include "private-lib-core.h"
char *
lws_strncpy(char *dest, const char *src, size_t size);
#include "mbedtls/error.h"
#include "mbedtls/certs.h"
-#include "core/private.h"
+#include "private-lib-core.h"
#define X509_INFO_STRING_LENGTH 8192
* lws_genaes provides an AES abstraction api in lws that works the
* same whether you are using openssl or mbedtls hash functions underneath.
*/
-#include "core/private.h"
-#include "../../jose/private.h"
+#include "private-lib-core.h"
+#include "../../jose/private-lib-jose.h"
/*
* Care: many openssl apis return 1 for success. These are translated to the
* lws-gencrypto openssl-specific common code
*/
-#include "core/private.h"
-#include "tls/openssl/private.h"
+#include "private-lib-core.h"
+#include "private-lib-tls-openssl.h"
/*
* Care: many openssl apis return 1 for success. These are translated to the
* lws_genec provides an EC abstraction api in lws that works the
* same whether you are using openssl or mbedtls crypto functions underneath.
*/
-#include "core/private.h"
-#include "tls/openssl/private.h"
+#include "private-lib-core.h"
+#include "private-lib-tls-openssl.h"
/*
* Care: many openssl apis return 1 for success. These are translated to the
* lws_genrsa provides an RSA abstraction api in lws that works the
* same whether you are using openssl or mbedtls crypto functions underneath.
*/
-#include "core/private.h"
-#include "tls/openssl/private.h"
+#include "private-lib-core.h"
+#include "private-lib-tls-openssl.h"
/*
* Care: many openssl apis return 1 for success. These are translated to the
* MA 02110-1301 USA
*/
-#include "core/private.h"
-
-#include "tls/openssl/private.h"
+#include "private-lib-core.h"
+#include "private-lib-tls-openssl.h"
/*
* Care: many openssl apis return 1 for success. These are translated to the
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
/*
* Care: many openssl apis return 1 for success. These are translated to the
* MA 02110-1301 USA
*/
-#include "core/private.h"
-#include "tls/openssl/private.h"
+#include "private-lib-core.h"
+#include "private-lib-tls-openssl.h"
#include <errno.h>
int openssl_websocket_private_data_index,
* MA 02110-1301 USA
*/
-#include "core/private.h"
-#include "tls/openssl/private.h"
+#include "private-lib-core.h"
+#include "private-lib-tls-openssl.h"
extern int openssl_websocket_private_data_index,
openssl_SSL_CTX_private_data_index;
* MA 02110-1301 USA
*/
-#include "core/private.h"
-#include "tls/openssl/private.h"
+#include "private-lib-core.h"
+#include "private-lib-tls-openssl.h"
#if !defined(LWS_PLAT_OPTEE)
static int
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*
- * This is included from core/private.h if LWS_WITH_TLS
+ * This is included from private-lib-core.h if LWS_WITH_TLS
*/
#if !defined(__LWS_TLS_PRIVATE_H__)
#include <mbedtls/aes.h>
#include <mbedtls/gcm.h>
#include <mbedtls/x509_crt.h>
- #include "tls/mbedtls/wrapper/include/openssl/ssl.h" /* wrapper !!!! */
+ #include "openssl/ssl.h" /* wrapper !!!! */
#else /* not esp32 */
#if defined(LWS_WITH_MBEDTLS)
#include <mbedtls/ssl.h>
#include <mbedtls/x509_csr.h>
#include <mbedtls/ecp.h>
#include <mbedtls/ecdsa.h>
- #include "tls/mbedtls/wrapper/include/openssl/ssl.h" /* wrapper !!!! */
+ #include "openssl/ssl.h" /* wrapper !!!! */
#else
#include <openssl/ssl.h>
#include <openssl/evp.h>
typedef X509 lws_tls_x509;
#if defined(LWS_WITH_NETWORK)
-#include "tls/private-network.h"
+#include "private-network.h"
#endif
LWS_EXTERN int
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*
- * This is included from core/private.h if LWS_WITH_TLS
+ * This is included from private-lib-core.h if LWS_WITH_TLS
*/
struct lws_context_per_thread;
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
int
lws_ssl_client_connect1(struct lws *wsi)
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
/*
* fakes POLLIN on all tls guys with buffered rx
* MA 02110-1301 USA
*/
-#include "core/private.h"
+#include "private-lib-core.h"
#if defined(LWS_WITH_MBEDTLS) || (defined(OPENSSL_VERSION_NUMBER) && \
OPENSSL_VERSION_NUMBER >= 0x10002000L)
* MA 02110-1301 USA
*/
-#include "core/private.h"
-#include "tls/private.h"
+#include "private-lib-core.h"
+#include "private-lib-tls.h"
#if !defined(LWS_PLAT_OPTEE) && !defined(OPTEE_DEV_KIT)
#if defined(LWS_WITH_ESP32) && !defined(LWS_AMAZON_RTOS)
* 4) LWS_TLS_EXTANT_YES: The certs are present with the correct name and we
* have the rights to read them.
*/
-#if !defined(LWS_AMAZON_RTOS)
+
enum lws_tls_extant
lws_tls_use_any_upgrade_check_extant(const char *name)
{
-#if !defined(LWS_PLAT_OPTEE)
+#if !defined(LWS_PLAT_OPTEE) && !defined(LWS_AMAZON_RTOS)
int n;
#endif
return LWS_TLS_EXTANT_YES;
}
-#endif
-