From 9ad4a33a54fb9ebf46734d308ea7c4540babeab4 Mon Sep 17 00:00:00 2001 From: Jens Reimann Date: Tue, 22 Sep 2020 11:57:16 +0200 Subject: [PATCH] fix return code Signed-off-by: Jens Reimann --- library/pkparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/pkparse.c b/library/pkparse.c index a106dbe3e..0590f2b05 100644 --- a/library/pkparse.c +++ b/library/pkparse.c @@ -662,7 +662,7 @@ int mbedtls_pk_parse_subpubkey( unsigned char **p, const unsigned char *end, ret = MBEDTLS_ERR_PK_UNKNOWN_PK_ALG; if( ret == 0 && *p != end ) - ret = MBEDTLS_ERR_PK_INVALID_PUBKEY + ret = MBEDTLS_ERR_PK_INVALID_PUBKEY + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH; if( ret != 0 )