From e452add01ec460853067d5548d78148851f873ae Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Thu, 2 May 2019 13:19:34 +0100 Subject: [PATCH] Comment on return value type in two internal X.509 functions --- library/x509.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/x509.c b/library/x509.c index 4ed8a4d76..627a5a39b 100644 --- a/library/x509.c +++ b/library/x509.c @@ -348,6 +348,8 @@ int mbedtls_x509_get_rsassa_pss_params( const mbedtls_x509_buf *params, * AttributeType ::= OBJECT IDENTIFIER * * AttributeValue ::= ANY DEFINED BY AttributeType + * + * NOTE: This function returns an ASN.1 low-level error code. */ static int x509_get_attr_type_value( unsigned char **p, const unsigned char *end, @@ -423,6 +425,8 @@ exit: * For the general case we still use a flat list, but we mark elements of the * same set so that they are "merged" together in the functions that consume * this list, eg mbedtls_x509_dn_gets(). + * + * NOTE: This function returns an ASN.1 low-level error code. */ static int x509_set_sequence_iterate( unsigned char **p, unsigned char const **end_set, @@ -446,6 +450,7 @@ static int x509_set_sequence_iterate( unsigned char **p, *end_set = *p + set_len; } + /* x509_get_attr_type_value() returns ASN.1 low-level error codes. */ ret = x509_get_attr_type_value( p, *end_set, oid, val ); exit: