Typedef anjay_security_hsm_query_cb_t
Defined in File security.h
Typedef Documentation
-
typedef const char *anjay_security_hsm_query_cb_t(anjay_iid_t iid, anjay_ssid_t ssid, const void *data, size_t data_size, void *arg)
Type for a callback function that will be called by the Security object implementation whenever a query string for storing a new security credential (provisioned by means other than EST) in external security engine is necessary. See also the fields of the anjay_security_hsm_configuration_t structure.
- Attention
The
dataanddata_sizeare provided only as a hint for users who want the query strings to depend on the credential contents in any way. This callback shall not attempt to store the certificate itself. This will be performed by Anjay afterwards.
- Param iid:
ID of the Security object Instance for which the credential is to be stored.
- Param ssid:
Short Server ID of the server account for which the credential is to be stored (ANJAY_SSID_BOOTSTRAP in case of the Bootstrap Server).
- Param data:
Pointer to a buffer containing the credential that will be stored.
- Param data_size:
Size in bytes of the data located at
data.- Param arg:
Opaque argument configured through a corresponding
*_argfield of anjay_security_hsm_configuration_t.- Return:
String that will be used as a query string for the provisioned security credential. The string will be copied shortly after this function returns, so it is safe to deallocate or overwrite it when control is returned to user code, or during the next call to this function, whichever happens first. Anjay will never attempt to modify or deallocate the returned value.