diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-05-16 22:20:17 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-05-20 12:30:42 +0200 |
commit | a8e8ba0f5cea4f2356c539e48d17b1e662b49141 (patch) | |
tree | 36e81a209054f87f404a5a768ef3253f614e2f02 /lib/nettle/rnd.c | |
parent | f90470a7b4c672a916c4513cecf4b9a6bce0eb67 (diff) | |
download | gnutls-ecc.tar.gz |
Initial ecc support. Adds support for anonymous ECDH ciphersuites.ecc
Diffstat (limited to 'lib/nettle/rnd.c')
-rw-r--r-- | lib/nettle/rnd.c | 10 |
1 files changed, 9 insertions, 1 deletions
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 <gnutls_errors.h> #include <gnutls_num.h> #include <nettle/yarrow.h> +#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 = { |