Fix warnings from armcc

This commit is contained in:
Manuel Pégourié-Gonnard 2015-05-14 11:25:04 +02:00
parent e391c8deda
commit 6ab9b009cd
2 changed files with 5 additions and 6 deletions

View file

@ -125,16 +125,15 @@ static int ssl_cookie_hmac( mbedtls_md_context_t *hmac_ctx,
unsigned char **p, unsigned char *end,
const unsigned char *cli_id, size_t cli_id_len )
{
int ret;
unsigned char hmac_out[COOKIE_MD_OUTLEN];
if( (size_t)( end - *p ) < COOKIE_HMAC_LEN )
return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL );
if( ( ret = mbedtls_md_hmac_reset( hmac_ctx ) ) != 0 ||
( ret = mbedtls_md_hmac_update( hmac_ctx, time, 4 ) ) != 0 ||
( ret = mbedtls_md_hmac_update( hmac_ctx, cli_id, cli_id_len ) ) != 0 ||
( ret = mbedtls_md_hmac_finish( hmac_ctx, hmac_out ) ) != 0 )
if( mbedtls_md_hmac_reset( hmac_ctx ) != 0 ||
mbedtls_md_hmac_update( hmac_ctx, time, 4 ) != 0 ||
mbedtls_md_hmac_update( hmac_ctx, cli_id, cli_id_len ) != 0 ||
mbedtls_md_hmac_finish( hmac_ctx, hmac_out ) != 0 )
{
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
}

View file

@ -5722,7 +5722,7 @@ uint32_t mbedtls_ssl_get_verify_result( const mbedtls_ssl_context *ssl )
if( ssl->session_negotiate != NULL )
return( ssl->session_negotiate->verify_result );
return( -1 );
return( 0xFFFFFFFF );
}
const char *mbedtls_ssl_get_ciphersuite( const mbedtls_ssl_context *ssl )