158#ifndef OBJECTS_SECURITY_H
159#define OBJECTS_SECURITY_H
184#define LWM2M_SECURITY_MODE_PRE_SHARED_KEY 0
189#define LWM2M_SECURITY_MODE_RAW_PUBLIC_KEY 1
194#define LWM2M_SECURITY_MODE_CERTIFICATE 2
199#define LWM2M_SECURITY_MODE_NONE 3
209#define LWM2M_SECURITY_URI_ID 0
214#define LWM2M_SECURITY_BOOTSTRAP_ID 1
219#define LWM2M_SECURITY_SECURITY_ID 2
224#define LWM2M_SECURITY_PUBLIC_KEY_ID 3
229#define LWM2M_SECURITY_SERVER_PUBLIC_KEY_ID 4
234#define LWM2M_SECURITY_SECRET_KEY_ID 5
239#define LWM2M_SECURITY_SMS_SECURITY_ID 6
244#define LWM2M_SECURITY_SMS_KEY_PARAM_ID 7
249#define LWM2M_SECURITY_SMS_SECRET_KEY_ID 8
254#define LWM2M_SECURITY_SMS_SERVER_NUMBER_ID 9
259#define LWM2M_SECURITY_SHORT_SERVER_ID 10
264#define LWM2M_SECURITY_HOLD_OFF_ID 11
269#define LWM2M_SECURITY_BOOTSTRAP_TIMEOUT_ID 12
281#ifndef CONFIG_LWM2M_OBJ_SECURITY_INSTANCES_MAX
282#define CONFIG_LWM2M_OBJ_SECURITY_INSTANCES_MAX (2)
288#ifndef CONFIG_LWM2M_OBJ_SECURITY_PUB_KEY_ID_BUFSIZE
289#define CONFIG_LWM2M_OBJ_SECURITY_PUB_KEY_ID_BUFSIZE (128)
295#ifndef CONFIG_LWM2M_OBJ_SECURITY_SERVER_PUB_KEY_BUFSIZE
296#define CONFIG_LWM2M_OBJ_SECURITY_SERVER_PUB_KEY_BUFSIZE (128)
302#ifndef CONFIG_LWM2M_OBJ_SECURITY_SEC_KEY_BUFSIZE
303#define CONFIG_LWM2M_OBJ_SECURITY_SEC_KEY_BUFSIZE (64)
416 int32_t instance_id);
POSIX.1-2008 compliant version of the assert macro.
(D)TLS credentials management module definitions
credman_tag_t lwm2m_object_security_get_credential(uint16_t instance_id)
Get the credential of a given instance of the security object.
lwm2m_object_t * lwm2m_object_security_init(lwm2m_client_data_t *client_data)
Initialize the Security object.
struct lwm2m_obj_security_args lwm2m_obj_security_args_t
Arguments for a new Security object instance creation (lwm2m_object_security_instance_create).
int lwm2m_object_security_instance_create(const lwm2m_obj_security_args_t *args, int32_t instance_id)
Create a new Security instance and add it to the object list.
uint16_t credman_tag_t
Tag of the credential.
Definitions and public API for a LwM2M client using Wakaama.
LwM2M client configurations.
stdio wrapper to extend the C libs stdio
Arguments for a new Security object instance creation (lwm2m_object_security_instance_create).
const uint8_t * pub_key_or_id
Pointer to the Key ID when using LWM2M_SECURITY_MODE_PRE_SHARED_KEY.
uint16_t server_id
Server's short ID the instance is associated to.
const uint8_t * server_pub_key
Pointer to the server public key encoded as a SubjectPublicKeyInfo sequence when using LWM2M_SECURITY...
size_t secret_key_len
Length of lwm2m_obj_security_args_t::secret_key.
const char * server_uri
Server's URI the instance is associated to.
bool is_bootstrap
When true the security instance is associated to the Bootstrap-Server.
uint8_t security_mode
Security mode to use.
size_t pub_key_or_id_len
Length of lwm2m_obj_security_args_t::pub_key_or_id.
const uint8_t * secret_key
Pointer to the Key when using LWM2M_SECURITY_MODE_PRE_SHARED_KEY.
uint32_t client_hold_off_time
Time, in seconds, to wait before initiating a 'Client Initiated Bootstrap', after it has been determi...
uint32_t bootstrap_account_timeout
Time, in seconds, that the client waits before it purges the Bootstrap-Server's account.
size_t server_pub_key_len
Length of lwm2m_obj_security_args_t::server_pub_key.