convert_der_to_raw_single_int() function
Convert a single integer from ASN.1 DER format to raw. \warning Der and raw buffers must not be overlapping.
Arguments
der
Buffer containing the DER integer value to be converted.
der_len
Length of the der buffer in bytes.
raw
Output buffer that will be filled with the converted data. This should be at least coordinate_size bytes and it must be zeroed before calling this function.
coordinate_size
Size (in bytes) of a single coordinate in raw format.
Return value
On success, the amount of DER data parsed from the provided der buffer. MBEDTLS_ERR_ASN1_UNEXPECTED_TAG if the integer tag is missing in the der buffer. MBEDTLS_ERR_ASN1_LENGTH_MISMATCH if the integer is null (i.e. all zeros) or if the output raw buffer is too small to contain the converted raw value.