Fix long-standing bug in error code description
MBEDTLS_ERR_ASN1_INVALID_DATA is documented as "not used", but it has been used since the PolarSSL days.
This commit is contained in:
parent
2cd8ecc08b
commit
aac3853348
@ -52,7 +52,7 @@
|
||||
#define MBEDTLS_ERR_ASN1_UNEXPECTED_TAG -0x0062 /**< ASN1 tag was of an unexpected value. */
|
||||
#define MBEDTLS_ERR_ASN1_INVALID_LENGTH -0x0064 /**< Error when trying to determine the length or invalid length. */
|
||||
#define MBEDTLS_ERR_ASN1_LENGTH_MISMATCH -0x0066 /**< Actual length differs from expected length. */
|
||||
#define MBEDTLS_ERR_ASN1_INVALID_DATA -0x0068 /**< Data is invalid. (not used) */
|
||||
#define MBEDTLS_ERR_ASN1_INVALID_DATA -0x0068 /**< Data is invalid. */
|
||||
#define MBEDTLS_ERR_ASN1_ALLOC_FAILED -0x006A /**< Memory allocation failed */
|
||||
#define MBEDTLS_ERR_ASN1_BUF_TOO_SMALL -0x006C /**< Buffer too small when writing ASN.1 data structure. */
|
||||
|
||||
|
@ -467,7 +467,7 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
|
||||
if( use_ret == -(MBEDTLS_ERR_ASN1_LENGTH_MISMATCH) )
|
||||
mbedtls_snprintf( buf, buflen, "ASN1 - Actual length differs from expected length" );
|
||||
if( use_ret == -(MBEDTLS_ERR_ASN1_INVALID_DATA) )
|
||||
mbedtls_snprintf( buf, buflen, "ASN1 - Data is invalid. (not used)" );
|
||||
mbedtls_snprintf( buf, buflen, "ASN1 - Data is invalid" );
|
||||
if( use_ret == -(MBEDTLS_ERR_ASN1_ALLOC_FAILED) )
|
||||
mbedtls_snprintf( buf, buflen, "ASN1 - Memory allocation failed" );
|
||||
if( use_ret == -(MBEDTLS_ERR_ASN1_BUF_TOO_SMALL) )
|
||||
|
Loading…
Reference in New Issue
Block a user