summaryrefslogtreecommitdiffstats
path: root/crypto/mdc2
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/mdc2')
-rw-r--r--crypto/mdc2/Makefile.ssl2
-rw-r--r--crypto/mdc2/mdc2.h4
-rw-r--r--crypto/mdc2/mdc2test.c14
3 files changed, 18 insertions, 2 deletions
diff --git a/crypto/mdc2/Makefile.ssl b/crypto/mdc2/Makefile.ssl
index 924a8b3fbe..eb0f0d627e 100644
--- a/crypto/mdc2/Makefile.ssl
+++ b/crypto/mdc2/Makefile.ssl
@@ -65,7 +65,7 @@ lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
depend:
- $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
+ $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
dclean:
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
diff --git a/crypto/mdc2/mdc2.h b/crypto/mdc2/mdc2.h
index 39a6c9e9ff..ec8e159fc9 100644
--- a/crypto/mdc2/mdc2.h
+++ b/crypto/mdc2/mdc2.h
@@ -65,6 +65,10 @@ extern "C" {
#include <openssl/des.h>
+#ifdef NO_MDC2
+#error MDC2 is disabled.
+#endif
+
#define MDC2_BLOCK 8
#define MDC2_DIGEST_LENGTH 16
diff --git a/crypto/mdc2/mdc2test.c b/crypto/mdc2/mdc2test.c
index f627162988..6fc6c0ed00 100644
--- a/crypto/mdc2/mdc2test.c
+++ b/crypto/mdc2/mdc2test.c
@@ -59,6 +59,18 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
+#ifdef NO_DES
+#define NO_MDC2
+#endif
+
+#ifdef NO_MDC2
+int main(int argc, char *argv[])
+{
+ printf("No MDC2 support\n");
+ return(0);
+}
+#else
#include <openssl/mdc2.h>
static unsigned char pad1[16]={
@@ -117,4 +129,4 @@ int main(int argc, char *argv[])
exit(ret);
return(ret);
}
-
+#endif