From b5c74a53d816c3af7d95e40d10751173525e18c7 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 30 Oct 2019 17:07:02 +0100 Subject: [PATCH] Document one more error code for mbedtls_asn1_get_sequence_of Also fix a copypasta. --- include/mbedtls/asn1.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/mbedtls/asn1.h b/include/mbedtls/asn1.h index 43ab9ae4d..0a2727e12 100644 --- a/include/mbedtls/asn1.h +++ b/include/mbedtls/asn1.h @@ -379,9 +379,12 @@ int mbedtls_asn1_get_bitstring_null( unsigned char **p, * \return 0 if successful. * \return #MBEDTLS_ERR_ASN1_LENGTH_MISMATCH if the input contains * extra data after a valid SEQUENCE OF \p tag. + * \return #MBEDTLS_ERR_ASN1_UNEXPECTED_TAG if the input starts with + * an ASN.1 SEQUENCE in which an element has a tag that + * is different from \p tag. * \return #MBEDTLS_ERR_ASN1_ALLOC_FAILED if a memory allocation failed. * \return An ASN.1 error code if the input does not start with - * a valid ASN.1 BIT STRING. + * a valid ASN.1 SEQUENCE. */ int mbedtls_asn1_get_sequence_of( unsigned char **p, const unsigned char *end,