From aaa43301b7a92a7a3258aff0b0e6e3dbee93bfb7 Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Mon, 12 Feb 2018 09:50:32 +0000 Subject: [PATCH] coap_tinydtls.c: Add in PKI stub functions Update #includes and add in stub functions coap_dtls_context_set_pki coap_dtls_context_set_psk coap_dtls_context_check_keys_enabled --- src/coap_tinydtls.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/coap_tinydtls.c b/src/coap_tinydtls.c index 825f68e4..8352cdfe 100644 --- a/src/coap_tinydtls.c +++ b/src/coap_tinydtls.c @@ -11,10 +11,10 @@ #ifdef HAVE_LIBTINYDTLS +#include "net.h" #include "address.h" #include "debug.h" #include "mem.h" -#include "coap_dtls.h" #include #include @@ -444,6 +444,25 @@ int coap_tls_is_supported(void) { return 0; } +int coap_dtls_context_set_pki( coap_context_t *ctx UNUSED, + coap_dtls_security_setup_t setup_callback UNUSED, + coap_dtls_pki_t* setup_data UNUSED +) { + return 0; +} + +int coap_dtls_context_set_psk(coap_context_t *ctx UNUSED, + const char *hint UNUSED, + const uint8_t *key UNUSED, size_t key_len UNUSED +) { + return 1; +} + +int coap_dtls_context_check_keys_enabled(coap_context_t *ctx) +{ + return 1; +} + void *coap_tls_new_client_session(coap_session_t *session UNUSED, int *connected UNUSED) { return NULL; }