Function anjay_ret_private_key_info

Function Documentation

int anjay_ret_private_key_info(anjay_output_ctx_t *ctx, avs_crypto_private_key_info_t private_key_info)

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

NOTE: This function is ONLY intended to be used when handling the “Secret Key” 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 client certificate 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.

  • private_key_info – Private 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.