Function anj_security_get_cert_info

Function Documentation

int anj_security_get_cert_info(const anj_t *anj, bool bootstrap_credentials, anj_net_certificate_info_t *out_cert_info)

Retrieves certificate-based security information for the specified connection.

This function may be used both internally by the library and by user code that needs access to credentials associated with the Security Object, for example to configure transport security for firmware download.

Credential data is provided by callbacks registered using anj_security_register_credential_handlers.

Note

Anjay Lite supports only one non-Bootstrap Server LwM2M Server.

Parameters:
  • anj – Anjay object.

  • bootstrap_credentials – If true, retrieves credentials for the Bootstrap Server, otherwise for the regular LwM2M Server.

  • out_cert_info[out] Output parameter for certificate-based security information.

Returns:

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