mirror of https://github.com/ARMmbed/mbed-os.git
Merge commit '9cb63ab0e4b525c8d067ea94d7e4302203ba835a'
* commit '9cb63ab0e4b525c8d067ea94d7e4302203ba835a': Squashed 'features/nanostack/coap-service/' changes from e5e0c138e6..5aa54b8e62pull/12754/head
commit
54f3465e45
|
@ -155,8 +155,8 @@ static int coap_security_handler_init(coap_security_t *sec)
|
|||
#elif defined(MBEDTLS_HMAC_DRBG_C)
|
||||
if ((mbedtls_hmac_drbg_seed(&sec->_drbg, mbedtls_md_info_from_type(MBEDTLS_MD_SHA256),
|
||||
mbedtls_entropy_func, &sec->_entropy,
|
||||
(const unsigned char *) pers,
|
||||
strlen(pers))) != 0) {
|
||||
(const unsigned char *) pers,
|
||||
strlen(pers))) != 0) {
|
||||
return -1;
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -249,33 +249,33 @@ int mbedtls_ctr_drbg_random(void *p_rng,
|
|||
}
|
||||
|
||||
// from hmac_drbg.h
|
||||
void mbedtls_hmac_drbg_init( mbedtls_hmac_drbg_context *ctx )
|
||||
void mbedtls_hmac_drbg_init(mbedtls_hmac_drbg_context *ctx)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void mbedtls_hmac_drbg_free( mbedtls_hmac_drbg_context *ctx )
|
||||
void mbedtls_hmac_drbg_free(mbedtls_hmac_drbg_context *ctx)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int mbedtls_hmac_drbg_seed( mbedtls_hmac_drbg_context *ctx,
|
||||
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 )
|
||||
int mbedtls_hmac_drbg_seed(mbedtls_hmac_drbg_context *ctx,
|
||||
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;
|
||||
}
|
||||
|
||||
int mbedtls_hmac_drbg_random( void *p_rng, unsigned char *output, size_t out_len )
|
||||
int mbedtls_hmac_drbg_random(void *p_rng, unsigned char *output, size_t out_len)
|
||||
{
|
||||
return mbedtls_stub.crt_expected_int;
|
||||
}
|
||||
|
||||
// from md.h
|
||||
const mbedtls_md_info_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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue