From a0d2ad9bdb9ce04037f0f6228a82dbe2cae38899 Mon Sep 17 00:00:00 2001 From: sam Date: Tue, 25 Sep 2007 16:08:16 +0000 Subject: o enable use of EAP methods w/o modification to the base system; use WPA_SUPPLICANT_CFLAGS, etc. (consult the Makefile's for details) o enable ipv6 support in hostapd (for communication w/ a radius backend) PR: bin/116164 Submitted by: "Scot Hetzel" Approved by: re (gnn) MFC after: 2 weeks --- usr.sbin/wpa/wpa_supplicant/Makefile | 63 +++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) (limited to 'usr.sbin/wpa/wpa_supplicant') diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile index 3569d1f..3a6a908 100644 --- a/usr.sbin/wpa/wpa_supplicant/Makefile +++ b/usr.sbin/wpa/wpa_supplicant/Makefile @@ -29,13 +29,19 @@ LDADD+= -lpcap SRCS+= config_file.c base64.c CFLAGS+=-DCONFIG_BACKEND_FILE +# User customizations to the wpa_supplicant build environment +CFLAGS+=${WPA_SUPPLICANT_CFLAGS} +#DPADD+=${WPA_SUPPLICANT_DPADD} +LDADD+=${WPA_SUPPLICANT_LDADD} +#LDFLAGS+=${WPA_SUPPLICANT_LDFLAGS} + .if ${MK_WPA_SUPPLICANT_EAPOL} != "no" SRCS+= eapol_sm.c eap.c eap_methods.c CFLAGS+= -DIEEE8021X_EAPOL .if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) CFLAGS+=-DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK \ - -DEAP_TLV -DEAP_TLS_FUNCS + -DEAP_TLV -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL SRCS+= eap_tls.c eap_peap.c eap_mschapv2.c eap_leap.c \ eap_psk.c eap_psk_common.c \ eap_tlv.c eap_tls_common.c tls_openssl.c ms_funcs.c crypto.c @@ -43,6 +49,60 @@ SRCS+= eap_tls.c eap_peap.c eap_mschapv2.c eap_leap.c \ CFLAGS+=-DEAP_TTLS -DEAP_MD5 SRCS+= eap_ttls.c eap_md5.c +.if !empty(CFLAGS:M*-DEAP_GTC) +SRCS+= eap_gtc.c +.endif + +.if !empty(CFLAGS:M*-DEAP_OTP) +SRCS+= eap_otp.c +.endif + +.if !empty(CFLAGS:M*-DEAP_AKA) +NEED_SIM_COMMON= true +SRCS+= eap_aka.c +.endif + +.if !empty(CFLAGS:M*-DEAP_SIM) +NEED_SIM_COMMON= true +SRCS+= eap_sim.c +.endif + +.if defined(NEED_SIM_COMMON) +SRCS+= eap_sim_common.c + +# PC/SC interface for smartcards (USIM, GSM SIM) +# GSM/UMTS authentication algorithm (for EAP-SIM/EAP-AKA) +# NB: requires devel/pcsc-lite +# +# WPA_SUPPLICANT_CFLAGS=-DEAP_AKA -DPCSC_FUNCS -I/usr/local/include/PCSC +# WPA_SUPPLICANT_LDADD=-L/usr/local/lib +# +.if !empty(CFLAGS:M*-DPCSC_FUNCS) +SRCS+= pcsc_funcs.c +DPADD+=${LIBPTHREAD} +LDADD+=-lpcsclite -lpthread +.endif +.endif + +.if !empty(CFLAGS:M*-DEAP_GPSK) +CFLAGS+=-DEAP_GPSK_SHA256 +SRCS+= eap_gpsk.c eap_gpsk_common.c +NEED_SHA256= true +.endif + +.if !empty(CFLAGS:M*-DEAP_PAX) +SRCS+= eap_pax.c eap_pax_common.c +.endif + +.if !empty(CFLAGS:M*-DEAP_SAKE) +SRCS+= eap_sake.c eap_sake_common.c +.endif + +.if defined(NEED_SHA256) +CFLAGS+=-DINTERNAL_SHA256 +SRCS+= sha256.c +.endif + # NB: requires patch to openssl #CFLAGS+= -DEAP_FAST #SRCS+= eap_fast.c @@ -50,6 +110,7 @@ SRCS+= eap_ttls.c eap_md5.c DPADD+= ${LIBSSL} ${LIBCRYPTO} LDADD+= -lssl -lcrypto .else +CFLAGS+= -DEAP_TLS_NONE SRCS+= tls_none.c .endif -- cgit v1.1