aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-12-05 20:51:08 (GMT)
committerJouni Malinen <j@w1.fi>2009-12-05 20:51:08 (GMT)
commit2d106f21aa342e30710682c0ee5ecad211d11c2a (patch)
tree37fc782328ffc0371bdd4655809fc50ddd1a6035 /src
parent1767f7c11742769254067130058fb2a56be68147 (diff)
downloadhostap-2d106f21aa342e30710682c0ee5ecad211d11c2a.zip
hostap-2d106f21aa342e30710682c0ee5ecad211d11c2a.tar.gz
hostap-2d106f21aa342e30710682c0ee5ecad211d11c2a.tar.bz2
Remove unnecessary defines
The following defines are not really needed in most places, so remove them to clean up source code and build scripts: EAP_TLS_FUNCS EAP_TLS_OPENSSL EAP_TLS_GNUTLS CONFIG_TLS_INTERNAL
Diffstat (limited to 'src')
-rw-r--r--src/crypto/crypto_cryptoapi.c8
-rw-r--r--src/crypto/crypto_internal.c3
-rw-r--r--src/crypto/crypto_libtomcrypt.c7
-rw-r--r--src/eapol_supp/eapol_supp_sm.c2
-rw-r--r--src/eapol_supp/eapol_supp_sm.h2
-rw-r--r--src/tls/rsa.c2
-rw-r--r--src/utils/build_config.h6
7 files changed, 0 insertions, 30 deletions
diff --git a/src/crypto/crypto_cryptoapi.c b/src/crypto/crypto_cryptoapi.c
index aef8d45..568fe0f 100644
--- a/src/crypto/crypto_cryptoapi.c
+++ b/src/crypto/crypto_cryptoapi.c
@@ -33,7 +33,6 @@ L"Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)"
#define CALG_HMAC (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_HMAC)
#endif
-#ifdef CONFIG_TLS_INTERNAL
#ifdef __MINGW32_VERSION
/*
* MinGW does not yet include all the needed definitions for CryptoAPI, so
@@ -98,7 +97,6 @@ static int mingw_load_crypto_func(void)
}
#endif /* __MINGW32_VERSION */
-#endif /* CONFIG_TLS_INTERNAL */
static void cryptoapi_report_error(const char *msg)
@@ -238,7 +236,6 @@ void des_encrypt(const u8 *clear, const u8 *key, u8 *cypher)
}
-#ifdef EAP_TLS_FUNCS
int md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
{
return cryptoapi_hash_vector(CALG_MD5, 16, num_elem, addr, len, mac);
@@ -364,7 +361,6 @@ void aes_decrypt_deinit(void *ctx)
aes_encrypt_deinit(ctx);
}
-#ifdef CONFIG_TLS_INTERNAL
struct crypto_hash {
enum crypto_hash_alg alg;
@@ -796,7 +792,3 @@ int crypto_global_init(void)
void crypto_global_deinit(void)
{
}
-
-#endif /* CONFIG_TLS_INTERNAL */
-
-#endif /* EAP_TLS_FUNCS */
diff --git a/src/crypto/crypto_internal.c b/src/crypto/crypto_internal.c
index 34b43ae..84d30bb 100644
--- a/src/crypto/crypto_internal.c
+++ b/src/crypto/crypto_internal.c
@@ -27,8 +27,6 @@
#include "md5_i.h"
#include "des_i.h"
-#ifdef CONFIG_TLS_INTERNAL
-
struct crypto_hash {
enum crypto_hash_alg alg;
union {
@@ -543,7 +541,6 @@ int crypto_global_init(void)
void crypto_global_deinit(void)
{
}
-#endif /* CONFIG_TLS_INTERNAL */
#ifdef CONFIG_MODEXP
diff --git a/src/crypto/crypto_libtomcrypt.c b/src/crypto/crypto_libtomcrypt.c
index 22ebce8..52b67a7 100644
--- a/src/crypto/crypto_libtomcrypt.c
+++ b/src/crypto/crypto_libtomcrypt.c
@@ -62,7 +62,6 @@ void des_encrypt(const u8 *clear, const u8 *key, u8 *cypher)
}
-#ifdef EAP_TLS_FUNCS
int md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
{
hash_state md;
@@ -147,8 +146,6 @@ void aes_decrypt_deinit(void *ctx)
}
-#ifdef CONFIG_TLS_INTERNAL
-
struct crypto_hash {
enum crypto_hash_alg alg;
int error;
@@ -733,7 +730,3 @@ fail:
}
#endif /* CONFIG_MODEXP */
-
-#endif /* CONFIG_TLS_INTERNAL */
-
-#endif /* EAP_TLS_FUNCS */
diff --git a/src/eapol_supp/eapol_supp_sm.c b/src/eapol_supp/eapol_supp_sm.c
index 01f0ec1..77cd564 100644
--- a/src/eapol_supp/eapol_supp_sm.c
+++ b/src/eapol_supp/eapol_supp_sm.c
@@ -1854,11 +1854,9 @@ struct eapol_sm *eapol_sm_init(struct eapol_ctx *ctx)
sm->authPeriod = 30;
os_memset(&conf, 0, sizeof(conf));
-#ifdef EAP_TLS_OPENSSL
conf.opensc_engine_path = ctx->opensc_engine_path;
conf.pkcs11_engine_path = ctx->pkcs11_engine_path;
conf.pkcs11_module_path = ctx->pkcs11_module_path;
-#endif /* EAP_TLS_OPENSSL */
conf.wps = ctx->wps;
sm->eap = eap_peer_sm_init(sm, &eapol_cb, sm->ctx->msg_ctx, &conf);
diff --git a/src/eapol_supp/eapol_supp_sm.h b/src/eapol_supp/eapol_supp_sm.h
index 00fc886..1d2a32b 100644
--- a/src/eapol_supp/eapol_supp_sm.h
+++ b/src/eapol_supp/eapol_supp_sm.h
@@ -173,7 +173,6 @@ struct eapol_ctx {
*/
void (*aborted_cached)(void *ctx);
-#ifdef EAP_TLS_OPENSSL
/**
* opensc_engine_path - Path to the OpenSSL engine for opensc
*
@@ -198,7 +197,6 @@ struct eapol_ctx {
* module is not loaded.
*/
const char *pkcs11_module_path;
-#endif /* EAP_TLS_OPENSSL */
/**
* wps - WPS context data
diff --git a/src/tls/rsa.c b/src/tls/rsa.c
index 03676ba..3084adc 100644
--- a/src/tls/rsa.c
+++ b/src/tls/rsa.c
@@ -34,7 +34,6 @@ struct crypto_rsa_key {
};
-#ifdef EAP_TLS_FUNCS
static const u8 * crypto_rsa_parse_integer(const u8 *pos, const u8 *end,
struct bignum *num)
{
@@ -223,7 +222,6 @@ error:
crypto_rsa_free(key);
return NULL;
}
-#endif /* EAP_TLS_FUNCS */
/**
diff --git a/src/utils/build_config.h b/src/utils/build_config.h
index 0e1d4dc..7f54b04 100644
--- a/src/utils/build_config.h
+++ b/src/utils/build_config.h
@@ -28,7 +28,6 @@
#define CONFIG_ANSI_C_EXTRA
#define CONFIG_WINPCAP
#define IEEE8021X_EAPOL
-#define EAP_TLS_FUNCS
#define PKCS12_FUNCS
#define PCSC_FUNCS
#define CONFIG_CTRL_IFACE
@@ -48,7 +47,6 @@
#define _CRT_SECURE_NO_DEPRECATE
#ifdef USE_INTERNAL_CRYPTO
-#define CONFIG_TLS_INTERNAL
#define CONFIG_TLS_INTERNAL_CLIENT
#define CONFIG_INTERNAL_LIBTOMMATH
#define CONFIG_INTERNAL_X509
@@ -65,8 +63,6 @@
#define CONFIG_BACKEND_FILE
#define CONFIG_INTERNAL_LIBTOMMATH
#define CONFIG_INTERNAL_X509
-#define EAP_TLS_FUNCS
-#define CONFIG_TLS_INTERNAL
#define CONFIG_CRYPTO_INTERNAL
#define IEEE8021X_EAPOL
#define PKCS12_FUNCS
@@ -85,7 +81,6 @@
#define CONFIG_DRIVER_OSX
#define CONFIG_BACKEND_FILE
#define IEEE8021X_EAPOL
-#define EAP_TLS_FUNCS
#define PKCS12_FUNCS
#define CONFIG_CTRL_IFACE
#define CONFIG_CTRL_IFACE_UNIX
@@ -103,7 +98,6 @@
#define EAP_WSC
#ifdef USE_INTERNAL_CRYPTO
-#define CONFIG_TLS_INTERNAL
#define CONFIG_TLS_INTERNAL_CLIENT
#define CONFIG_INTERNAL_LIBTOMMATH
#define CONFIG_INTERNAL_X509