mbedtls_asn1_store_named_data() function
Create or find a specific named_data entry for writing in a sequence or list based on the OID. If not already in there, a new entry is added to the head of the list. Warning: Destructive behaviour for the val data!
Arguments
list
The pointer to the location of the head of the list to seek through (will be updated in case of a new entry).
oid_len
The size of the OID.
val
The associated data to store. If this is \c NULL, no data is copied to the new or existing buffer.
val_len
The minimum length of the data buffer needed. If this is 0, do not allocate a buffer for the associated data. If the OID was already present, enlarge, shrink or free the existing buffer to fit \p val_len.
Return value
A pointer to the new / existing entry on success. \c NULL if there was a memory allocation error.
![]()
mbedtls_asn1_store_named_data(head, (char *) oid.p, oid.len,
mbedtls_asn1_store_named_data() is called by 2 functions and calls 3 functions:
![]()
mbedtls_asn1_store_named_data()
mbedtls_asn1_store_named_data() reads 4 variables and writes 3 variables:
![]()
mbedtls_asn1_store_named_data()