|
anjay
|
Go to the source code of this file.
Data Structures | |
| struct | anjay_oscore_instance_t |
Functions | |
| int | anjay_oscore_add_instance (anjay_t *anjay, const anjay_oscore_instance_t *instance, anjay_iid_t *inout_iid) |
| void | anjay_oscore_object_purge (anjay_t *anjay) |
| avs_error_t | anjay_oscore_object_persist (anjay_t *anjay, avs_stream_t *out_stream) |
| avs_error_t | anjay_oscore_object_restore (anjay_t *anjay, avs_stream_t *in_stream) |
| bool | anjay_oscore_object_is_modified (anjay_t *anjay) |
| int | anjay_oscore_object_install (anjay_t *anjay) |
| int anjay_oscore_add_instance | ( | anjay_t * | anjay, |
| const anjay_oscore_instance_t * | instance, | ||
| anjay_iid_t * | inout_iid | ||
| ) |
Adds new Instance of OSCORE Object and returns newly created Instance ID, via inout_iid .
NOTE: if inout_iid is set to ANJAY_ID_INVALID then the Instance id is generated automatically, otherwise value of inout_iid is used as a new OSCORE Instance ID.
NOTE: info may be safely freed by the user code after this function finishes (internally a deep copy of anjay_oscore_instance_t is performed).
WARNING: calling this function during active communication with Bootstrap Server may yield undefined behavior and unexpected failures may occur.
IMPORTANT: The AEAD Algorithm used is AES-CCM-16-64-128. IMPORTANT: The HMAC Algorithm used is HKDF SHA-256.
| anjay | Anjay instance with OSCORE Object installed to operate on. |
| instance | Structure containing information required to instantiate OSCORE Instance. |
| inout_iid | OSCORE Instance ID to use or ANJAY_ID_INVALID . |
| int anjay_oscore_object_install | ( | anjay_t * | anjay | ) |
Installs the OSCORE Object in Anjay.
The OSCORE module does not require explicit cleanup; all resources will be automatically freed up during the call to anjay_delete.
| anjay | Anjay instance for which the OSCORE Object is installed. |
| bool anjay_oscore_object_is_modified | ( | anjay_t * | anjay | ) |
Checks whether the OSCORE Object in Anjay instance has been modified since last successful call to anjay_oscore_object_persist or anjay_oscore_object_restore.
| avs_error_t anjay_oscore_object_persist | ( | anjay_t * | anjay, |
| avs_stream_t * | out_stream | ||
| ) |
Dumps OSCORE Object Instances to the out_stream.
| anjay | Anjay instance with OSCORE Object installed. |
| out_stream | Stream to write to. |
| void anjay_oscore_object_purge | ( | anjay_t * | anjay | ) |
Purges instances of OSCORE Object, leaving it in an empty state.
| anjay | Anjay instance with OSCORE Object installed. |
| avs_error_t anjay_oscore_object_restore | ( | anjay_t * | anjay, |
| avs_stream_t * | in_stream | ||
| ) |
Attempts to restore OSCORE Object Instances from specified in_stream.
Note: if restore fails, then OSCORE Object will be left untouched, on success though all Instances stored within the Object will be purged.
| anjay | Anjay instance with OSCORE Object installed. |
| in_stream | Stream to read from. |