trace group defiined for shared_rng

Unittests fixed

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

View File

@ -24,6 +24,8 @@
#include "mbed_trace.h"
#define TRACE_GROUP "SRNG"
mbedtls_hmac_drbg_context global_hmac_drbg;
mbedtls_entropy_context global_entropy;
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,
mbedtls_md_handle_t md_info,
int (*f_entropy)(void *, unsigned char *, size_t),
void *p_entropy,
const unsigned char *custom,
size_t len )
const mbedtls_md_info_t * md_info,
int (*f_entropy)(void *, unsigned char *, size_t),
void *p_entropy,
const unsigned char *custom,
size_t len )
{
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
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;
}