Function anjay_ret_psk_key_info

Function Documentation

int anjay_ret_psk_key_info(anjay_output_ctx_t *ctx, avs_crypto_psk_key_info_t psk_key_info)

Returns information about a PSK key from the data model handler.

NOTE: This function is ONLY intended to be used when handling the “Secret Key” or “SMS Binding Secret Key(s)” resource in custom implementations of the LwM2M Security object (i.e., when not using anjay_security_object_install). In this context, it may be used to pass key configuration that is not representable through standard LwM2M format. In all other cases, anjay_ret_bytes family of functions SHOULD be used.

Parameters:
  • ctx – Output context to operate on.

  • psk_key_info – PSK key information to return. A deep copy will immediately be created, so it is safe to invalidate any referenced buffers just after this call.

Returns:

0 on success, a negative value in case of error.