From 8d4746b1d14ddfb40e415f79d2c48670ce92a2d6 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 9 Feb 2012 22:54:43 +0100 Subject: [PATCH] The `randomkey' module has been removed. Obsolete, no real use in years. --- ucw/Makefile | 2 +- ucw/lib.h | 4 ---- ucw/randomkey.c | 25 ------------------------- 3 files changed, 1 insertion(+), 30 deletions(-) delete mode 100644 ucw/randomkey.c diff --git a/ucw/Makefile b/ucw/Makefile index 9a136a0d..bf123268 100644 --- a/ucw/Makefile +++ b/ucw/Makefile @@ -19,7 +19,7 @@ LIBUCW_MODS= \ fb-file carefulio fb-mem fb-temp tempfile fb-mmap fb-limfd fb-buffer fb-grow fb-pool fb-atomic fb-param fb-socket \ char-cat char-upper char-lower unicode stkstring \ wildmatch regex \ - prime primetable random timer randomkey \ + prime primetable random timer \ bit-ffs bit-fls \ url \ mainloop main-block main-rec \ diff --git a/ucw/lib.h b/ucw/lib.h index 65ee86c0..ec984888 100644 --- a/ucw/lib.h +++ b/ucw/lib.h @@ -192,10 +192,6 @@ void setproctitle_init(int argc, char **argv); void setproctitle(const char *msg, ...) FORMAT_CHECK(printf,1,2); char *getproctitle(void); -/* randomkey.c */ - -void randomkey(byte *buf, uns size); - /* exitstatus.c */ #define EXIT_STATUS_MSG_SIZE 32 diff --git a/ucw/randomkey.c b/ucw/randomkey.c deleted file mode 100644 index c1f40e87..00000000 --- a/ucw/randomkey.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * UCW Library -- Cryptographically Safe Random Key Generator - * - * (c) 2002 Martin Mares - * - * This software may be freely distributed and used according to the terms - * of the GNU Lesser General Public License. - */ - -#include "ucw/lib.h" - -#include -#include - -void -randomkey(byte *buf, uns size) -{ - int fd; - - if ((fd = open("/dev/urandom", O_RDONLY, 0)) < 0) - die("Unable to open /dev/urandom: %m"); - if (read(fd, buf, size) != (int) size) - die("Error reading /dev/urandom: %m"); - close(fd); -} -- 2.39.2