From 0eb57ccab0d990b6e55faff9e5fe453d85446343 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Mon, 18 Apr 2016 14:27:34 -0600 Subject: [PATCH] set return error before jumping to end of function --- src/internal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/internal.c b/src/internal.c index f6aa4382c..74a06f506 100755 --- a/src/internal.c +++ b/src/internal.c @@ -14911,6 +14911,7 @@ int DoSessionTicket(WOLFSSL* ssl, if (sigSz < ssl->options.minRsaKeySz) { WOLFSSL_MSG("RSA signature key size too small"); + ret = RSA_KEY_SIZE_E; goto exit_sske; } break; @@ -15198,6 +15199,7 @@ int DoSessionTicket(WOLFSSL* ssl, if (sigSz < ssl->options.minRsaKeySz) { WOLFSSL_MSG("RSA key size too small"); + ret = RSA_KEY_SIZE_E; goto exit_sske; } @@ -17023,6 +17025,7 @@ int DoSessionTicket(WOLFSSL* ssl, length = wc_RsaEncryptSize((RsaKey*)ssl->sigKey); if (length < ssl->options.minRsaKeySz) { WOLFSSL_MSG("Peer RSA key is too small"); + ret = RSA_KEY_SIZE_E; goto exit_dcke; } ssl->arrays->preMasterSz = SECRET_LEN;