Definition in file security.h.
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <assert.h>#include "liblwm2m.h"#include "net/credman.h"#include "lwm2m_client.h"#include "lwm2m_client_config.h"
Include dependency graph for security.h:Go to the source code of this file.
Data Structures | |
| struct | lwm2m_obj_security_args |
| Arguments for a new Security object instance creation (lwm2m_object_security_instance_create). More... | |
Macros | |
| #define | CONFIG_LWM2M_OBJ_SECURITY_INSTANCES_MAX (2) |
| Maximum number of instances of the Security object. | |
| #define | CONFIG_LWM2M_OBJ_SECURITY_PUB_KEY_ID_BUFSIZE (128) |
| Buffer size of the public key or ID resource. | |
| #define | CONFIG_LWM2M_OBJ_SECURITY_SERVER_PUB_KEY_BUFSIZE (128) |
| Buffer size of the server public key resource. | |
| #define | CONFIG_LWM2M_OBJ_SECURITY_SEC_KEY_BUFSIZE (64) |
| Buffer size of the secret key resource. | |
Typedefs | |
| typedef struct lwm2m_obj_security_args | lwm2m_obj_security_args_t |
| Arguments for a new Security object instance creation (lwm2m_object_security_instance_create). | |
Functions | |
| lwm2m_object_t * | lwm2m_object_security_init (lwm2m_client_data_t *client_data) |
| Initialize the Security object. More... | |
| 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. More... | |
| credman_tag_t | lwm2m_object_security_get_credential (uint16_t instance_id) |
| Get the credential of a given instance of the security object. More... | |
LwM2M Security object security modes | |
| #define | LWM2M_SECURITY_MODE_PRE_SHARED_KEY 0 |
| Pre-Shared keys mode. | |
| #define | LWM2M_SECURITY_MODE_RAW_PUBLIC_KEY 1 |
| Raw public keys mode. | |
| #define | LWM2M_SECURITY_MODE_CERTIFICATE 2 |
| Certificate mode. | |
| #define | LWM2M_SECURITY_MODE_NONE 3 |
| No security mode. | |
Resource IDs for the LWM2M Security Object | |
| #define | LWM2M_SECURITY_URI_ID 0 |
| Server URI. | |
| #define | LWM2M_SECURITY_BOOTSTRAP_ID 1 |
| Bootstrap server. | |
| #define | LWM2M_SECURITY_SECURITY_ID 2 |
| Security mode. | |
| #define | LWM2M_SECURITY_PUBLIC_KEY_ID 3 |
| Public key or ID. | |
| #define | LWM2M_SECURITY_SERVER_PUBLIC_KEY_ID 4 |
| Server public key. | |
| #define | LWM2M_SECURITY_SECRET_KEY_ID 5 |
| Secret key. | |
| #define | LWM2M_SECURITY_SMS_SECURITY_ID 6 |
| SMS security mode. | |
| #define | LWM2M_SECURITY_SMS_KEY_PARAM_ID 7 |
| SMS binding key parameters. | |
| #define | LWM2M_SECURITY_SMS_SECRET_KEY_ID 8 |
| SMS binding secret keys. | |
| #define | LWM2M_SECURITY_SMS_SERVER_NUMBER_ID 9 |
| Server SMS number. | |
| #define | LWM2M_SECURITY_SHORT_SERVER_ID 10 |
| Short server ID. | |
| #define | LWM2M_SECURITY_HOLD_OFF_ID 11 |
| Client hold-off time. | |
| #define | LWM2M_SECURITY_BOOTSTRAP_TIMEOUT_ID 12 |
| Bootstrap server account timeout. | |