Change error from unknown oid to invalid name

Since the implementation no longer needs to know the oid, it makes more
sense for the error message to be an invalid name.

Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
This commit is contained in:
Agathiyan Bragadeesh 2023-08-11 12:42:03 +01:00
parent afdb187bbc
commit 17984874af

View File

@ -274,7 +274,7 @@ int mbedtls_x509_string_to_names(mbedtls_asn1_named_data **head, const char *nam
if (in_attr_type && *c == '=') { if (in_attr_type && *c == '=') {
if ((attr_descr = x509_attr_descr_from_name(s, c - s)) == NULL) { if ((attr_descr = x509_attr_descr_from_name(s, c - s)) == NULL) {
if ((oid = x509_oid_from_numericoid(s, c - s)) == NULL) { if ((oid = x509_oid_from_numericoid(s, c - s)) == NULL) {
return MBEDTLS_ERR_X509_UNKNOWN_OID; return MBEDTLS_ERR_X509_INVALID_NAME;
} else { } else {
numericoid = 1; numericoid = 1;
} }