aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Peskine <gilles.peskine@arm.com>2020-09-22 18:52:09 +0200
committerGitHub <noreply@github.com>2020-09-22 18:52:09 +0200
commit2983b27a08141bd5fd56fa1570b4fa58c9766744 (patch)
treea524b81405729f77e01a79f96f00d904cc9d8823
parentdc5fd035e6d2cabc19aeb3ce79b0ae9174f2602e (diff)
parent45a595845d66f5d3d185b2019630916b28318444 (diff)
downloadmbed-tls-mbedtls-2.7.tar.gz
Merge pull request #3707 from ronald-cron-arm/feature/fix_return_code_1-2.7mbedtls-2.7
Backport 2.7: Fix return code expression in pkparse
-rw-r--r--library/pkparse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/pkparse.c b/library/pkparse.c
index 77d48c1ad..f54ed5466 100644
--- a/library/pkparse.c
+++ b/library/pkparse.c
@@ -678,7 +678,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 )