WebSocket: Add support for noTLS and TinyDTLS

Use SHA1 code from RFC3174 sections 7.1 and 7.2.
This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2023-11-15 10:06:44 +00:00
1 parent 805d148dd0
commit 2e7cb35c01
17 files changed
+663 -14

No files matched your search

+3 -2
View File
@@ -168,10 +168,11 @@ COAP_SRC = coap_address.c \
coap_pdu.c \
coap_resource.c \
coap_session.c \
coap_subscribe.c \
coap_tinydtls.c \
coap_sha1.c \
coap_str.c \
coap_subscribe.c \
coap_tcp.c \
coap_tinydtls.c \
coap_uri.c \
coap_ws.c
+4
View File
@@ -199,6 +199,10 @@ client_coap_init(coap_lwip_input_wait_handler_t input_wait, void *input_arg,
LWIP_ASSERT("Failed to create session", session != NULL);
if (proto == COAP_PROTO_WS || proto == COAP_PROTO_WSS) {
coap_ws_set_host_request(session, &uri.host);
}
coap_register_response_handler(main_coap_context, message_handler);
coap_register_nack_handler(main_coap_context, nack_handler);
+4
View File
@@ -100,11 +100,15 @@ typedef struct l_coap_tiny_context_t {
#endif
#ifndef MEMP_LEN_COAPSTRING
#ifdef COAP_WS_SUPPORT
#define MEMP_LEN_COAPSTRING 176
#else /* ! COAP_WS_SUPPORT */
#ifdef COAP_WITH_LIBTINYDTLS
#define MEMP_LEN_COAPSTRING 120
#else /* COAP_WITH_TINYDTLS */
#define MEMP_LEN_COAPSTRING 40
#endif /* COAP_WITH_TINYDTLS */
#endif /* ! COAP_WS_SUPPORT */
#endif
#ifndef MEMP_NUM_COAPCACHE_KEYS
@@ -26,6 +26,7 @@ SRC := coap_address.c \
coap_prng.c \
coap_resource.c \
coap_session.c \
coap_sha1.c \
coap_str.c \
coap_subscribe.c \
coap_tcp.c \