aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-28 18:27:02 (GMT)
committerJouni Malinen <j@w1.fi>2009-07-28 18:27:02 (GMT)
commitbd4e28950d8141a8dd82da26e5ea6336437bd09c (patch)
tree5c1a7a95115b93b4c99a0b9fe4ce568017621dcc
parent598a792d8cd822fc0c7ac7d7be58cbf66d22e83c (diff)
downloadhostap-bd4e28950d8141a8dd82da26e5ea6336437bd09c.zip
hostap-bd4e28950d8141a8dd82da26e5ea6336437bd09c.tar.gz
hostap-bd4e28950d8141a8dd82da26e5ea6336437bd09c.tar.bz2
Crypto build cleanup: remove INTERNAL_MD4
In addition, rename md4.c to md4-internal.c to match in style with SHA-1 conditionally built internal implementation.
-rw-r--r--eap_example/Makefile3
-rw-r--r--hostapd/Makefile3
-rw-r--r--src/crypto/md4-internal.c (renamed from src/crypto/md4.c)5
-rw-r--r--src/utils/build_config.h2
-rw-r--r--wpa_supplicant/Makefile10
-rw-r--r--wpa_supplicant/symbian/wpa_supplicant.mmp2
-rwxr-xr-xwpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj4
-rwxr-xr-xwpa_supplicant/vs2005/wpasvc/wpasvc.vcproj4
8 files changed, 9 insertions, 24 deletions
diff --git a/eap_example/Makefile b/eap_example/Makefile
index 2abe171..80cd003 100644
--- a/eap_example/Makefile
+++ b/eap_example/Makefile
@@ -33,7 +33,7 @@ OBJS_both += ../src/utils/base64.o
OBJS_both += ../src/utils/wpabuf.o
OBJS_both += ../src/crypto/md5.o
OBJS_both += ../src/crypto/rc4.o
-OBJS_both += ../src/crypto/md4.o
+OBJS_both += ../src/crypto/md4-internal.o
OBJS_both += ../src/crypto/sha1.o
OBJS_both += ../src/crypto/aes_wrap.o
OBJS_both += ../src/crypto/ms_funcs.o
@@ -126,7 +126,6 @@ CFLAGS += -DCONFIG_CRYPTO_INTERNAL
CFLAGS += -DCONFIG_INTERNAL_X509
CONFIG_INTERNAL_SHA256=y
CFLAGS += -DINTERNAL_MD5
-CFLAGS += -DINTERNAL_MD4
ifdef CONFIG_INTERNAL_LIBTOMMATH
CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH
else
diff --git a/hostapd/Makefile b/hostapd/Makefile
index 00e9f60..e7aa3d7 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -88,7 +88,6 @@ endif
OBJS += ../src/crypto/md5.o
OBJS += ../src/crypto/rc4.o
-OBJS += ../src/crypto/md4.o
OBJS += ../src/crypto/sha1.o
AESOBJS = ../src/crypto/aes_wrap.o
@@ -538,7 +537,7 @@ ifdef CONFIG_INTERNAL_MD5
CFLAGS += -DINTERNAL_MD5
endif
ifdef CONFIG_INTERNAL_MD4
-CFLAGS += -DINTERNAL_MD4
+OBJS += ../src/crypto/md4-internal.o
endif
ifdef CONFIG_INTERNAL_DES
OBJS += ../src/crypto/des-internal.o
diff --git a/src/crypto/md4.c b/src/crypto/md4-internal.c
index 41c84a3..872872d 100644
--- a/src/crypto/md4.c
+++ b/src/crypto/md4-internal.c
@@ -17,9 +17,6 @@
#include "common.h"
#include "crypto.h"
-
-#ifdef INTERNAL_MD4
-
#define MD4_BLOCK_LENGTH 64
#define MD4_DIGEST_LENGTH 16
@@ -278,5 +275,3 @@ MD4Transform(u32 state[4], const u8 block[MD4_BLOCK_LENGTH])
state[3] += d;
}
/* ===== end - public domain MD4 implementation ===== */
-
-#endif /* INTERNAL_MD4 */
diff --git a/src/utils/build_config.h b/src/utils/build_config.h
index 9289073..544ab02 100644
--- a/src/utils/build_config.h
+++ b/src/utils/build_config.h
@@ -52,7 +52,6 @@
#define CONFIG_TLS_INTERNAL_CLIENT
#define CONFIG_INTERNAL_LIBTOMMATH
#define INTERNAL_MD5
-#define INTERNAL_MD4
#define CONFIG_INTERNAL_X509
#define CONFIG_CRYPTO_INTERNAL
#endif /* USE_INTERNAL_CRYPTO */
@@ -66,7 +65,6 @@
#define CONFIG_NO_STDOUT_DEBUG
#define CONFIG_BACKEND_FILE
#define INTERNAL_MD5
-#define INTERNAL_MD4
#define CONFIG_INTERNAL_LIBTOMMATH
#define CONFIG_INTERNAL_X509
#define EAP_TLS_FUNCS
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index bd42025..b435860 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -45,6 +45,7 @@ SHA1OBJS = ../src/crypto/sha1.o
DESOBJS = # none needed when not internal
AESOBJS = ../src/crypto/aes_wrap.o
SHA256OBJS = # none by default
+MD4OBJS = # none by default
OBJS = config.o
@@ -53,12 +54,10 @@ OBJS += ../src/utils/wpa_debug.o
OBJS += ../src/utils/wpabuf.o
OBJS += ../src/crypto/md5.o
OBJS += ../src/crypto/rc4.o
-OBJS += ../src/crypto/md4.o
OBJS_p = wpa_passphrase.o
OBJS_p += ../src/utils/common.o
OBJS_p += ../src/utils/wpa_debug.o
OBJS_p += ../src/crypto/md5.o
-OBJS_p += ../src/crypto/md4.o
OBJS_c = wpa_cli.o ../src/common/wpa_ctrl.o
-include .config
@@ -914,8 +913,11 @@ ifdef CONFIG_INTERNAL_MD5
CFLAGS += -DINTERNAL_MD5
endif
ifdef CONFIG_INTERNAL_MD4
-CFLAGS += -DINTERNAL_MD4
+MD4OBJS += ../src/crypto/md4-internal.o
endif
+OBJS += $(MD4OBJS)
+OBJS_p += $(MD4OBJS)
+
ifdef CONFIG_INTERNAL_DES
DESOBJS += ../src/crypto/des-internal.o
endif
@@ -1328,7 +1330,7 @@ test-eap_sim_common: $(TEST_EAP_SIM_COMMON_OBJS)
./test-eap_sim_common
rm test-eap_sim_common
-TEST_MD4_OBJS = ../src/crypto/md4.o tests/test_md4.o #../src/crypto/crypto_openssl.o
+TEST_MD4_OBJS = ../src/crypto/md4-internal.o tests/test_md4.o #../src/crypto/crypto_openssl.o
test-md4: $(TEST_MD4_OBJS)
$(LDO) $(LDFLAGS) -o $@ $(TEST_MD4_OBJS) $(LIBS)
./test-md4
diff --git a/wpa_supplicant/symbian/wpa_supplicant.mmp b/wpa_supplicant/symbian/wpa_supplicant.mmp
index fad9626..4072756 100644
--- a/wpa_supplicant/symbian/wpa_supplicant.mmp
+++ b/wpa_supplicant/symbian/wpa_supplicant.mmp
@@ -21,7 +21,7 @@ SOURCE wpa_common.c
SOURCEPATH ..\..\src\utils
SOURCE os_none.c common.c wpa_debug.c eloop_none.c base64.c
SOURCEPATH ..\..\src\crypto
-SOURCE sha1.c md5.c rc4.c md4.c des.c aes_wrap.c aes.c ms_funcs.c
+SOURCE sha1.c md5.c rc4.c des.c aes_wrap.c aes.c ms_funcs.c
SOURCE tls_internal.c crypto_internal.c
SOURCEPATH ..\..\src\tls
SOURCE asn1.c bignum.c rsa.c x509v3.c tlsv1_client.c tlsv1_common.c
diff --git a/wpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj b/wpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj
index a733fea..0920db1 100755
--- a/wpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj
+++ b/wpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj
@@ -311,10 +311,6 @@
>
</File>
<File
- RelativePath="..\..\..\src\crypto\md4.c"
- >
- </File>
- <File
RelativePath="..\..\..\src\crypto\md5.c"
>
</File>
diff --git a/wpa_supplicant/vs2005/wpasvc/wpasvc.vcproj b/wpa_supplicant/vs2005/wpasvc/wpasvc.vcproj
index 9f9e438..052f5a4 100755
--- a/wpa_supplicant/vs2005/wpasvc/wpasvc.vcproj
+++ b/wpa_supplicant/vs2005/wpasvc/wpasvc.vcproj
@@ -311,10 +311,6 @@
>
</File>
<File
- RelativePath="..\..\..\src\crypto\md4.c"
- >
- </File>
- <File
RelativePath="..\..\..\src\crypto\md5.c"
>
</File>