#include "liblwm2m.h"
Go to the source code of this file.
|
lwm2m_object_t * | get_security_object (int serverId, const char *serverUri, char *bsPskId, char *psk, uint16_t pskLen, bool isBootstrap) |
| Create the security object and return a pointer to it. More...
|
|
void | clean_security_object (lwm2m_object_t *objectP) |
| Free and clean up the security object. More...
|
|
const char * | security_get_server_uri (lwm2m_object_t *objectP, uint16_t secObjInstID) |
| Get the server URI from security object. More...
|
|
int32_t | security_get_mode (lwm2m_object_t *objectP, uint16_t secObjInstID) |
| Get the security mode from security object. More...
|
|
const char * | security_get_public_id (lwm2m_object_t *objectP, uint16_t secObjInstID, size_t *idLen) |
| Get the public id from security object. More...
|
|
const char * | security_get_secret_key (lwm2m_object_t *objectP, uint16_t secObjInstID, size_t *keyLen) |
| Get the secret key from security object. More...
|
|
void | security_display_object (lwm2m_object_t *objectP) |
| Print the security object to output, for debugging. More...
|
|
void | security_copy_object (lwm2m_object_t *objectDest, lwm2m_object_t *objectSrc) |
| Create a copy of the security object source into the destination, with freshly allocated internal data. More...
|
|
◆ clean_security_object()
void clean_security_object |
( |
lwm2m_object_t * |
objectP | ) |
|
Free and clean up the security object.
- Parameters
-
objectP | Pointer to security object |
◆ get_security_object()
lwm2m_object_t* get_security_object |
( |
int |
serverId, |
|
|
const char * |
serverUri, |
|
|
char * |
bsPskId, |
|
|
char * |
psk, |
|
|
uint16_t |
pskLen, |
|
|
bool |
isBootstrap |
|
) |
| |
Create the security object and return a pointer to it.
- Parameters
-
serverId | Unique server ID |
serverUri | URI of the server |
bsPskId | ID of the psk |
psk | Pre shared Key |
pskLen | Length of preshared key |
isBootstrap | true if bootstrapping |
- Returns
- Pointer to created security object, or NULL if error
◆ security_copy_object()
void security_copy_object |
( |
lwm2m_object_t * |
objectDest, |
|
|
lwm2m_object_t * |
objectSrc |
|
) |
| |
Create a copy of the security object source into the destination, with freshly allocated internal data.
- Parameters
-
objectDest | Pointer to the object to write to. |
objectSrc | Pointer to the object to copy from. |
◆ security_display_object()
void security_display_object |
( |
lwm2m_object_t * |
objectP | ) |
|
Print the security object to output, for debugging.
- Parameters
-
objectP | Pointer to security object |
◆ security_get_mode()
int32_t security_get_mode |
( |
lwm2m_object_t * |
objectP, |
|
|
uint16_t |
secObjInstID |
|
) |
| |
Get the security mode from security object.
- Parameters
-
objectP | Pointer to security object |
secObjInstID | Security object ID |
- Returns
- Security mode identifier, or -1 on failure (See LWM2M_SECURITY_MODE_* definitions)
◆ security_get_public_id()
const char* security_get_public_id |
( |
lwm2m_object_t * |
objectP, |
|
|
uint16_t |
secObjInstID, |
|
|
size_t * |
idLen |
|
) |
| |
Get the public id from security object.
- Parameters
-
| objectP | Pointer to security object |
| secObjInstID | Security object ID |
[out] | idLen | Pointer to output the length of the id to. |
- Returns
- const secret key pointer, with length stored in *keyLen
◆ security_get_secret_key()
const char* security_get_secret_key |
( |
lwm2m_object_t * |
objectP, |
|
|
uint16_t |
secObjInstID, |
|
|
size_t * |
keyLen |
|
) |
| |
Get the secret key from security object.
- Parameters
-
| objectP | Pointer to security object |
| secObjInstID | Security object ID |
[out] | keyLen | Pointer to output the length of the key to. |
- Returns
- const secret key pointer, with length stored in *keyLen
◆ security_get_server_uri()
const char* security_get_server_uri |
( |
lwm2m_object_t * |
objectP, |
|
|
uint16_t |
secObjInstID |
|
) |
| |
Get the server URI from security object.
- Parameters
-
objectP | Pointer to security object |
secObjInstID | Security object ID |
- Returns
- pointer reference to server URI which must not be modified