summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ripemd
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/ripemd')
-rw-r--r--src/lib/libcrypto/ripemd/Makefile.ssl108
-rw-r--r--src/lib/libcrypto/ripemd/asm/rmd-586.pl3
-rw-r--r--src/lib/libcrypto/ripemd/ripemd.h6
-rw-r--r--src/lib/libcrypto/ripemd/rmd_dgst.c11
-rw-r--r--src/lib/libcrypto/ripemd/rmd_locl.h2
5 files changed, 7 insertions, 123 deletions
diff --git a/src/lib/libcrypto/ripemd/Makefile.ssl b/src/lib/libcrypto/ripemd/Makefile.ssl
deleted file mode 100644
index f22ac790ae..0000000000
--- a/src/lib/libcrypto/ripemd/Makefile.ssl
+++ /dev/null
@@ -1,108 +0,0 @@
1#
2# SSLeay/crypto/ripemd/Makefile
3#
4
5DIR= ripemd
6TOP= ../..
7CC= cc
8CPP= $(CC) -E
9INCLUDES=
10CFLAG=-g
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
13INSTALLTOP=/usr/local/ssl
14MAKE= make -f Makefile.ssl
15MAKEDEPPROG= makedepend
16MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17MAKEFILE= Makefile.ssl
18AR= ar r
19
20RIP_ASM_OBJ=
21
22CFLAGS= $(INCLUDES) $(CFLAG)
23ASFLAGS= $(INCLUDES) $(ASFLAG)
24
25GENERAL=Makefile
26TEST=rmdtest.c
27APPS=
28
29LIB=$(TOP)/libcrypto.a
30LIBSRC=rmd_dgst.c rmd_one.c
31LIBOBJ=rmd_dgst.o rmd_one.o $(RMD160_ASM_OBJ)
32
33SRC= $(LIBSRC)
34
35EXHEADER= ripemd.h
36HEADER= rmd_locl.h rmdconst.h $(EXHEADER)
37
38ALL= $(GENERAL) $(SRC) $(HEADER)
39
40top:
41 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
42
43all: lib
44
45lib: $(LIBOBJ)
46 $(AR) $(LIB) $(LIBOBJ)
47 $(RANLIB) $(LIB) || echo Never mind.
48 @touch lib
49
50# elf
51asm/rm86-elf.s: asm/rmd-586.pl ../perlasm/x86asm.pl
52 (cd asm; $(PERL) rmd-586.pl elf $(CFLAGS) > rm86-elf.s)
53
54# a.out
55asm/rm86-out.o: asm/rm86unix.cpp
56 $(CPP) -DOUT asm/rm86unix.cpp | as -o asm/rm86-out.o
57
58# bsdi
59asm/rm86bsdi.o: asm/rm86unix.cpp
60 $(CPP) -DBSDI asm/rm86unix.cpp | sed 's/ :/:/' | as -o asm/rm86bsdi.o
61
62asm/rm86unix.cpp: asm/rmd-586.pl ../perlasm/x86asm.pl
63 (cd asm; $(PERL) rmd-586.pl cpp >rm86unix.cpp)
64
65files:
66 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
67
68links:
69 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
70 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
71 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
72 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
73
74install:
75 @for i in $(EXHEADER) ; \
76 do \
77 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
78 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
79 done;
80
81tags:
82 ctags $(SRC)
83
84tests:
85
86lint:
87 lint -DLINT $(INCLUDES) $(SRC)>fluff
88
89depend:
90 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
91
92dclean:
93 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
94 mv -f Makefile.new $(MAKEFILE)
95
96clean:
97 rm -f asm/rm86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
98
99# DO NOT DELETE THIS LINE -- make depend depends on it.
100
101rmd_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
102rmd_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ripemd.h
103rmd_dgst.o: ../md32_common.h rmd_dgst.c rmd_locl.h rmdconst.h
104rmd_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
105rmd_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
106rmd_one.o: ../../include/openssl/ripemd.h ../../include/openssl/safestack.h
107rmd_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
108rmd_one.o: rmd_one.c
diff --git a/src/lib/libcrypto/ripemd/asm/rmd-586.pl b/src/lib/libcrypto/ripemd/asm/rmd-586.pl
index 4f3c4c967f..e8b2bc2db2 100644
--- a/src/lib/libcrypto/ripemd/asm/rmd-586.pl
+++ b/src/lib/libcrypto/ripemd/asm/rmd-586.pl
@@ -5,7 +5,8 @@
5 5
6$normal=0; 6$normal=0;
7 7
8push(@INC,"perlasm","../../perlasm"); 8$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
9push(@INC,"${dir}","${dir}../../perlasm");
9require "x86asm.pl"; 10require "x86asm.pl";
10 11
11&asm_init($ARGV[0],$0); 12&asm_init($ARGV[0],$0);
diff --git a/src/lib/libcrypto/ripemd/ripemd.h b/src/lib/libcrypto/ripemd/ripemd.h
index 3b6d04386d..5942eb6180 100644
--- a/src/lib/libcrypto/ripemd/ripemd.h
+++ b/src/lib/libcrypto/ripemd/ripemd.h
@@ -70,7 +70,7 @@ extern "C" {
70#error RIPEMD is disabled. 70#error RIPEMD is disabled.
71#endif 71#endif
72 72
73#if defined(OPENSSL_SYS_WIN16) || defined(__LP32__) 73#if defined(__LP32__)
74#define RIPEMD160_LONG unsigned long 74#define RIPEMD160_LONG unsigned long
75#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) 75#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__)
76#define RIPEMD160_LONG unsigned long 76#define RIPEMD160_LONG unsigned long
@@ -90,9 +90,7 @@ typedef struct RIPEMD160state_st
90 RIPEMD160_LONG data[RIPEMD160_LBLOCK]; 90 RIPEMD160_LONG data[RIPEMD160_LBLOCK];
91 unsigned int num; 91 unsigned int num;
92 } RIPEMD160_CTX; 92 } RIPEMD160_CTX;
93#ifdef OPENSSL_FIPS 93
94int private_RIPEMD160_Init(RIPEMD160_CTX *c);
95#endif
96int RIPEMD160_Init(RIPEMD160_CTX *c); 94int RIPEMD160_Init(RIPEMD160_CTX *c);
97int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); 95int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len);
98int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); 96int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c);
diff --git a/src/lib/libcrypto/ripemd/rmd_dgst.c b/src/lib/libcrypto/ripemd/rmd_dgst.c
index a845e17ed8..2097a66c03 100644
--- a/src/lib/libcrypto/ripemd/rmd_dgst.c
+++ b/src/lib/libcrypto/ripemd/rmd_dgst.c
@@ -59,11 +59,6 @@
59#include <stdio.h> 59#include <stdio.h>
60#include "rmd_locl.h" 60#include "rmd_locl.h"
61#include <openssl/opensslv.h> 61#include <openssl/opensslv.h>
62#include <openssl/err.h>
63#ifdef OPENSSL_FIPS
64#include <openssl/fips.h>
65#endif
66
67 62
68const char RMD160_version[]="RIPE-MD160" OPENSSL_VERSION_PTEXT; 63const char RMD160_version[]="RIPE-MD160" OPENSSL_VERSION_PTEXT;
69 64
@@ -74,16 +69,14 @@ const char RMD160_version[]="RIPE-MD160" OPENSSL_VERSION_PTEXT;
74 void ripemd160_block(RIPEMD160_CTX *c, unsigned long *p,size_t num); 69 void ripemd160_block(RIPEMD160_CTX *c, unsigned long *p,size_t num);
75# endif 70# endif
76 71
77FIPS_NON_FIPS_MD_Init(RIPEMD160) 72int RIPEMD160_Init(RIPEMD160_CTX *c)
78 { 73 {
74 memset (c,0,sizeof(*c));
79 c->A=RIPEMD160_A; 75 c->A=RIPEMD160_A;
80 c->B=RIPEMD160_B; 76 c->B=RIPEMD160_B;
81 c->C=RIPEMD160_C; 77 c->C=RIPEMD160_C;
82 c->D=RIPEMD160_D; 78 c->D=RIPEMD160_D;
83 c->E=RIPEMD160_E; 79 c->E=RIPEMD160_E;
84 c->Nl=0;
85 c->Nh=0;
86 c->num=0;
87 return 1; 80 return 1;
88 } 81 }
89 82
diff --git a/src/lib/libcrypto/ripemd/rmd_locl.h b/src/lib/libcrypto/ripemd/rmd_locl.h
index ce12a8000e..f14b346e66 100644
--- a/src/lib/libcrypto/ripemd/rmd_locl.h
+++ b/src/lib/libcrypto/ripemd/rmd_locl.h
@@ -72,7 +72,7 @@
72 */ 72 */
73#ifdef RMD160_ASM 73#ifdef RMD160_ASM
74# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) 74# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__)
75# define ripemd160_block_host_order ripemd160_block_asm_data_order 75# define ripemd160_block_data_order ripemd160_block_asm_data_order
76# endif 76# endif
77#endif 77#endif
78 78