TinyDTLS: Support build with DTLS_PSK not defined.

As well as adding in the DTLS_PSK wrappers in the appropriate place. add in
coap_dtls_psk_is_supported(), coap_dtls_pki_is_supported(),
coap_dtls_pkcs11_is_supported() and coap_dtls_rpk_is_supported() functions
to support better granularity of what capabilities are available in the
(D)TLS libraries.

Update coap_string_tls_support() to use these new functions.

Uppdated documentation for these new functions.
This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2022-11-03 09:03:52 +00:00
1 parent df4d475cc7
commit 458f2d5702
12 files changed
+364 -76

No files matched your search

+30 -2
View File
@@ -50,17 +50,45 @@ typedef enum coap_dtls_role_t {
/**
* Check whether DTLS is available.
*
* @return @c 1 if support for DTLS is enabled, or @c 0 otherwise.
* @return @c 1 if support for DTLS is available, or @c 0 otherwise.
*/
int coap_dtls_is_supported(void);
/**
* Check whether TLS is available.
*
* @return @c 1 if support for TLS is enabled, or @c 0 otherwise.
* @return @c 1 if support for TLS is available, or @c 0 otherwise.
*/
int coap_tls_is_supported(void);
/**
* Check whether (D)TLS PSK is available.
*
* @return @c 1 if support for (D)TLS PSK is available, or @c 0 otherwise.
*/
int coap_dtls_psk_is_supported(void);
/**
* Check whether (D)TLS PKI is available.
*
* @return @c 1 if support for (D)TLS PKI is available, or @c 0 otherwise.
*/
int coap_dtls_pki_is_supported(void);
/**
* Check whether (D)TLS PKCS11 is available.
*
* @return @c 1 if support for (D)TLS PKCS11 is available, or @c 0 otherwise.
*/
int coap_dtls_pkcs11_is_supported(void);
/**
* Check whether (D)TLS RPK is available.
*
* @return @c 1 if support for (D)TLS RPK is available, or @c 0 otherwise.
*/
int coap_dtls_rpk_is_supported(void);
typedef enum coap_tls_library_t {
COAP_TLS_LIBRARY_NOTLS = 0, /**< No DTLS library */
COAP_TLS_LIBRARY_TINYDTLS, /**< Using TinyDTLS library */