From a8e8ba0f5cea4f2356c539e48d17b1e662b49141 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 16 May 2011 22:20:17 +0200 Subject: Initial ecc support. Adds support for anonymous ECDH ciphersuites. --- lib/nettle/rnd.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/nettle/rnd.c') diff --git a/lib/nettle/rnd.c b/lib/nettle/rnd.c index 8af0adde57..b503e10e1d 100644 --- a/lib/nettle/rnd.c +++ b/lib/nettle/rnd.c @@ -33,6 +33,7 @@ #include #include #include +#include "rnd.h" #define SOURCES 2 @@ -440,7 +441,6 @@ wrap_nettle_rnd_init (void **ctx) } - static int wrap_nettle_rnd (void *_ctx, int level, void *data, size_t datasize) { @@ -467,6 +467,14 @@ wrap_nettle_rnd (void *_ctx, int level, void *data, size_t datasize) return 0; } +/* internal function to provide to nettle functions that + * require a nettle_random_func(). + */ +void _int_random_func(void *ctx, unsigned length, uint8_t *dst) +{ + wrap_nettle_rnd(ctx, 0, dst, length); +} + int crypto_rnd_prio = INT_MAX; gnutls_crypto_rnd_st _gnutls_rnd_ops = { -- cgit v1.2.1