diff options
Diffstat (limited to 'src/lib/libcrypto/mdc2')
-rw-r--r-- | src/lib/libcrypto/mdc2/Makefile.ssl | 39 | ||||
-rw-r--r-- | src/lib/libcrypto/mdc2/mdc2.h | 16 |
2 files changed, 29 insertions, 26 deletions
diff --git a/src/lib/libcrypto/mdc2/Makefile.ssl b/src/lib/libcrypto/mdc2/Makefile.ssl index 495a2789a0..3a5ad990a6 100644 --- a/src/lib/libcrypto/mdc2/Makefile.ssl +++ b/src/lib/libcrypto/mdc2/Makefile.ssl | |||
@@ -7,9 +7,11 @@ TOP= ../.. | |||
7 | CC= cc | 7 | CC= cc |
8 | INCLUDES= | 8 | INCLUDES= |
9 | CFLAG=-g | 9 | CFLAG=-g |
10 | INSTALL_PREFIX= | ||
11 | OPENSSLDIR= /usr/local/ssl | ||
10 | INSTALLTOP=/usr/local/ssl | 12 | INSTALLTOP=/usr/local/ssl |
11 | MAKE= make -f Makefile.ssl | 13 | MAKE= make -f Makefile.ssl |
12 | MAKEDEPEND= makedepend -f Makefile.ssl | 14 | MAKEDEPEND= $(TOP)/util/domd $(TOP) |
13 | MAKEFILE= Makefile.ssl | 15 | MAKEFILE= Makefile.ssl |
14 | AR= ar r | 16 | AR= ar r |
15 | 17 | ||
@@ -37,24 +39,23 @@ all: lib | |||
37 | 39 | ||
38 | lib: $(LIBOBJ) | 40 | lib: $(LIBOBJ) |
39 | $(AR) $(LIB) $(LIBOBJ) | 41 | $(AR) $(LIB) $(LIBOBJ) |
40 | sh $(TOP)/util/ranlib.sh $(LIB) | 42 | $(RANLIB) $(LIB) |
41 | @touch lib | 43 | @touch lib |
42 | 44 | ||
43 | files: | 45 | files: |
44 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | 46 | $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO |
45 | 47 | ||
46 | links: | 48 | links: |
47 | /bin/rm -f Makefile | 49 | @$(TOP)/util/point.sh Makefile.ssl Makefile |
48 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | 50 | @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) |
49 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | 51 | @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) |
50 | $(TOP)/util/mklink.sh ../../test $(TEST) | 52 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) |
51 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
52 | 53 | ||
53 | install: | 54 | install: |
54 | @for i in $(EXHEADER) ; \ | 55 | @for i in $(EXHEADER) ; \ |
55 | do \ | 56 | do \ |
56 | (cp $$i $(INSTALLTOP)/include/$$i; \ | 57 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ |
57 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | 58 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ |
58 | done; | 59 | done; |
59 | 60 | ||
60 | tags: | 61 | tags: |
@@ -66,15 +67,23 @@ lint: | |||
66 | lint -DLINT $(INCLUDES) $(SRC)>fluff | 67 | lint -DLINT $(INCLUDES) $(SRC)>fluff |
67 | 68 | ||
68 | depend: | 69 | depend: |
69 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | 70 | $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC) |
70 | 71 | ||
71 | dclean: | 72 | dclean: |
72 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | 73 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new |
73 | mv -f Makefile.new $(MAKEFILE) | 74 | mv -f Makefile.new $(MAKEFILE) |
74 | 75 | ||
75 | clean: | 76 | clean: |
76 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | 77 | rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff |
77 | |||
78 | errors: | ||
79 | 78 | ||
80 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 79 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
80 | |||
81 | mdc2_one.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
82 | mdc2_one.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
83 | mdc2_one.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
84 | mdc2_one.o: ../../include/openssl/err.h ../../include/openssl/mdc2.h | ||
85 | mdc2_one.o: ../../include/openssl/opensslconf.h | ||
86 | mdc2_one.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h | ||
87 | mdc2_one.o: ../cryptlib.h | ||
88 | mdc2dgst.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h | ||
89 | mdc2dgst.o: ../../include/openssl/mdc2.h ../../include/openssl/opensslconf.h | ||
diff --git a/src/lib/libcrypto/mdc2/mdc2.h b/src/lib/libcrypto/mdc2/mdc2.h index 0b104be184..ec8e159fc9 100644 --- a/src/lib/libcrypto/mdc2/mdc2.h +++ b/src/lib/libcrypto/mdc2/mdc2.h | |||
@@ -63,7 +63,11 @@ | |||
63 | extern "C" { | 63 | extern "C" { |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #include "des.h" | 66 | #include <openssl/des.h> |
67 | |||
68 | #ifdef NO_MDC2 | ||
69 | #error MDC2 is disabled. | ||
70 | #endif | ||
67 | 71 | ||
68 | #define MDC2_BLOCK 8 | 72 | #define MDC2_BLOCK 8 |
69 | #define MDC2_DIGEST_LENGTH 16 | 73 | #define MDC2_DIGEST_LENGTH 16 |
@@ -76,22 +80,12 @@ typedef struct mdc2_ctx_st | |||
76 | int pad_type; /* either 1 or 2, default 1 */ | 80 | int pad_type; /* either 1 or 2, default 1 */ |
77 | } MDC2_CTX; | 81 | } MDC2_CTX; |
78 | 82 | ||
79 | #ifndef NOPROTO | ||
80 | 83 | ||
81 | void MDC2_Init(MDC2_CTX *c); | 84 | void MDC2_Init(MDC2_CTX *c); |
82 | void MDC2_Update(MDC2_CTX *c, unsigned char *data, unsigned long len); | 85 | void MDC2_Update(MDC2_CTX *c, unsigned char *data, unsigned long len); |
83 | void MDC2_Final(unsigned char *md, MDC2_CTX *c); | 86 | void MDC2_Final(unsigned char *md, MDC2_CTX *c); |
84 | unsigned char *MDC2(unsigned char *d, unsigned long n, unsigned char *md); | 87 | unsigned char *MDC2(unsigned char *d, unsigned long n, unsigned char *md); |
85 | 88 | ||
86 | #else | ||
87 | |||
88 | void MDC2_Init(); | ||
89 | void MDC2_Update(); | ||
90 | void MDC2_Final(); | ||
91 | unsigned char *MDC2(); | ||
92 | |||
93 | #endif | ||
94 | |||
95 | #ifdef __cplusplus | 89 | #ifdef __cplusplus |
96 | } | 90 | } |
97 | #endif | 91 | #endif |