Merge branch 'development' for weekly test report.

This commit is contained in:
Janos Follath 2016-05-31 10:18:41 +01:00
commit 04b591ee79
8 changed files with 12 additions and 16 deletions

View file

@ -221,7 +221,7 @@ int mbedtls_dhm_read_public( mbedtls_dhm_context *ctx,
* \param ctx DHM context * \param ctx DHM context
* \param x_size private value size in bytes * \param x_size private value size in bytes
* \param output destination buffer * \param output destination buffer
* \param olen must be equal to ctx->P.len * \param olen must be at least equal to the size of P, ctx->len
* \param f_rng RNG function * \param f_rng RNG function
* \param p_rng RNG parameter * \param p_rng RNG parameter
* *

View file

@ -174,6 +174,8 @@ static void havege_fill( mbedtls_havege_state *hs )
PTX = U1 = 0; PTX = U1 = 0;
PTY = U2 = 0; PTY = U2 = 0;
(void)PTX;
memset( RES, 0, sizeof( RES ) ); memset( RES, 0, sizeof( RES ) );
while( n < MBEDTLS_HAVEGE_COLLECT_SIZE * 4 ) while( n < MBEDTLS_HAVEGE_COLLECT_SIZE * 4 )

15
library/rsa.c Normal file → Executable file
View file

@ -804,12 +804,7 @@ int mbedtls_rsa_rsaes_pkcs1_v15_decrypt( mbedtls_rsa_context *ctx,
int ret; int ret;
size_t ilen, pad_count = 0, i; size_t ilen, pad_count = 0, i;
unsigned char *p, bad, pad_done = 0; unsigned char *p, bad, pad_done = 0;
#if defined(__clang_analyzer__)
/* Shut up Clang, mbedtls_rsa_public/private writes to this */
unsigned char buf[MBEDTLS_MPI_MAX_SIZE] = { };
#else
unsigned char buf[MBEDTLS_MPI_MAX_SIZE]; unsigned char buf[MBEDTLS_MPI_MAX_SIZE];
#endif
if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V15 ) if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V15 )
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
@ -1189,12 +1184,7 @@ int mbedtls_rsa_rsassa_pss_verify_ext( mbedtls_rsa_context *ctx,
size_t slen, msb; size_t slen, msb;
const mbedtls_md_info_t *md_info; const mbedtls_md_info_t *md_info;
mbedtls_md_context_t md_ctx; mbedtls_md_context_t md_ctx;
#if defined(__clang_analyzer__)
/* Shut up Clang, mbedtls_rsa_public/private writes to this */
unsigned char buf[MBEDTLS_MPI_MAX_SIZE] = { };
#else
unsigned char buf[MBEDTLS_MPI_MAX_SIZE]; unsigned char buf[MBEDTLS_MPI_MAX_SIZE];
#endif
if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V21 ) if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V21 )
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
@ -1336,12 +1326,7 @@ int mbedtls_rsa_rsassa_pkcs1_v15_verify( mbedtls_rsa_context *ctx,
mbedtls_md_type_t msg_md_alg; mbedtls_md_type_t msg_md_alg;
const mbedtls_md_info_t *md_info; const mbedtls_md_info_t *md_info;
mbedtls_asn1_buf oid; mbedtls_asn1_buf oid;
#if defined(__clang_analyzer__)
/* Shut up Clang, mbedtls_rsa_public/private writes to this */
unsigned char buf[MBEDTLS_MPI_MAX_SIZE] = { };
#else
unsigned char buf[MBEDTLS_MPI_MAX_SIZE]; unsigned char buf[MBEDTLS_MPI_MAX_SIZE];
#endif
if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V15 ) if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V15 )
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );

View file

@ -30,6 +30,7 @@
#else #else
#include <stdio.h> #include <stdio.h>
#define mbedtls_printf printf #define mbedtls_printf printf
#define mbedtls_time_t time_t
#endif #endif
#if defined(MBEDTLS_AES_C) && defined(MBEDTLS_DHM_C) && \ #if defined(MBEDTLS_AES_C) && defined(MBEDTLS_DHM_C) && \

View file

@ -30,6 +30,7 @@
#else #else
#include <stdio.h> #include <stdio.h>
#define mbedtls_printf printf #define mbedtls_printf printf
#define mbedtls_time_t time_t
#endif #endif
#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_ENTROPY_C) || \ #if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_ENTROPY_C) || \

View file

@ -30,6 +30,7 @@
#else #else
#include <stdio.h> #include <stdio.h>
#define mbedtls_printf printf #define mbedtls_printf printf
#define mbedtls_time_t time_t
#endif #endif
#if defined(MBEDTLS_AES_C) && defined(MBEDTLS_DHM_C) && \ #if defined(MBEDTLS_AES_C) && defined(MBEDTLS_DHM_C) && \

View file

@ -31,6 +31,7 @@
#include <stdio.h> #include <stdio.h>
#define mbedtls_fprintf fprintf #define mbedtls_fprintf fprintf
#define mbedtls_printf printf #define mbedtls_printf printf
#define mbedtls_time_t time_t
#endif #endif
#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_CERTS_C) || \ #if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_CERTS_C) || \

View file

@ -83,6 +83,7 @@ int dep_check( char *str )
return( 1 ); return( 1 );
DEP_CHECK_CODE DEP_CHECK_CODE
#line !LINE_NO! "main_test.function"
return( DEPENDENCY_NOT_SUPPORTED ); return( DEPENDENCY_NOT_SUPPORTED );
} }
@ -96,8 +97,12 @@ int dispatch_test(int cnt, char *params[50])
#if defined(TEST_SUITE_ACTIVE) #if defined(TEST_SUITE_ACTIVE)
ret = DISPATCH_TEST_SUCCESS; ret = DISPATCH_TEST_SUCCESS;
// Cast to void to avoid compiler warnings
(void)ret;
DISPATCH_FUNCTION DISPATCH_FUNCTION
{ {
#line !LINE_NO! "main_test.function"
mbedtls_fprintf( stdout, mbedtls_fprintf( stdout,
"FAILED\nSkipping unknown test function '%s'\n", "FAILED\nSkipping unknown test function '%s'\n",
params[0] ); params[0] );