Function anj_dm_security_obj_get_psk
Defined in File security_object.h
Function Documentation
-
int anj_dm_security_obj_get_psk(const anj_t *anj, bool bootstrap_credentials, anj_crypto_security_info_t *out_psk_identity, anj_crypto_security_info_t *out_psk_key)
Retrieves the Pre-Shared Key (PSK) identity and key for the specified connection.
Note
Anjay Lite supports only one non-Bootstrap Server LwM2M Server.
- Parameters:
anj – Anjay object to take the Security Object from.
bootstrap_credentials – If true, retrieves credentials for the Bootstrap Server, otherwise for the regular LwM2M Server.
out_psk_identity – [out] Output parameter for the PSK identity.
out_psk_key – [out] Output parameter for the PSK key.
- Returns:
0 in case of success, ANJ_DM_ERR_NOT_FOUND if instance not found.