aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Peskine <gilles.peskine@arm.com>2020-09-22 18:52:03 +0200
committerGitHub <noreply@github.com>2020-09-22 18:52:03 +0200
commit506498eaa3a98287ca3ccd17f4520a7593e2b195 (patch)
tree4397cf42d1ee95c647cca4ff34d6c1a0d7e803d2
parente72c8d28f10417a1a5e93926b34b50528f48d68e (diff)
parent84d4f022e23517924bae08553659a807d53a0a37 (diff)
downloadmbed-tls-mbedtls-2.16.tar.gz
Merge pull request #3708 from ronald-cron-arm/feature/fix_return_code_1-2.16mbedtls-2.16
Backport 2.16: 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 086807d83..e410f3aae 100644
--- a/library/pkparse.c
+++ b/library/pkparse.c
@@ -692,7 +692,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 )