summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/mdc2
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/mdc2')
-rw-r--r--src/lib/libcrypto/mdc2/Makefile.ssl39
-rw-r--r--src/lib/libcrypto/mdc2/mdc2.h16
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= ../..
7CC= cc 7CC= cc
8INCLUDES= 8INCLUDES=
9CFLAG=-g 9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
10INSTALLTOP=/usr/local/ssl 12INSTALLTOP=/usr/local/ssl
11MAKE= make -f Makefile.ssl 13MAKE= make -f Makefile.ssl
12MAKEDEPEND= makedepend -f Makefile.ssl 14MAKEDEPEND= $(TOP)/util/domd $(TOP)
13MAKEFILE= Makefile.ssl 15MAKEFILE= Makefile.ssl
14AR= ar r 16AR= ar r
15 17
@@ -37,24 +39,23 @@ all: lib
37 39
38lib: $(LIBOBJ) 40lib: $(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
43files: 45files:
44 perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO 46 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
45 47
46links: 48links:
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
53install: 54install:
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
60tags: 61tags:
@@ -66,15 +67,23 @@ lint:
66 lint -DLINT $(INCLUDES) $(SRC)>fluff 67 lint -DLINT $(INCLUDES) $(SRC)>fluff
67 68
68depend: 69depend:
69 $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) 70 $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
70 71
71dclean: 72dclean:
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
75clean: 76clean:
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
78errors:
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
81mdc2_one.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
82mdc2_one.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
83mdc2_one.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
84mdc2_one.o: ../../include/openssl/err.h ../../include/openssl/mdc2.h
85mdc2_one.o: ../../include/openssl/opensslconf.h
86mdc2_one.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
87mdc2_one.o: ../cryptlib.h
88mdc2dgst.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
89mdc2dgst.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 @@
63extern "C" { 63extern "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
81void MDC2_Init(MDC2_CTX *c); 84void MDC2_Init(MDC2_CTX *c);
82void MDC2_Update(MDC2_CTX *c, unsigned char *data, unsigned long len); 85void MDC2_Update(MDC2_CTX *c, unsigned char *data, unsigned long len);
83void MDC2_Final(unsigned char *md, MDC2_CTX *c); 86void MDC2_Final(unsigned char *md, MDC2_CTX *c);
84unsigned char *MDC2(unsigned char *d, unsigned long n, unsigned char *md); 87unsigned char *MDC2(unsigned char *d, unsigned long n, unsigned char *md);
85 88
86#else
87
88void MDC2_Init();
89void MDC2_Update();
90void MDC2_Final();
91unsigned char *MDC2();
92
93#endif
94
95#ifdef __cplusplus 89#ifdef __cplusplus
96} 90}
97#endif 91#endif