trace group defiined for shared_rng

Unittests fixed

2 mbedtls functions were updated to reflect the api
pull/12729/head
Antti Kauppila 2020-02-24 14:01:42 +02:00
parent c5d5d21f05
commit 69c6f29ab6
2 changed files with 8 additions and 6 deletions

View File

@ -24,6 +24,8 @@
#include "mbed_trace.h" #include "mbed_trace.h"
#define TRACE_GROUP "SRNG"
mbedtls_hmac_drbg_context global_hmac_drbg; mbedtls_hmac_drbg_context global_hmac_drbg;
mbedtls_entropy_context global_entropy; mbedtls_entropy_context global_entropy;
static bool is_initialized = false; static bool is_initialized = false;

View File

@ -260,11 +260,11 @@ void mbedtls_hmac_drbg_free( mbedtls_hmac_drbg_context *ctx )
} }
int mbedtls_hmac_drbg_seed( mbedtls_hmac_drbg_context *ctx, int mbedtls_hmac_drbg_seed( mbedtls_hmac_drbg_context *ctx,
mbedtls_md_handle_t md_info, const mbedtls_md_info_t * md_info,
int (*f_entropy)(void *, unsigned char *, size_t), int (*f_entropy)(void *, unsigned char *, size_t),
void *p_entropy, void *p_entropy,
const unsigned char *custom, const unsigned char *custom,
size_t len ) size_t len )
{ {
return mbedtls_stub.crt_expected_int; return mbedtls_stub.crt_expected_int;
} }
@ -275,7 +275,7 @@ int mbedtls_hmac_drbg_random( void *p_rng, unsigned char *output, size_t out_len
} }
// from md.h // from md.h
mbedtls_md_handle_t mbedtls_md_info_from_type( mbedtls_md_type_t md_type ) const mbedtls_md_info_t *mbedtls_md_info_from_type( mbedtls_md_type_t md_type )
{ {
return 0; return 0;
} }