summaryrefslogtreecommitdiffstats
path: root/crypto/des
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>1999-04-27 01:14:46 +0000
committerUlf Möller <ulf@openssl.org>1999-04-27 01:14:46 +0000
commitf5d7a031a3c3e7b1700a67d6dc19daf3718ce6ee (patch)
treef5db72824de4586c35cef513ed48aff0d4b69a6b /crypto/des
parentb64f825671861144e1c24f2a5498a95a083021cd (diff)
New Configure option no-<cipher> (rsa, idea, rc5, ...).
Diffstat (limited to 'crypto/des')
-rw-r--r--crypto/des/Makefile.ssl2
-rw-r--r--crypto/des/des.h4
-rw-r--r--crypto/des/destest.c13
-rw-r--r--crypto/des/ede_cbcm_enc.c2
4 files changed, 18 insertions, 3 deletions
diff --git a/crypto/des/Makefile.ssl b/crypto/des/Makefile.ssl
index 9bb5575ead..f243a90ddd 100644
--- a/crypto/des/Makefile.ssl
+++ b/crypto/des/Makefile.ssl
@@ -123,7 +123,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/des/des.h b/crypto/des/des.h
index 18ceaa2a25..392d8bbea0 100644
--- a/crypto/des/des.h
+++ b/crypto/des/des.h
@@ -63,6 +63,10 @@
extern "C" {
#endif
+#ifdef NO_DES
+#error DES is disabled.
+#endif
+
#include <stdio.h>
#include <openssl/opensslconf.h> /* DES_LONG */
diff --git a/crypto/des/destest.c b/crypto/des/destest.c
index 6b67e34cef..107635fcec 100644
--- a/crypto/des/destest.c
+++ b/crypto/des/destest.c
@@ -70,6 +70,14 @@
#include <io.h>
#endif
#include <string.h>
+
+#ifdef NO_DES
+int main(int argc, char *argv[])
+{
+ printf("No DES support\n");
+ return(0);
+}
+#else
#include <openssl/des.h>
#if defined(PERL5) || defined(__FreeBSD__)
@@ -318,6 +326,7 @@ int main(int argc, char *argv[])
int num;
char *str;
+#ifndef NO_DESCBCM
printf("Doing cbcm\n");
if ((j=des_key_sched(cbc_key,ks)) != 0)
{
@@ -368,7 +377,7 @@ int main(int argc, char *argv[])
printf("\n");
err=1;
}
-
+#endif
printf("Doing ecb\n");
for (i=0; i<NUM_TESTS; i++)
@@ -908,4 +917,4 @@ static int ede_cfb64_test(unsigned char *cfb_cipher)
}
#endif
-
+#endif
diff --git a/crypto/des/ede_cbcm_enc.c b/crypto/des/ede_cbcm_enc.c
index 82ef96188c..302e32ef48 100644
--- a/crypto/des/ede_cbcm_enc.c
+++ b/crypto/des/ede_cbcm_enc.c
@@ -68,6 +68,7 @@ http://www.cs.technion.ac.il/users/wwwb/cgi-bin/tr-get.cgi/1998/CS/CS0928.ps.gz
*/
+#ifndef NO_DESCBCM
#include "des_locl.h"
void des_ede3_cbcm_encrypt(const unsigned char *in, unsigned char *out,
@@ -192,3 +193,4 @@ void des_ede3_cbcm_encrypt(const unsigned char *in, unsigned char *out,
tin0=tin1=tout0=tout1=xor0=xor1=0;
tin[0]=tin[1]=0;
}
+#endif