Fix entropy thresholds
This commit is contained in:
parent
60c793bdc9
commit
bf82ff0209
3 changed files with 12 additions and 13 deletions
|
@ -107,8 +107,8 @@ typedef struct
|
|||
{
|
||||
mbedtls_entropy_f_source_ptr f_source; /**< The entropy source callback */
|
||||
void * p_source; /**< The callback data pointer */
|
||||
size_t size; /**< Amount received */
|
||||
size_t threshold; /**< Minimum level required before release */
|
||||
size_t size; /**< Amount received in bytes */
|
||||
size_t threshold; /**< Minimum bytes required before release */
|
||||
}
|
||||
mbedtls_entropy_source_state;
|
||||
|
||||
|
@ -155,7 +155,7 @@ void mbedtls_entropy_free( mbedtls_entropy_context *ctx );
|
|||
* \param f_source Entropy function
|
||||
* \param p_source Function data
|
||||
* \param threshold Minimum required from source before entropy is released
|
||||
* ( with mbedtls_entropy_func() )
|
||||
* ( with mbedtls_entropy_func() ) (in bytes)
|
||||
*
|
||||
* \return 0 if successful or MBEDTLS_ERR_ENTROPY_MAX_SOURCES
|
||||
*/
|
||||
|
|
|
@ -37,11 +37,11 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/*
|
||||
* Default thresholds for built-in sources
|
||||
* Default thresholds for built-in sources, in bytes
|
||||
*/
|
||||
#define MBEDTLS_ENTROPY_MIN_PLATFORM 128 /**< Minimum for platform source */
|
||||
#define MBEDTLS_ENTROPY_MIN_HAVEGE 128 /**< Minimum for HAVEGE */
|
||||
#define MBEDTLS_ENTROPY_MIN_HARDCLOCK 32 /**< Minimum for mbedtls_timing_hardclock() */
|
||||
#define MBEDTLS_ENTROPY_MIN_PLATFORM 32 /**< Minimum for platform source */
|
||||
#define MBEDTLS_ENTROPY_MIN_HAVEGE 32 /**< Minimum for HAVEGE */
|
||||
#define MBEDTLS_ENTROPY_MIN_HARDCLOCK 4 /**< Minimum for mbedtls_timing_hardclock() */
|
||||
|
||||
#if !defined(MBEDTLS_NO_PLATFORM_ENTROPY)
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue