aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-08-16 17:13:14 (GMT)
committerJouni Malinen <j@w1.fi>2009-08-16 17:13:14 (GMT)
commitac73690c06e8c05a9e36483b104a431c26171512 (patch)
treeed7f06db4091c9f1c71fed7e746f9257fd283c99 /hostapd
parent8ef168311557982dd6b88cfcf26453aeb4dad6ac (diff)
downloadhostap-ac73690c06e8c05a9e36483b104a431c26171512.zip
hostap-ac73690c06e8c05a9e36483b104a431c26171512.tar.gz
hostap-ac73690c06e8c05a9e36483b104a431c26171512.tar.bz2
Move RC4 into crypto.h as a replaceable crypto function
This allows crypto library wrappers to override the internal RC4 implementation in the same way as can already be done for other crypto algorithms.
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/Makefile9
-rw-r--r--hostapd/ieee802_11.c2
-rw-r--r--hostapd/ieee802_1x.c2
-rw-r--r--hostapd/wpa.c1
4 files changed, 10 insertions, 4 deletions
diff --git a/hostapd/Makefile b/hostapd/Makefile
index b09d3c3..226f0fc 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -89,7 +89,6 @@ OBJS += ctrl_iface.o
endif
OBJS += ../src/crypto/md5.o
-OBJS += ../src/crypto/rc4.o
AESOBJS = # none so far
@@ -437,6 +436,7 @@ ifdef NEED_FIPS186_2_PRF
OBJS += ../src/crypto/fips_prf_openssl.o
OBJS_p += ../src/crypto/fips_prf_openssl.o
endif
+CONFIG_INTERNAL_RC4=y
endif
ifeq ($(CONFIG_TLS), gnutls)
OBJS += ../src/crypto/crypto_gnutls.o
@@ -447,12 +447,14 @@ OBJS += ../src/crypto/fips_prf_gnutls.o
OBJS_p += ../src/crypto/fips_prf_gnutls.o
endif
CONFIG_INTERNAL_SHA256=y
+CONFIG_INTERNAL_RC4=y
endif
ifeq ($(CONFIG_TLS), internal)
ifeq ($(CONFIG_CRYPTO), libtomcrypt)
OBJS += ../src/crypto/crypto_libtomcrypt.o
OBJS_p += ../src/crypto/crypto_libtomcrypt.o
CONFIG_INTERNAL_SHA256=y
+CONFIG_INTERNAL_RC4=y
endif
ifeq ($(CONFIG_CRYPTO), internal)
OBJS += ../src/crypto/crypto_internal.o ../src/tls/rsa.o ../src/tls/bignum.o
@@ -473,6 +475,7 @@ CONFIG_INTERNAL_SHA1=y
CONFIG_INTERNAL_MD4=y
CONFIG_INTERNAL_MD5=y
CONFIG_INTERNAL_SHA256=y
+CONFIG_INTERNAL_RC4=y
endif
endif
else
@@ -480,6 +483,7 @@ CONFIG_INTERNAL_AES=y
CONFIG_INTERNAL_SHA1=y
CONFIG_INTERNAL_MD5=y
CONFIG_INTERNAL_SHA256=y
+CONFIG_INTERNAL_RC4=y
endif
ifdef CONFIG_INTERNAL_AES
@@ -500,6 +504,9 @@ endif
ifdef CONFIG_INTERNAL_DES
OBJS += ../src/crypto/des-internal.o
endif
+ifdef CONFIG_INTERNAL_RC4
+OBJS += ../src/crypto/rc4.o
+endif
ifdef NEED_SHA256
OBJS += ../src/crypto/sha256.o
diff --git a/hostapd/ieee802_11.c b/hostapd/ieee802_11.c
index 42e1e99..801048b 100644
--- a/hostapd/ieee802_11.c
+++ b/hostapd/ieee802_11.c
@@ -28,7 +28,7 @@
#include "radius/radius_client.h"
#include "ieee802_11_auth.h"
#include "sta_info.h"
-#include "rc4.h"
+#include "crypto.h"
#include "ieee802_1x.h"
#include "wpa.h"
#include "wme.h"
diff --git a/hostapd/ieee802_1x.c b/hostapd/ieee802_1x.c
index 9e26521..0037f62 100644
--- a/hostapd/ieee802_1x.c
+++ b/hostapd/ieee802_1x.c
@@ -21,7 +21,7 @@
#include "radius/radius_client.h"
#include "eapol_sm.h"
#include "md5.h"
-#include "rc4.h"
+#include "crypto.h"
#include "eloop.h"
#include "sta_info.h"
#include "wpa.h"
diff --git a/hostapd/wpa.c b/hostapd/wpa.c
index 5ec7211..e7a179d 100644
--- a/hostapd/wpa.c
+++ b/hostapd/wpa.c
@@ -22,7 +22,6 @@
#include "wpa.h"
#include "sha1.h"
#include "sha256.h"
-#include "rc4.h"
#include "aes_wrap.h"
#include "crypto.h"
#include "eloop.h"