libcoap 4.3.2rc2

Data Structures | Macros | Typedefs | Enumerations | Functions
coap_dtls.h File Reference

CoAP DTLS support. More...

`#include "coap_time.h"`
`#include "coap_str.h"`

Go to the source code of this file.

## Data Structures
struct | coap_tls_version_t
| The structure used for returning the underlying (D)TLS library information. More...
struct | coap_pki_key_pem_t
| The structure that holds the PKI PEM definitions. More...
struct | coap_pki_key_pem_buf_t
| The structure that holds the PKI PEM buffer definitions. More...
struct | coap_pki_key_asn1_t
| The structure that holds the PKI ASN.1 (DER) definitions. More...
struct | coap_pki_key_pkcs11_t
| The structure that holds the PKI PKCS11 definitions. More...
struct | coap_dtls_key_t
| The structure that holds the PKI key information. More...
struct | coap_dtls_pki_t
| The structure used for defining the PKI setup data to be used. More...
struct | coap_dtls_cpsk_info_t
| The structure that holds the Client PSK information. More...
struct | coap_dtls_cpsk_t
| The structure used for defining the Client PSK setup data to be used. More...
struct | coap_dtls_spsk_info_t
| The structure that holds the Server Pre-Shared Key and Identity Hint information. More...
struct | coap_dtls_spsk_t
| The structure used for defining the Server PSK setup data to be used. More...

## Macros
#define | COAP_DTLS_HINT_LENGTH 128
#define | COAP_DTLS_MAX_PSK_IDENTITY 64
#define | COAP_DTLS_MAX_PSK 64
#define | COAP_DTLS_RPK_CERT_CN "RPK"
#define | COAP_DTLS_PKI_SETUP_VERSION 1
| Latest PKI setup version. More...
#define | COAP_DTLS_CPSK_SETUP_VERSION 1
| Latest CPSK setup version. More...
#define | COAP_DTLS_SPSK_SETUP_VERSION 1
| Latest SPSK setup version. More...

## Typedefs
typedef struct coap_dtls_pki_t | coap_dtls_pki_t
typedef enum coap_dtls_role_t | coap_dtls_role_t
typedef enum coap_tls_library_t | coap_tls_library_t
typedef struct coap_tls_version_t | coap_tls_version_t
| The structure used for returning the underlying (D)TLS library information. More...
typedef int(* | coap_dtls_security_setup_t) (void *tls_session, coap_dtls_pki_t *setup_data)
| Additional Security setup handler that can be set up by coap_context_set_pki(). More...
typedef int(* | coap_dtls_cn_callback_t) (const char *cn, const uint8_t *asn1_public_cert, size_t asn1_length, coap_session_t *coap_session, unsigned int depth, int validated, void *arg)
| CN Validation callback that can be set up by coap_context_set_pki(). More...
typedef enum coap_asn1_privatekey_type_t | coap_asn1_privatekey_type_t
| The enum used for determining the provided PKI ASN.1 (DER) Private Key formats. More...
typedef enum coap_pki_key_t | coap_pki_key_t
| The enum used for determining the PKI key formats. More...
typedef struct coap_pki_key_pem_t | coap_pki_key_pem_t
| The structure that holds the PKI PEM definitions. More...
typedef struct coap_pki_key_pem_buf_t | coap_pki_key_pem_buf_t
| The structure that holds the PKI PEM buffer definitions. More...
typedef struct coap_pki_key_asn1_t | coap_pki_key_asn1_t
| The structure that holds the PKI ASN.1 (DER) definitions. More...
typedef struct coap_pki_key_pkcs11_t | coap_pki_key_pkcs11_t
| The structure that holds the PKI PKCS11 definitions. More...
typedef struct coap_dtls_key_t | coap_dtls_key_t
| The structure that holds the PKI key information. More...
typedef coap_dtls_key_t *(* | coap_dtls_pki_sni_callback_t) (const char *sni, void *arg)
| Server Name Indication (SNI) Validation callback that can be set up by coap_context_set_pki(). More...
typedef struct coap_dtls_cpsk_info_t | coap_dtls_cpsk_info_t
| The structure that holds the Client PSK information. More...
typedef const coap_dtls_cpsk_info_t *(* | coap_dtls_ih_callback_t) (coap_str_const_t *hint, coap_session_t *coap_session, void *arg)
| Identity Hint Validation callback that can be set up by coap_new_client_session_psk2(). More...
typedef struct coap_dtls_cpsk_t | coap_dtls_cpsk_t
| The structure used for defining the Client PSK setup data to be used. More...
typedef struct coap_dtls_spsk_info_t | coap_dtls_spsk_info_t
| The structure that holds the Server Pre-Shared Key and Identity Hint information. More...
typedef const coap_bin_const_t *(* | coap_dtls_id_callback_t) (coap_bin_const_t *identity, coap_session_t *coap_session, void *arg)
| Identity Validation callback that can be set up by coap_context_set_psk2(). More...
typedef const coap_dtls_spsk_info_t *(* | coap_dtls_psk_sni_callback_t) (const char *sni, coap_session_t *coap_session, void *arg)
| PSK SNI callback that can be set up by coap_context_set_psk2(). More...
typedef struct coap_dtls_spsk_t | coap_dtls_spsk_t
| The structure used for defining the Server PSK setup data to be used. More...

## Enumerations
enum | coap_dtls_role_t { COAP_DTLS_ROLE_CLIENT , COAP_DTLS_ROLE_SERVER }
enum | coap_tls_library_t { COAP_TLS_LIBRARY_NOTLS = 0 , COAP_TLS_LIBRARY_TINYDTLS , COAP_TLS_LIBRARY_OPENSSL , COAP_TLS_LIBRARY_GNUTLS , COAP_TLS_LIBRARY_MBEDTLS }
enum | coap_asn1_privatekey_type_t { COAP_ASN1_PKEY_NONE , COAP_ASN1_PKEY_RSA , COAP_ASN1_PKEY_RSA2 , COAP_ASN1_PKEY_DSA , COAP_ASN1_PKEY_DSA1 , COAP_ASN1_PKEY_DSA2 , COAP_ASN1_PKEY_DSA3 , COAP_ASN1_PKEY_DSA4 , COAP_ASN1_PKEY_DH , COAP_ASN1_PKEY_DHX , COAP_ASN1_PKEY_EC , COAP_ASN1_PKEY_HMAC , COAP_ASN1_PKEY_CMAC , COAP_ASN1_PKEY_TLS1_PRF , COAP_ASN1_PKEY_HKDF }
| The enum used for determining the provided PKI ASN.1 (DER) Private Key formats. More...
enum | coap_pki_key_t { COAP_PKI_KEY_PEM = 0 , COAP_PKI_KEY_ASN1 , COAP_PKI_KEY_PEM_BUF , COAP_PKI_KEY_PKCS11 }
| The enum used for determining the PKI key formats. More...

## Functions
int | coap_dtls_is_supported (void)
| Check whether DTLS is available. More...
int | coap_tls_is_supported (void)
| Check whether TLS is available. More...
int | coap_dtls_psk_is_supported (void)
| Check whether (D)TLS PSK is available. More...
int | coap_dtls_pki_is_supported (void)
| Check whether (D)TLS PKI is available. More...
int | coap_dtls_pkcs11_is_supported (void)
| Check whether (D)TLS PKCS11 is available. More...
int | coap_dtls_rpk_is_supported (void)
| Check whether (D)TLS RPK is available. More...
coap_tls_version_t * | coap_get_tls_library_version (void)
| Determine the type and version of the underlying (D)TLS library. More...

## Detailed Description

CoAP DTLS support.

Definition in file coap_dtls.h.