Minor review fixes

This commit is contained in:
Jarno Lamsa 2019-12-20 12:42:49 +02:00
parent 015aa44b93
commit 5aa4c07b85
5 changed files with 21 additions and 12 deletions
library

View file

@ -2342,7 +2342,7 @@ static int ssl_rsa_generate_partial_pms( mbedtls_ssl_context *ssl,
unsigned char* out,
unsigned add_length_tag )
{
volatile int ret;
volatile int ret = MBEDTLS_ERR_SSL_INTERNAL_ERROR;
/*
* Generate (part of) the pre-master secret as
@ -2390,7 +2390,7 @@ static int ssl_rsa_encrypt_partial_pms( mbedtls_ssl_context *ssl,
unsigned char *out, size_t buflen,
size_t *olen )
{
volatile int ret;
volatile int ret = MBEDTLS_ERR_SSL_INTERNAL_ERROR;
size_t len_bytes = mbedtls_ssl_get_minor_ver( ssl ) ==
MBEDTLS_SSL_MINOR_VERSION_0 ? 0 : 2;
mbedtls_pk_context *peer_pk = NULL;
@ -2762,6 +2762,10 @@ static int ssl_in_server_key_exchange_parse( mbedtls_ssl_context *ssl,
unsigned char *buf,
size_t buflen )
{
/*
* Initialising to an error value would need a significant
* structural change to provide default flow assumes failure
*/
volatile int ret = 0;
unsigned char *p;
unsigned char *end;