summaryrefslogtreecommitdiff
path: root/entropy.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2015-01-15 02:21:31 +1100
committerDamien Miller <djm@mindrot.org>2015-01-15 02:28:36 +1100
commit72ef7c148c42db7d5632a29f137f8b87b579f2d9 (patch)
tree47954a387f4260cc8b1e0ff33bbbaf22fd6f11fc /entropy.c
parent4f38c61c68ae7e3f9ee4b3c38bc86cd39f65ece9 (diff)
support --without-openssl at configure time
Disables and removes dependency on OpenSSL. Many features don't work and the set of crypto options is greatly restricted. This will only work on system with native arc4random or /dev/urandom. Considered highly experimental for now.
Diffstat (limited to 'entropy.c')
-rw-r--r--entropy.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/entropy.c b/entropy.c
index 1e9d52ac4..9305f89ae 100644
--- a/entropy.c
+++ b/entropy.c
@@ -24,6 +24,8 @@
24 24
25#include "includes.h" 25#include "includes.h"
26 26
27#ifdef WITH_OPENSSL
28
27#include <sys/types.h> 29#include <sys/types.h>
28#include <sys/socket.h> 30#include <sys/socket.h>
29#ifdef HAVE_SYS_UN_H 31#ifdef HAVE_SYS_UN_H
@@ -230,3 +232,13 @@ seed_rng(void)
230 if (RAND_status() != 1) 232 if (RAND_status() != 1)
231 fatal("PRNG is not seeded"); 233 fatal("PRNG is not seeded");
232} 234}
235
236#else /* WITH_OPENSSL */
237
238/* Handled in arc4random() */
239void
240seed_rng(void)
241{
242}
243
244#endif /* WITH_OPENSSL */