@@ -618,6 +618,9 @@ int odp_crypto_capability(odp_crypto_capability_t *capa)
capa->max_sessions = MAX_SESSIONS;
+ capa->entropy_available = 0;
+ capa->entropy_size = 0;
+
return 0;
}
@@ -872,9 +875,13 @@ int odp_crypto_term_global(void)
}
int32_t
-odp_random_data(uint8_t *buf, int32_t len, odp_bool_t use_entropy ODP_UNUSED)
+odp_random_data(uint8_t *buf, int32_t len, odp_bool_t use_entropy)
{
int32_t rc;
+
+ if (use_entropy)
+ return -1;
+
rc = RAND_bytes(buf, len);
return (1 == rc) ? len /*success*/: -1 /*failure*/;
}
Add entropy related values to odp_crypto_capability() and implement the use_entropy field of odp_random_data() Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> --- platform/linux-generic/odp_crypto.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.7.4