Obey $(PERL) when running util/mklink.pl.
[openssl.git] / crypto / des / destest.c
index 746a284d43680e483aa2a01e60266a2a54f249b2..107635fcecb4b97b52b439d0e5128b1eec6db243 100644 (file)
 #include <io.h>
 #endif
 #include <string.h>
-#include "des.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__)
 #define crypt(c,s) (des_crypt((c),(s)))
@@ -301,18 +309,10 @@ static unsigned char ofb_cipher[24]=
 DES_LONG cbc_cksum_ret=0xB462FEF7L;
 unsigned char cbc_cksum_data[8]={0x1D,0x26,0x93,0x97,0xf7,0xfe,0x62,0xb4};
 
-#ifndef NOPROTO
 static char *pt(unsigned char *p);
 static int cfb_test(int bits, unsigned char *cfb_cipher);
 static int cfb64_test(unsigned char *cfb_cipher);
 static int ede_cfb64_test(unsigned char *cfb_cipher);
-#else
-static char *pt();
-static int cfb_test();
-static int cfb64_test();
-static int ede_cfb64_test();
-#endif
-
 int main(int argc, char *argv[])
        {
        int i,j,err=0;
@@ -326,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)
                {
@@ -376,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++)
@@ -916,4 +917,4 @@ static int ede_cfb64_test(unsigned char *cfb_cipher)
        }
 
 #endif
-
+#endif