Function anjay_security_mark_hsm_permanent
Defined in File security.h
Function Documentation
-
void anjay_security_mark_hsm_permanent(anjay_t *anjay, anjay_ssid_t ssid)
Marks security credential for a given Server Account as “permanent”, preventing them from being removed from the hardware security module.
The credentials that are moved into hardware security module according to the logic described for anjay_security_object_install_with_hsm are, by default, automatically removed whenever they are deleted from the data model (e.g. by the Bootstrap Server or using anjay_security_object_purge).
This function causes such credentials to be marked as “permanent”, equivalent to credentials provisioned using the
avs_crypto_*_from_engineAPIs passed into the fields of the anjay_security_instance_t structure. This will prevent them from being automatically erased from the hardware even if they are removed from the data model, or if the object is cleaned up without up-to-date persistence status.- Parameters:
anjay – Anjay instance with Security Object installed to operate on.
ssid – Short Server ID of the Server Account whose credentials to mark as permanent. ANJAY_SSID_BOOTSTRAP may be used to refer to the Bootstrap Server (if present), and ANJAY_SSID_ANY may be used to mark all the Server Account credentials as permanent.