From 1db476e7a570fff96ca685b0db1bff221fa6e5e6 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Wed, 17 Jun 2015 00:53:09 -0400 Subject: [PATCH] Include openssl/chacha.h rather than duplicate the prototype. Less chance of problems should the prototype ever change. This doesn't make it any more or less a circular dependency. (It actually isn't; crypto/chacha doesn't use crypto/rand and CMakeLists.txt actually puts rand above chacha anyway.) Change-Id: Ia80289f801f76551737233f158755aac99ddd74a Reviewed-on: https://boringssl-review.googlesource.com/5262 Reviewed-by: Adam Langley --- crypto/rand/rand.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crypto/rand/rand.c b/crypto/rand/rand.c index daebdf09..0d146a89 100644 --- a/crypto/rand/rand.c +++ b/crypto/rand/rand.c @@ -17,6 +17,7 @@ #include #include +#include #include #include "internal.h" @@ -69,10 +70,6 @@ static void rand_thread_state_free(void *state) { OPENSSL_free(state); } -extern void CRYPTO_chacha_20(uint8_t *out, const uint8_t *in, size_t in_len, - const uint8_t key[32], const uint8_t nonce[8], - size_t counter); - int RAND_bytes(uint8_t *buf, size_t len) { if (len == 0) { return 1;