CFLAGS += -DEAP_PAX
CFLAGS += -DEAP_SAKE
CFLAGS += -DEAP_GPSK -DEAP_GPSK_SHA256
-CFLAGS += -DEAP_TLS_FUNCS
CFLAGS += -DEAP_SERVER_TLS
CFLAGS += -DEAP_SERVER_PEAP
CFLAGS += -DIEEE8021X_EAPOL
ifeq ($(CONFIG_TLS), openssl)
-CFLAGS += -DEAP_TLS_OPENSSL
OBJS_both += ../src/crypto/tls_openssl.o
OBJS_both += ../src/crypto/crypto_openssl.o
LIBS += -lssl -lcrypto
endif
ifeq ($(CONFIG_TLS), gnutls)
-CFLAGS += -DEAP_TLS_GNUTLS
OBJS_both += ../src/crypto/tls_gnutls.o
OBJS_both += ../src/crypto/crypto_gnutls.o
LIBS += -lgnutls -lgcrypt
#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
}
#endif /* __MINGW32_VERSION */
-#endif /* CONFIG_TLS_INTERNAL */
static void cryptoapi_report_error(const char *msg)
}
-#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);
aes_encrypt_deinit(ctx);
}
-#ifdef CONFIG_TLS_INTERNAL
struct crypto_hash {
enum crypto_hash_alg alg;
void crypto_global_deinit(void)
{
}
-
-#endif /* CONFIG_TLS_INTERNAL */
-
-#endif /* EAP_TLS_FUNCS */
#include "md5_i.h"
#include "des_i.h"
-#ifdef CONFIG_TLS_INTERNAL
-
struct crypto_hash {
enum crypto_hash_alg alg;
union {
void crypto_global_deinit(void)
{
}
-#endif /* CONFIG_TLS_INTERNAL */
#ifdef CONFIG_MODEXP
}
-#ifdef EAP_TLS_FUNCS
int md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
{
hash_state md;
}
-#ifdef CONFIG_TLS_INTERNAL
-
struct crypto_hash {
enum crypto_hash_alg alg;
int error;
}
#endif /* CONFIG_MODEXP */
-
-#endif /* CONFIG_TLS_INTERNAL */
-
-#endif /* EAP_TLS_FUNCS */
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);
*/
void (*aborted_cached)(void *ctx);
-#ifdef EAP_TLS_OPENSSL
/**
* opensc_engine_path - Path to the OpenSSL engine for opensc
*
* module is not loaded.
*/
const char *pkcs11_module_path;
-#endif /* EAP_TLS_OPENSSL */
/**
* wps - WPS context data
};
-#ifdef EAP_TLS_FUNCS
static const u8 * crypto_rsa_parse_integer(const u8 *pos, const u8 *end,
struct bignum *num)
{
crypto_rsa_free(key);
return NULL;
}
-#endif /* EAP_TLS_FUNCS */
/**
#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
#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
#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
#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
#define EAP_WSC
#ifdef USE_INTERNAL_CRYPTO
-#define CONFIG_TLS_INTERNAL
#define CONFIG_TLS_INTERNAL_CLIENT
#define CONFIG_INTERNAL_LIBTOMMATH
#define CONFIG_INTERNAL_X509
ifdef TLS_FUNCS
NEED_DES=y
# Shared TLS functions (needed for EAP_TLS, EAP_PEAP, EAP_TTLS, and EAP_FAST)
-CFLAGS += -DEAP_TLS_FUNCS
OBJS += ../src/eap_peer/eap_tls_common.o
OBJS_h += ../src/eap_server/eap_tls_common.o
NEED_TLS_PRF=y
NEED_BASE64=y
NEED_TLS_PRF=y
NEED_MODEXP=y
-CFLAGS += -DCONFIG_TLS_INTERNAL
CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT
endif
ifdef NEED_MODEXP
os_free(config->ctrl_interface);
os_free(config->ctrl_interface_group);
-#ifdef EAP_TLS_OPENSSL
os_free(config->opensc_engine_path);
os_free(config->pkcs11_engine_path);
os_free(config->pkcs11_module_path);
-#endif /* EAP_TLS_OPENSSL */
os_free(config->driver_param);
os_free(config->device_name);
os_free(config->manufacturer);
*/
int fast_reauth;
-#ifdef EAP_TLS_OPENSSL
/**
* opensc_engine_path - Path to the OpenSSL engine for opensc
*
* module is not loaded.
*/
char *pkcs11_module_path;
-#endif /* EAP_TLS_OPENSSL */
/**
* driver_param - Driver interface parameters
{ INT_RANGE(eapol_version, 1, 2) },
{ INT(ap_scan) },
{ INT(fast_reauth) },
-#ifdef EAP_TLS_OPENSSL
{ STR(opensc_engine_path) },
{ STR(pkcs11_engine_path) },
{ STR(pkcs11_module_path) },
-#endif /* EAP_TLS_OPENSSL */
{ STR(driver_param) },
{ INT(dot11RSNAConfigPMKLifetime) },
{ INT(dot11RSNAConfigPMKReauthThreshold) },
fprintf(f, "ap_scan=%d\n", config->ap_scan);
if (config->fast_reauth != DEFAULT_FAST_REAUTH)
fprintf(f, "fast_reauth=%d\n", config->fast_reauth);
-#ifdef EAP_TLS_OPENSSL
if (config->opensc_engine_path)
fprintf(f, "opensc_engine_path=%s\n",
config->opensc_engine_path);
if (config->pkcs11_module_path)
fprintf(f, "pkcs11_module_path=%s\n",
config->pkcs11_module_path);
-#endif /* EAP_TLS_OPENSSL */
if (config->driver_param)
fprintf(f, "driver_param=%s\n", config->driver_param);
if (config->dot11RSNAConfigPMKLifetime)
wpa_dbus_dict_entry_clear(&entry);
}
-#ifdef EAP_TLS_OPENSSL
os_free(wpa_s->conf->opensc_engine_path);
wpa_s->conf->opensc_engine_path = opensc_engine_path;
os_free(wpa_s->conf->pkcs11_engine_path);
wpa_s->conf->pkcs11_engine_path = pkcs11_engine_path;
os_free(wpa_s->conf->pkcs11_module_path);
wpa_s->conf->pkcs11_module_path = pkcs11_module_path;
-#endif /* EAP_TLS_OPENSSL */
wpa_sm_set_eapol(wpa_s->wpa, NULL);
eapol_sm_deinit(wpa_s->eapol);
ctx->eapol_send = eapol_test_eapol_send;
ctx->set_config_blob = eapol_test_set_config_blob;
ctx->get_config_blob = eapol_test_get_config_blob;
-#ifdef EAP_TLS_OPENSSL
ctx->opensc_engine_path = wpa_s->conf->opensc_engine_path;
ctx->pkcs11_engine_path = wpa_s->conf->pkcs11_engine_path;
ctx->pkcs11_module_path = wpa_s->conf->pkcs11_module_path;
-#endif /* EAP_TLS_OPENSSL */
wpa_s->eapol = eapol_sm_init(ctx);
if (wpa_s->eapol == NULL) {
CFLAGS = $(CFLAGS) /DCONFIG_ANSI_C_EXTRA
CFLAGS = $(CFLAGS) /DCONFIG_WINPCAP
CFLAGS = $(CFLAGS) /DIEEE8021X_EAPOL
-CFLAGS = $(CFLAGS) /DEAP_TLS_FUNCS
CFLAGS = $(CFLAGS) /DPKCS12_FUNCS
CFLAGS = $(CFLAGS) /DEAP_MD5
CFLAGS = $(CFLAGS) /DEAP_TLS
ctx->set_config_blob = wpa_supplicant_set_config_blob;
ctx->get_config_blob = wpa_supplicant_get_config_blob;
ctx->aborted_cached = wpa_supplicant_aborted_cached;
-#ifdef EAP_TLS_OPENSSL
ctx->opensc_engine_path = wpa_s->conf->opensc_engine_path;
ctx->pkcs11_engine_path = wpa_s->conf->pkcs11_engine_path;
ctx->pkcs11_module_path = wpa_s->conf->pkcs11_module_path;
-#endif /* EAP_TLS_OPENSSL */
ctx->wps = wpa_s->wps;
ctx->eap_param_needed = wpa_supplicant_eap_param_needed;
ctx->port_cb = wpa_supplicant_port_cb;