Change behaviour away from NUL-terminated strings
Instead, require the length of the string to be passed. This is more useful for our use-case, as it is likely we will parse OIDs from the middle of strings. Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
parent
d1a203a382
commit
017139751a
2 changed files with 7 additions and 6 deletions
|
@ -479,8 +479,9 @@ int mbedtls_oid_get_numeric_string(char *buf, size_t size, const mbedtls_asn1_bu
|
|||
* heap. It must be freed by the caller using mbedtls_free().
|
||||
*
|
||||
* \param oid #mbedtls_asn1_buf to populate with the DER-encoded OID
|
||||
* \param oid_str string representation of the OID to parse
|
||||
* \param size length of the OID string
|
||||
* \param oid_str string representation of the OID to parse, not
|
||||
* NUL-terminated
|
||||
* \param size length of the OID string, not including any NUL terminator
|
||||
*
|
||||
* \return 0 if successful
|
||||
* \return #MBEDTLS_ERR_ASN1_INVALID_DATA if \p oid_str does not
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue