aboutsummaryrefslogtreecommitdiffstats
path: root/cipher
diff options
context:
space:
mode:
Diffstat (limited to 'cipher')
-rw-r--r--cipher/Makefile.am5
-rw-r--r--cipher/Makefile.in11
-rw-r--r--cipher/random.c1
3 files changed, 8 insertions, 9 deletions
diff --git a/cipher/Makefile.am b/cipher/Makefile.am
index becf3a104..b994cbe0e 100644
--- a/cipher/Makefile.am
+++ b/cipher/Makefile.am
@@ -5,6 +5,7 @@ INCLUDES = -I$(top_srcdir)/include
noinst_LIBRARIES = cipher
+# please add "rsa.c" and "rsa.h" manually in Makefile.am
cipher_SOURCES = blowfish.c \
blowfish.h \
elgamal.c \
@@ -15,12 +16,10 @@ cipher_SOURCES = blowfish.c \
md5.h \
primegen.c \
random.c \
- ripemd.h \
rmd.h \
rmd160.c \
- rsa.c \
- rsa.h \
smallprime.c
+cipher_LIBADD = rsa.o
diff --git a/cipher/Makefile.in b/cipher/Makefile.in
index 16da11089..0daff112c 100644
--- a/cipher/Makefile.in
+++ b/cipher/Makefile.in
@@ -42,6 +42,7 @@ INCLUDES = -I$(top_srcdir)/include
noinst_LIBRARIES = cipher
+# please add "rsa.c" and "rsa.h" manually in Makefile.am
cipher_SOURCES = blowfish.c \
blowfish.h \
elgamal.c \
@@ -52,12 +53,11 @@ cipher_SOURCES = blowfish.c \
md5.h \
primegen.c \
random.c \
- ripemd.h \
rmd.h \
rmd160.c \
- rsa.c \
- rsa.h \
smallprime.c
+
+cipher_LIBADD = rsa.o
mkinstalldirs = $(top_srcdir)/scripts/mkinstalldirs
CONFIG_HEADER = ../config.h
LIBRARIES = $(noinst_LIBRARIES)
@@ -76,9 +76,8 @@ LIBS = @LIBS@
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LINK = $(CC) $(LDFLAGS) -o $@
-cipher_LIBADD =
cipher_OBJECTS = blowfish.o elgamal.o gost.o md5.o primegen.o random.o \
-rmd160.o rsa.o smallprime.o
+rmd160.o smallprime.o
EXTRA_cipher_SOURCES =
LIBFILES = libcipher.a
AR = ar
@@ -97,7 +96,7 @@ DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
TAR = tar
DEP_FILES = $(srcdir)/.deps/blowfish.P $(srcdir)/.deps/elgamal.P \
$(srcdir)/.deps/gost.P $(srcdir)/.deps/md5.P $(srcdir)/.deps/primegen.P \
-$(srcdir)/.deps/random.P $(srcdir)/.deps/rmd160.P $(srcdir)/.deps/rsa.P \
+$(srcdir)/.deps/random.P $(srcdir)/.deps/rmd160.P \
$(srcdir)/.deps/smallprime.P
SOURCES = $(cipher_SOURCES)
OBJECTS = $(cipher_OBJECTS)
diff --git a/cipher/random.c b/cipher/random.c
index 73a9a3ebf..b4abbdda9 100644
--- a/cipher/random.c
+++ b/cipher/random.c
@@ -43,6 +43,7 @@ randomize_buffer( byte *buffer, size_t length, int level )
if( level == 2 )
level = 1; /* 2 is much too slow */
+ /* FIXME: do a stat and check that we have the correct device numbers*/
fp = fopen(level < 2? "/dev/urandom":"/dev/random", "r");
if( !fp )
log_fatal("can't open random device: %s\n", strerror(errno) );