Fix no-hmac and no-ripemd.
authorUlf Möller <ulf@openssl.org>
Tue, 29 Jun 1999 23:52:08 +0000 (23:52 +0000)
committerUlf Möller <ulf@openssl.org>
Tue, 29 Jun 1999 23:52:08 +0000 (23:52 +0000)
apps/speed.c
config
crypto/evp/m_ripemd.c
crypto/evp/p5_crpt2.c
crypto/pkcs12/p12_mutl.c

index d865bfb5f0ccf388c8bdd6f999f226a287d22dde..d36924593690e67c5a7d7bfeb501e89d66b7d75e 100644 (file)
@@ -239,7 +239,6 @@ static double Time_F(int s)
 int MAIN(int argc, char **argv)
        {
        unsigned char *buf=NULL,*buf2=NULL;
-       des_cblock *buf_as_des_cblock = NULL;
        int ret=1;
 #define ALGOR_NUM      14
 #define SIZE_NUM       5
@@ -286,6 +285,7 @@ int MAIN(int argc, char **argv)
                 0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12};
        unsigned char iv[8];
 #ifndef NO_DES
+       des_cblock *buf_as_des_cblock = NULL;
        static des_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0};
        static des_cblock key2={0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12};
        static des_cblock key3={0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34};
@@ -361,7 +361,9 @@ int MAIN(int argc, char **argv)
                BIO_printf(bio_err,"out of memory\n");
                goto end;
                }
+#ifndef NO_DES
        buf_as_des_cblock = (des_cblock *)buf;
+#endif
        if ((buf2=(unsigned char *)Malloc((int)BUFSIZE)) == NULL)
                {
                BIO_printf(bio_err,"out of memory\n");
diff --git a/config b/config
index 63ddfbfe34159b861c8149a1b4ad11eaf1a50f99..af3ae9ae1199db59768a601979911a679ccde377 100755 (executable)
--- a/config
+++ b/config
@@ -365,7 +365,7 @@ case "$GUESSOS" in
   i386-*) options="$options 386" ;;
 esac
 
-for i in bf cast des dh dsa hmac md2 md5 mdc2 rc2 rc4 rc5 rsa sha
+for i in bf cast des dh dsa hmac md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa sha
 do
   if [ ! -d crypto/$i ]
   then
index 87619ed8c78fc1b2f83c68d9b261c7b849011068..3d781a4e8df6dabea4dd1529e59981d39d8c7801 100644 (file)
  * [including the GNU Public Licence.]
  */
 
+#ifndef NO_RIPEMD
 #include <stdio.h>
 #include "cryptlib.h"
+#include <openssl/ripemd.h>
 #include <openssl/evp.h>
 #include <openssl/objects.h>
 #include <openssl/x509.h>
@@ -79,3 +81,4 @@ EVP_MD *EVP_ripemd160(void)
        {
        return(&ripemd160_md);
        }
+#endif
index ef3f941a7e5f5c593ca38860a19ebad09ceca01e..dd23bd24e431b24999db23242680f581d1b991c3 100644 (file)
@@ -55,6 +55,7 @@
  * Hudson (tjh@cryptsoft.com).
  *
  */
+#if !defined(NO_HMAC) && !defined(NO_SHA)
 #include <stdio.h>
 #include <stdlib.h>
 #include <openssl/x509.h>
@@ -218,4 +219,4 @@ int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
        PBKDF2PARAM_free(kdf);
        return 0;
 }
-
+#endif
index d1c35ea05aa501c949a983e60df76a6711aa540e..bac558d6b9a49a18fc9ea4a9da2cdf683c8e0a2b 100644 (file)
@@ -56,6 +56,7 @@
  *
  */
 
+#ifndef NO_HMAC
 #include <stdio.h>
 #include "cryptlib.h"
 #include <openssl/hmac.h>
@@ -166,3 +167,4 @@ int PKCS12_setup_mac (PKCS12 *p12, int iter, unsigned char *salt, int saltlen,
        
        return 1;
 }
+#endif