Loading...
Searching...
No Matches
coap_dtls.h
Go to the documentation of this file.
/*
* coap_dtls.h -- (Datagram) Transport Layer Support for libcoap
*
* Copyright (C) 2016 Olaf Bergmann <bergmann@tzi.org>
* Copyright (C) 2017 Jean-Claude Michelou <jcm@spinetix.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*
* This file is part of the CoAP library libcoap. Please see README for terms
* of use.
*/
#ifndef COAP_DTLS_H_
#define COAP_DTLS_H_
#include "coap_time.h"
#include "coap_str.h"
typedef struct coap_dtls_pki_t coap_dtls_pki_t;
#ifndef COAP_DTLS_HINT_LENGTH
#define COAP_DTLS_HINT_LENGTH 128
#endif
#ifndef COAP_DTLS_MAX_PSK_IDENTITY
#define COAP_DTLS_MAX_PSK_IDENTITY 64
#endif
#ifndef COAP_DTLS_MAX_PSK
#define COAP_DTLS_MAX_PSK 64
#endif
typedef enum coap_dtls_role_t {
COAP_DTLS_ROLE_CLIENT,
COAP_DTLS_ROLE_SERVER
} coap_dtls_role_t;
#define COAP_DTLS_RPK_CERT_CN "RPK"
int coap_dtls_is_supported(void);
int coap_tls_is_supported(void);
int coap_dtls_psk_is_supported(void);
int coap_dtls_pki_is_supported(void);
int coap_dtls_pkcs11_is_supported(void);
int coap_dtls_rpk_is_supported(void);
typedef 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,
} coap_tls_library_t;
typedef struct coap_tls_version_t {
uint64_t version;
coap_tls_library_t type;
uint64_t built_version;
} coap_tls_version_t;
coap_tls_version_t *coap_get_tls_library_version(void);
typedef int (*coap_dtls_security_setup_t)(void *tls_session,
coap_dtls_pki_t *setup_data);
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);
typedef 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
} coap_asn1_privatekey_type_t;
typedef enum coap_pki_key_t {
COAP_PKI_KEY_PEM = 0,
COAP_PKI_KEY_ASN1,
COAP_PKI_KEY_PEM_BUF,
COAP_PKI_KEY_PKCS11,
} coap_pki_key_t;
typedef struct coap_pki_key_pem_t {
const char *ca_file;
const char *public_cert;
const char *private_key;
} coap_pki_key_pem_t;
typedef struct coap_pki_key_pem_buf_t {
const uint8_t *ca_cert;
const uint8_t *public_cert;
const uint8_t *private_key;
size_t ca_cert_len;
size_t public_cert_len;
size_t private_key_len;
} coap_pki_key_pem_buf_t;
typedef struct coap_pki_key_asn1_t {
const uint8_t *ca_cert;
const uint8_t *public_cert;
const uint8_t *private_key;
size_t ca_cert_len;
size_t public_cert_len;
size_t private_key_len;
coap_asn1_privatekey_type_t private_key_type;
} coap_pki_key_asn1_t;
typedef struct coap_pki_key_pkcs11_t {
const char *ca;
const char *public_cert;
const char *private_key;
const char *user_pin;
} coap_pki_key_pkcs11_t;
typedef struct coap_dtls_key_t {
coap_pki_key_t key_type;
union {
coap_pki_key_pem_t pem;
coap_pki_key_pem_buf_t pem_buf;
coap_pki_key_asn1_t asn1;
coap_pki_key_pkcs11_t pkcs11;
} key;
} coap_dtls_key_t;
typedef coap_dtls_key_t *(*coap_dtls_pki_sni_callback_t)(const char *sni,
void *arg);
#define COAP_DTLS_PKI_SETUP_VERSION 1
struct coap_dtls_pki_t {
uint8_t version;
/* Options to enable different TLS functionality in libcoap */
uint8_t verify_peer_cert;
uint8_t check_common_ca;
uint8_t allow_self_signed;
uint8_t allow_expired_certs;
uint8_t cert_chain_validation;
uint8_t cert_chain_verify_depth;
uint8_t check_cert_revocation;
uint8_t allow_no_crl;
uint8_t allow_expired_crl;
uint8_t allow_bad_md_hash;
uint8_t allow_short_rsa_length;
uint8_t is_rpk_not_cert;
uint8_t reserved[3];
/* Size of 3 chosen to align to next
* parameter, so if newly defined option
* it can use one of the reserved slots so
* no need to change
* COAP_DTLS_PKI_SETUP_VERSION and just
* decrement the reserved[] count.
*/
coap_dtls_cn_callback_t validate_cn_call_back;
void *cn_call_back_arg;
coap_dtls_pki_sni_callback_t validate_sni_call_back;
void *sni_call_back_arg;
coap_dtls_security_setup_t additional_tls_setup_call_back;
char *client_sni;
coap_dtls_key_t pki_key;
};
typedef struct coap_dtls_cpsk_info_t {
coap_bin_const_t identity;
coap_bin_const_t key;
} coap_dtls_cpsk_info_t;
typedef const coap_dtls_cpsk_info_t *(*coap_dtls_ih_callback_t)(
coap_str_const_t *hint,
coap_session_t *coap_session,
void *arg);
#define COAP_DTLS_CPSK_SETUP_VERSION 1
typedef struct coap_dtls_cpsk_t {
uint8_t version;
/* Options to enable different TLS functionality in libcoap */
uint8_t reserved[7];
/* Size of 7 chosen to align to next
* parameter, so if newly defined option
* it can use one of the reserverd slot so
* no need to change
* COAP_DTLS_CPSK_SETUP_VERSION and just
* decrement the reserved[] count.
*/
coap_dtls_ih_callback_t validate_ih_call_back;
void *ih_call_back_arg;
char *client_sni;
coap_dtls_cpsk_info_t psk_info;
} coap_dtls_cpsk_t;
typedef struct coap_dtls_spsk_info_t {
coap_bin_const_t hint;
coap_bin_const_t key;
} coap_dtls_spsk_info_t;
typedef const coap_bin_const_t *(*coap_dtls_id_callback_t)(
coap_bin_const_t *identity,
coap_session_t *coap_session,
void *arg);
typedef const coap_dtls_spsk_info_t *(*coap_dtls_psk_sni_callback_t)(
const char *sni,
coap_session_t *coap_session,
void *arg);
#define COAP_DTLS_SPSK_SETUP_VERSION 1
typedef struct coap_dtls_spsk_t {
uint8_t version;
/* Options to enable different TLS functionality in libcoap */
uint8_t reserved[7];
/* Size of 7 chosen to align to next
* parameter, so if newly defined option
* it can use one of the reserverd slot so
* no need to change
* COAP_DTLS_SPSK_SETUP_VERSION and just
* decrement the reserved[] count.
*/
coap_dtls_id_callback_t validate_id_call_back;
void *id_call_back_arg;
coap_dtls_psk_sni_callback_t validate_sni_call_back;
void *sni_call_back_arg;
coap_dtls_spsk_info_t psk_info;
} coap_dtls_spsk_t;
#endif /* COAP_DTLS_H */
coap_str.h
Strings to be used in the CoAP library.
coap_time.h
Clock Handling.
coap_dtls_id_callback_t
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().
Definition coap_dtls.h:437
coap_get_tls_library_version
coap_tls_version_t * coap_get_tls_library_version(void)
Determine the type and version of the underlying (D)TLS library.
Definition coap_notls.c:69
coap_dtls_psk_is_supported
int coap_dtls_psk_is_supported(void)
Check whether (D)TLS PSK is available.
Definition coap_notls.c:37
coap_dtls_role_t
coap_dtls_role_t
Definition coap_dtls.h:43
coap_tls_is_supported
int coap_tls_is_supported(void)
Check whether TLS is available.
Definition coap_notls.c:28
coap_pki_key_t
coap_pki_key_t
The enum used for determining the PKI key formats.
Definition coap_dtls.h:188
coap_dtls_ih_callback_t
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().
Definition coap_dtls.h:368
coap_dtls_is_supported
int coap_dtls_is_supported(void)
Check whether DTLS is available.
Definition coap_notls.c:23
coap_asn1_privatekey_type_t
coap_asn1_privatekey_type_t
The enum used for determining the provided PKI ASN.1 (DER) Private Key formats.
Definition coap_dtls.h:167
coap_dtls_pki_is_supported
int coap_dtls_pki_is_supported(void)
Check whether (D)TLS PKI is available.
Definition coap_notls.c:46
coap_dtls_psk_sni_callback_t
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().
Definition coap_dtls.h:455
coap_dtls_rpk_is_supported
int coap_dtls_rpk_is_supported(void)
Check whether (D)TLS RPK is available.
Definition coap_notls.c:64
coap_tls_library_t
coap_tls_library_t
Definition coap_dtls.h:92
coap_dtls_cn_callback_t
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().
Definition coap_dtls.h:155
coap_dtls_pki_sni_callback_t
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().
Definition coap_dtls.h:275
coap_dtls_pkcs11_is_supported
int coap_dtls_pkcs11_is_supported(void)
Check whether (D)TLS PKCS11 is available.
Definition coap_notls.c:55
coap_dtls_security_setup_t
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().
Definition coap_dtls.h:132
COAP_DTLS_ROLE_SERVER
@ COAP_DTLS_ROLE_SERVER
Internal function invoked for server.
Definition coap_dtls.h:45
COAP_DTLS_ROLE_CLIENT
@ COAP_DTLS_ROLE_CLIENT
Internal function invoked for client.
Definition coap_dtls.h:44
COAP_PKI_KEY_PKCS11
@ COAP_PKI_KEY_PKCS11
The PKI key type is PKCS11 (DER)
Definition coap_dtls.h:192
COAP_PKI_KEY_PEM_BUF
@ COAP_PKI_KEY_PEM_BUF
The PKI key type is PEM buffer.
Definition coap_dtls.h:191
COAP_PKI_KEY_PEM
@ COAP_PKI_KEY_PEM
The PKI key type is PEM file.
Definition coap_dtls.h:189
COAP_PKI_KEY_ASN1
@ COAP_PKI_KEY_ASN1
The PKI key type is ASN.1 (DER) buffer.
Definition coap_dtls.h:190
COAP_ASN1_PKEY_DH
@ COAP_ASN1_PKEY_DH
DH type.
Definition coap_dtls.h:176
COAP_ASN1_PKEY_NONE
@ COAP_ASN1_PKEY_NONE
NONE.
Definition coap_dtls.h:168
COAP_ASN1_PKEY_TLS1_PRF
@ COAP_ASN1_PKEY_TLS1_PRF
TLS1_PRF type.
Definition coap_dtls.h:181
COAP_ASN1_PKEY_RSA2
@ COAP_ASN1_PKEY_RSA2
RSA2 type.
Definition coap_dtls.h:170
COAP_ASN1_PKEY_DSA
@ COAP_ASN1_PKEY_DSA
DSA type.
Definition coap_dtls.h:171
COAP_ASN1_PKEY_DHX
@ COAP_ASN1_PKEY_DHX
DHX type.
Definition coap_dtls.h:177
COAP_ASN1_PKEY_DSA4
@ COAP_ASN1_PKEY_DSA4
DSA4 type.
Definition coap_dtls.h:175
COAP_ASN1_PKEY_DSA2
@ COAP_ASN1_PKEY_DSA2
DSA2 type.
Definition coap_dtls.h:173
COAP_ASN1_PKEY_RSA
@ COAP_ASN1_PKEY_RSA
RSA type.
Definition coap_dtls.h:169
COAP_ASN1_PKEY_DSA1
@ COAP_ASN1_PKEY_DSA1
DSA1 type.
Definition coap_dtls.h:172
COAP_ASN1_PKEY_HKDF
@ COAP_ASN1_PKEY_HKDF
HKDF type.
Definition coap_dtls.h:182
COAP_ASN1_PKEY_EC
@ COAP_ASN1_PKEY_EC
EC type.
Definition coap_dtls.h:178
COAP_ASN1_PKEY_DSA3
@ COAP_ASN1_PKEY_DSA3
DSA3 type.
Definition coap_dtls.h:174
COAP_ASN1_PKEY_HMAC
@ COAP_ASN1_PKEY_HMAC
HMAC type.
Definition coap_dtls.h:179
COAP_ASN1_PKEY_CMAC
@ COAP_ASN1_PKEY_CMAC
CMAC type.
Definition coap_dtls.h:180
COAP_TLS_LIBRARY_GNUTLS
@ COAP_TLS_LIBRARY_GNUTLS
Using GnuTLS library.
Definition coap_dtls.h:96
COAP_TLS_LIBRARY_TINYDTLS
@ COAP_TLS_LIBRARY_TINYDTLS
Using TinyDTLS library.
Definition coap_dtls.h:94
COAP_TLS_LIBRARY_NOTLS
@ COAP_TLS_LIBRARY_NOTLS
No DTLS library.
Definition coap_dtls.h:93
COAP_TLS_LIBRARY_OPENSSL
@ COAP_TLS_LIBRARY_OPENSSL
Using OpenSSL library.
Definition coap_dtls.h:95
COAP_TLS_LIBRARY_MBEDTLS
@ COAP_TLS_LIBRARY_MBEDTLS
Using Mbed TLS library.
Definition coap_dtls.h:97
coap_bin_const_t
CoAP binary data definition with const data.
Definition coap_str.h:64
coap_dtls_cpsk_info_t
The structure that holds the Client PSK information.
Definition coap_dtls.h:347
coap_dtls_cpsk_info_t::key
coap_bin_const_t key
Definition coap_dtls.h:349
coap_dtls_cpsk_info_t::identity
coap_bin_const_t identity
Definition coap_dtls.h:348
coap_dtls_cpsk_t
The structure used for defining the Client PSK setup data to be used.
Definition coap_dtls.h:378
coap_dtls_cpsk_t::version
uint8_t version
Definition coap_dtls.h:379
coap_dtls_cpsk_t::ih_call_back_arg
void * ih_call_back_arg
Passed in to the Identity Hint callback function.
Definition coap_dtls.h:399
coap_dtls_cpsk_t::client_sni
char * client_sni
If not NULL, SNI to use in client TLS setup.
Definition coap_dtls.h:402
coap_dtls_cpsk_t::validate_ih_call_back
coap_dtls_ih_callback_t validate_ih_call_back
Identity Hint check callback function.
Definition coap_dtls.h:398
coap_dtls_cpsk_t::psk_info
coap_dtls_cpsk_info_t psk_info
Client PSK definition.
Definition coap_dtls.h:407
coap_dtls_cpsk_t::reserved
uint8_t reserved[7]
Set to COAP_DTLS_CPSK_SETUP_VERSION to support this version of the struct.
Definition coap_dtls.h:383
coap_dtls_key_t
The structure that holds the PKI key information.
Definition coap_dtls.h:252
coap_dtls_key_t::pem
coap_pki_key_pem_t pem
for PEM file keys
Definition coap_dtls.h:255
coap_dtls_key_t::pkcs11
coap_pki_key_pkcs11_t pkcs11
for PKCS11 keys
Definition coap_dtls.h:258
coap_dtls_key_t::key
union coap_dtls_key_t::@3 key
coap_dtls_key_t::pem_buf
coap_pki_key_pem_buf_t pem_buf
for PEM memory keys
Definition coap_dtls.h:256
coap_dtls_key_t::key_type
coap_pki_key_t key_type
key format type
Definition coap_dtls.h:253
coap_dtls_key_t::asn1
coap_pki_key_asn1_t asn1
for ASN.1 (DER) memory keys
Definition coap_dtls.h:257
coap_dtls_pki_t
The structure used for defining the PKI setup data to be used.
Definition coap_dtls.h:284
coap_dtls_pki_t::allow_no_crl
uint8_t allow_no_crl
1 ignore if CRL not there
Definition coap_dtls.h:298
coap_dtls_pki_t::cn_call_back_arg
void * cn_call_back_arg
Passed in to the CN callback function.
Definition coap_dtls.h:320
coap_dtls_pki_t::allow_short_rsa_length
uint8_t allow_short_rsa_length
1 if small RSA keysizes are allowed
Definition coap_dtls.h:301
coap_dtls_pki_t::cert_chain_validation
uint8_t cert_chain_validation
1 if to check cert_chain_verify_depth
Definition coap_dtls.h:295
coap_dtls_pki_t::allow_bad_md_hash
uint8_t allow_bad_md_hash
1 if unsupported MD hashes are allowed
Definition coap_dtls.h:300
coap_dtls_pki_t::version
uint8_t version
Definition coap_dtls.h:285
coap_dtls_pki_t::check_cert_revocation
uint8_t check_cert_revocation
1 if revocation checks wanted
Definition coap_dtls.h:297
coap_dtls_pki_t::validate_sni_call_back
coap_dtls_pki_sni_callback_t validate_sni_call_back
SNI check callback function.
Definition coap_dtls.h:327
coap_dtls_pki_t::cert_chain_verify_depth
uint8_t cert_chain_verify_depth
recommended depth is 3
Definition coap_dtls.h:296
coap_dtls_pki_t::reserved
uint8_t reserved[3]
Reserved - must be set to 0 for future compatibility.
Definition coap_dtls.h:305
coap_dtls_pki_t::additional_tls_setup_call_back
coap_dtls_security_setup_t additional_tls_setup_call_back
Additional Security callback handler that is invoked when libcoap has done the standard,...
Definition coap_dtls.h:335
coap_dtls_pki_t::allow_expired_certs
uint8_t allow_expired_certs
1 if expired certs are allowed
Definition coap_dtls.h:294
coap_dtls_pki_t::verify_peer_cert
uint8_t verify_peer_cert
Set to COAP_DTLS_PKI_SETUP_VERSION to support this version of the struct.
Definition coap_dtls.h:289
coap_dtls_pki_t::client_sni
char * client_sni
If not NULL, SNI to use in client TLS setup.
Definition coap_dtls.h:337
coap_dtls_pki_t::allow_self_signed
uint8_t allow_self_signed
1 if self-signed certs are allowed.
Definition coap_dtls.h:292
coap_dtls_pki_t::sni_call_back_arg
void * sni_call_back_arg
Passed in to the sni callback function.
Definition coap_dtls.h:328
coap_dtls_pki_t::validate_cn_call_back
coap_dtls_cn_callback_t validate_cn_call_back
CN check callback function.
Definition coap_dtls.h:319
coap_dtls_pki_t::allow_expired_crl
uint8_t allow_expired_crl
1 if expired crl is allowed
Definition coap_dtls.h:299
coap_dtls_pki_t::is_rpk_not_cert
uint8_t is_rpk_not_cert
1 is RPK instead of Public Certificate.
Definition coap_dtls.h:302
coap_dtls_pki_t::check_common_ca
uint8_t check_common_ca
1 if peer cert is to be signed by the same CA as the local cert
Definition coap_dtls.h:290
coap_dtls_pki_t::pki_key
coap_dtls_key_t pki_key
PKI key definition.
Definition coap_dtls.h:341
coap_dtls_spsk_info_t
The structure that holds the Server Pre-Shared Key and Identity Hint information.
Definition coap_dtls.h:414
coap_dtls_spsk_info_t::hint
coap_bin_const_t hint
Definition coap_dtls.h:415
coap_dtls_spsk_info_t::key
coap_bin_const_t key
Definition coap_dtls.h:416
coap_dtls_spsk_t
The structure used for defining the Server PSK setup data to be used.
Definition coap_dtls.h:465
coap_dtls_spsk_t::validate_sni_call_back
coap_dtls_psk_sni_callback_t validate_sni_call_back
SNI check callback function.
Definition coap_dtls.h:492
coap_dtls_spsk_t::validate_id_call_back
coap_dtls_id_callback_t validate_id_call_back
Identity check callback function.
Definition coap_dtls.h:484
coap_dtls_spsk_t::version
uint8_t version
Definition coap_dtls.h:466
coap_dtls_spsk_t::reserved
uint8_t reserved[7]
Set to COAP_DTLS_SPSK_SETUP_VERSION to support this version of the struct.
Definition coap_dtls.h:470
coap_dtls_spsk_t::id_call_back_arg
void * id_call_back_arg
Passed in to the Identity callback function.
Definition coap_dtls.h:485
coap_dtls_spsk_t::sni_call_back_arg
void * sni_call_back_arg
Passed in to the SNI callback function.
Definition coap_dtls.h:493
coap_dtls_spsk_t::psk_info
coap_dtls_spsk_info_t psk_info
Server PSK definition.
Definition coap_dtls.h:495
coap_pki_key_asn1_t
The structure that holds the PKI ASN.1 (DER) definitions.
Definition coap_dtls.h:227
coap_pki_key_asn1_t::private_key
const uint8_t * private_key
ASN1 (DER) Private Key.
Definition coap_dtls.h:230
coap_pki_key_asn1_t::private_key_type
coap_asn1_privatekey_type_t private_key_type
Private Key Type.
Definition coap_dtls.h:234
coap_pki_key_asn1_t::public_cert_len
size_t public_cert_len
ASN1 Public Cert length.
Definition coap_dtls.h:232
coap_pki_key_asn1_t::private_key_len
size_t private_key_len
ASN1 Private Key length.
Definition coap_dtls.h:233
coap_pki_key_asn1_t::ca_cert
const uint8_t * ca_cert
ASN1 (DER) Common CA Cert.
Definition coap_dtls.h:228
coap_pki_key_asn1_t::ca_cert_len
size_t ca_cert_len
ASN1 CA Cert length.
Definition coap_dtls.h:231
coap_pki_key_asn1_t::public_cert
const uint8_t * public_cert
ASN1 (DER) Public Cert, or Public Key if RPK.
Definition coap_dtls.h:229
coap_pki_key_pem_buf_t
The structure that holds the PKI PEM buffer definitions.
Definition coap_dtls.h:213
coap_pki_key_pem_buf_t::ca_cert_len
size_t ca_cert_len
PEM buffer CA Cert length.
Definition coap_dtls.h:219
coap_pki_key_pem_buf_t::ca_cert
const uint8_t * ca_cert
PEM buffer Common CA Cert.
Definition coap_dtls.h:214
coap_pki_key_pem_buf_t::private_key_len
size_t private_key_len
PEM buffer Private Key length.
Definition coap_dtls.h:221
coap_pki_key_pem_buf_t::private_key
const uint8_t * private_key
PEM buffer Private Key If RPK and 'EC PRIVATE KEY' this can be used for both the public_cert and priv...
Definition coap_dtls.h:216
coap_pki_key_pem_buf_t::public_cert_len
size_t public_cert_len
PEM buffer Public Cert length.
Definition coap_dtls.h:220
coap_pki_key_pem_buf_t::public_cert
const uint8_t * public_cert
PEM buffer Public Cert, or Public Key if RPK.
Definition coap_dtls.h:215
coap_pki_key_pem_t
The structure that holds the PKI PEM definitions.
Definition coap_dtls.h:198
coap_pki_key_pem_t::ca_file
const char * ca_file
File location of Common CA in PEM format.
Definition coap_dtls.h:199
coap_pki_key_pem_t::public_cert
const char * public_cert
File location of Public Cert.
Definition coap_dtls.h:200
coap_pki_key_pem_t::private_key
const char * private_key
File location of Private Key in PEM format.
Definition coap_dtls.h:201
coap_pki_key_pkcs11_t
The structure that holds the PKI PKCS11 definitions.
Definition coap_dtls.h:240
coap_pki_key_pkcs11_t::private_key
const char * private_key
pkcs11: URI for Private Key
Definition coap_dtls.h:243
coap_pki_key_pkcs11_t::ca
const char * ca
pkcs11: URI for Common CA Certificate
Definition coap_dtls.h:241
coap_pki_key_pkcs11_t::user_pin
const char * user_pin
User pin to access PKCS11.
Definition coap_dtls.h:244
coap_pki_key_pkcs11_t::public_cert
const char * public_cert
pkcs11: URI for Public Cert
Definition coap_dtls.h:242
coap_session_t
Abstraction of virtual session that can be attached to coap_context_t (client) or coap_endpoint_t (se...
Definition coap_session_internal.h:68
coap_str_const_t
CoAP string data definition with const data.
Definition coap_str.h:46
coap_tls_version_t
The structure used for returning the underlying (D)TLS library information.
Definition coap_dtls.h:104
coap_tls_version_t::built_version
uint64_t built_version
(D)TLS Built against Library Version
Definition coap_dtls.h:107
coap_tls_version_t::type
coap_tls_library_t type
Library type.
Definition coap_dtls.h:106
coap_tls_version_t::version
uint64_t version
(D)TLS runtime Library Version
Definition coap_dtls.h:105