diff --git a/usr.sbin/wpa/Makefile.crypto b/usr.sbin/wpa/Makefile.crypto index a7ddb917ac6d..a65ee29e0ebe 100644 --- a/usr.sbin/wpa/Makefile.crypto +++ b/usr.sbin/wpa/Makefile.crypto @@ -1,59 +1,60 @@ # $FreeBSD$ .if ${MK_OPENSSL} != "no" LIBADD+= ssl crypto CFLAGS+= -DCONFIG_SHA256 .else CFLAGS+=-DCONFIG_CRYPTO_INTERNAL CONFIG_INTERNAL_AES=y CONFIG_INTERNAL_DES=y CONFIG_INTERNAL_MD4=y CONFIG_INTERNAL_MD5=y CONFIG_INTERNAL_RC4=y CONFIG_INTERNAL_SHA1=y NEED_SHA256=y CONFIG_INTERNAL_SHA256=y NEED_SHA384=y CONFIG_INTERNAL_SHA384=y NEED_SHA512=y CONFIG_INTERNAL_SHA512=y CONFIG_INTERNAL_TLS=y NEED_DH_GROUPS=y CONFIG_INTERNAL_DH5=y NEED_AES_ENC=true NEED_AES_CBC=true .endif NEED_AES_OMAC1=true +TLS_FUNCS=y .if defined(TLS_FUNCS) NEED_TLS_PRF=y .if defined(CONFIG_INTERNAL_TLS) CFLAGS+=-DCONFIG_INTERNAL_LIBTOMMATH \ -DCONFIG_TLS_INTERNAL_CLIENT NEED_DES=y NEED_MD4=y NEED_RC4=y .else CFLAGS+=-DEAP_TLS_OPENSSL .endif .endif .if defined(NEED_AES_EAX) NEED_AES_CTR=y .endif .if defined(NEED_SHA256) CFLAGS+=-DCONFIG_SHA256 .endif .if defined(NEED_SHA384) CFLAGS+=-DCONFIG_SHA384 .endif .if defined(NEED_SHA512) CFLAGS+=-DCONFIG_SHA512 .endif .if defined(NEED_DH_GROUPS_ALL) CFLAGS+=-DALL_DH_GROUPS .endif diff --git a/usr.sbin/wpa/hostapd/Makefile b/usr.sbin/wpa/hostapd/Makefile index 6e026babae1a..c0083747782a 100644 --- a/usr.sbin/wpa/hostapd/Makefile +++ b/usr.sbin/wpa/hostapd/Makefile @@ -1,72 +1,70 @@ # $FreeBSD$ .include .include "../Makefile.inc" +.include "../Makefile.crypto" + .PATH.c:${HOSTAPD_DISTDIR} PACKAGE= hostapd PROG= hostapd SRCS= config_file.c \ ctrl_iface.c \ eap_register.c \ main.c MAN= hostapd.8 hostapd.conf.5 .if ${MK_EXAMPLES} != "no" FILESDIR= ${SHAREDIR}/examples/hostapd .PATH: ${HOSTAPD_DISTDIR} FILES= hostapd.conf hostapd.eap_user hostapd.wpa_psk .endif CFLAGS+=-I${.CURDIR:H}/wpa_supplicant \ -I${WPA_DISTDIR}/src/eap_peer \ -DCONFIG_MBO \ -DCONFIG_RSN_PREAUTH \ -DHOSTAPD .if ${MK_INET6} != "no" CFLAGS+= -DCONFIG_IPV6 .endif #CFLAGS+= -g LIBADD+= pcap util wpaap wpacommon wpacrypto \ wpadrivers wpal2_packet wpaeap_common wpaeap_server \ wpaeapol_auth \ wparadius wpatls wpautils wpawps # User customizations for wpa_supplicant/hostapd build environment CFLAGS+=${HOSTAPD_CFLAGS} #DPADD+=${HOSTAPD_DPADD} LDADD+=${HOSTAPD_LDADD} #LDFLAGS+=${HOSTAPD_LDFLAGS} -TLS_FUNCS=y - # For WPS, EAP modes, etc NEED_DH_GROUPS=y NEED_DH_GROUPS_ALL=y .if !empty(CFLAGS:M*-DCONFIG_WPS) NEED_SIM_COMMON=y .endif .if !empty(CFLAGS:M*-DEAP_SERVER_AKA) NEED_SIM_COMMON=y .endif .if !empty(CFLAGS:M*-DEAP_SERVER_SIM) NEED_SIM_COMMON=y .endif .if defined(NEED_SIM_COMMON) NEED_FIPS186_2_PRF=y .endif .if !empty(CFLAGS:M*-DEAP_SERVER_GPSK) CFLAGS+=-DEAP_GPSK_SHA256 NEED_AES_OMAC1=y .endif -.include "../Makefile.crypto" - .include diff --git a/usr.sbin/wpa/hostapd_cli/Makefile b/usr.sbin/wpa/hostapd_cli/Makefile index 276e25058298..fef18dab7b32 100644 --- a/usr.sbin/wpa/hostapd_cli/Makefile +++ b/usr.sbin/wpa/hostapd_cli/Makefile @@ -1,17 +1,17 @@ # $FreeBSD$ .include "../Makefile.inc" +.include "../Makefile.crypto" + .PATH.c:${HOSTAPD_DISTDIR} PACKAGE= hostapd PROG= hostapd_cli SRCS= hostapd_cli.c LIBADD+= util wpacommon wpautils MAN= hostapd_cli.8 -.include "../Makefile.crypto" - .include diff --git a/usr.sbin/wpa/src/ap/Makefile b/usr.sbin/wpa/src/ap/Makefile index edb2f1e9d089..77caf1ed8efe 100644 --- a/usr.sbin/wpa/src/ap/Makefile +++ b/usr.sbin/wpa/src/ap/Makefile @@ -1,59 +1,59 @@ .include .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpaap INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/ap SRCS= accounting.c \ ap_config.c \ ap_drv_ops.c \ ap_list.c \ ap_mlme.c \ authsrv.c \ beacon.c \ bss_load.c \ ctrl_iface_ap.c \ dfs.c \ drv_callbacks.c \ eap_user_db.c \ gas_serv.c \ hostapd.c \ hs20.c \ hw_features.c \ ieee802_11.c \ ieee802_11_auth.c \ ieee802_11_he.c \ ieee802_11_ht.c \ ieee802_11_shared.c \ ieee802_11_vht.c \ ieee802_1x.c \ mbo_ap.c \ neighbor_db.c \ pmksa_cache_auth.c \ preauth_auth.c \ rrm.c \ sta_info.c \ tkip_countermeasures.c \ utils.c \ vlan.c \ vlan_ifconfig.c \ vlan_init.c \ wmm.c \ wpa_auth.c \ wpa_auth_glue.c \ wpa_auth_ie.c \ wps_hostapd.c CFLAGS+=-DCONFIG_MBO \ -DCONFIG_RSN_PREAUTH \ -DHOSTAPD -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= .include diff --git a/usr.sbin/wpa/src/common/Makefile b/usr.sbin/wpa/src/common/Makefile index 28c16ff9d31a..b415b926c207 100644 --- a/usr.sbin/wpa/src/common/Makefile +++ b/usr.sbin/wpa/src/common/Makefile @@ -1,27 +1,27 @@ .include .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpacommon INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/common SRCS= cli.c \ ctrl_iface_common.c \ gas.c \ hw_features_common.c \ ieee802_11_common.c \ wpa_common.c \ wpa_ctrl.c CFLAGS+=-DCONFIG_SAE \ -DCONFIG_SUITE \ -DCONFIG_SUITEB -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= .include diff --git a/usr.sbin/wpa/src/crypto/Makefile b/usr.sbin/wpa/src/crypto/Makefile index d7e1304dc95e..b25489072425 100644 --- a/usr.sbin/wpa/src/crypto/Makefile +++ b/usr.sbin/wpa/src/crypto/Makefile @@ -1,63 +1,168 @@ .include .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpacrypto INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/crypto -SRCS= aes-cbc.c \ - aes-ctr.c \ - aes-eax.c \ - aes-encblock.c \ - aes-internal.c \ - aes-internal-dec.c \ - aes-internal-enc.c \ - aes-omac1.c \ - aes-unwrap.c \ - aes-wrap.c \ - crypto_internal.c \ - crypto_internal-cipher.c \ - crypto_internal-modexp.c \ - crypto_internal-rsa.c \ - des-internal.c \ - dh_group5.c \ - dh_groups.c \ - fips_prf_internal.c \ - md4-internal.c \ - md5.c \ - md5-internal.c \ - ms_funcs.c \ +.if ${MK_OPENSSL} != "no" +SRCS= crypto_openssl.c \ random.c \ - rc4.c \ - sha1.c \ - sha1-internal.c \ - sha1-pbkdf2.c \ sha1-prf.c \ - sha1-tlsprf.c \ - sha256.c \ sha256-prf.c \ sha256-tlsprf.c \ - sha256-internal.c \ - sha384.c \ - sha384-prf.c \ - sha384-internal.c \ - sha512-internal.c \ + sha512.c +.else +SRCS= crypto_internal.c \ + random.c +.endif + +.if defined(TLS_FUNCS) +.if defined(CONFIG_INTERNAL_TLS) +SRCS+= crypto_internal-cipher.c \ + crypto_internal-modexp.c \ + crypto_internal-rsa.c \ tls_internal.c +.else +SRCS+= tls_openssl.c \ + tls_openssl_ocsp.c +.endif +.endif + +.if defined(CONFIG_INTERNAL_AES) +SRCS+= aes-unwrap.c aes-wrap.c \ + aes-internal.c \ + aes-internal-dec.c \ + aes-internal-enc.c +.else +.endif + +.if defined(NEED_AES_CBC) +SRCS+= aes-cbc.c +.endif + +.if defined(NEED_AES_EAX) +SRCS+= aes-eax.c +.endif + +.if defined(NEED_AES_CTR) +SRCS+= aes-ctr.c +.endif + +.if defined(NEED_AES_ENCBLOCK) +SRCS+= aes-encblock.c +.endif + +.if defined(NEED_AES_OMAC1) +SRCS+= aes-omac1.c +.endif + +.if defined(NEED_DES) +.if defined(CONFIG_INTERNAL_DES) +SRCS+= des-internal.c +.endif +.endif + +.if defined(NEED_MD4) +.if defined(CONFIG_INTERNAL_MD4) +SRCS+= md4-internal.c +.endif +.endif + +.if defined(CONFIG_INTERNAL_MD5) +SRCS+= md5.c \ + md5-internal.c +.endif + +.if defined(NEED_FIPS186_2_PRF) +.if defined(CONFIG_INTERNAL_SHA1) +SRCS+= fips_prf_internal.c +.else +SRCS+= fips_prf_openssl.c +.endif +.endif + +.if defined(CONFIG_INTERNAL_RC4) +SRCS+= rc4.c +.endif + +.if defined(CONFIG_INTERNAL_SHA1) +SRCS+= sha1-internal.c \ + sha1-pbkdf2.c \ + sha1.c \ + sha1-prf.c +.endif + +.if defined(NEED_SHA256) +SRCS+= sha256.c +.if defined(CONFIG_INTERNAL_SHA256) +SRCS+= sha256-internal.c \ + sha256-prf.c +.endif +.endif + +.if defined(NEED_SHA384) +SRCS+= sha384.c +.if defined(CONFIG_INTERNAL_SHA384) +SRCS+= sha384-internal.c \ + sha384-prf.c +.endif +.endif + +.if defined(NEED_SHA512) +SRCS+= sha512.c +.if defined(CONFIG_INTERNAL_SHA512) +SRCS+= sha512-internal.c \ + sha512-prf.c +.endif +.endif + +.if defined(NEED_TLS_PRF) +SRCS+= sha1-tlsprf.c +.endif + +.if defined(CONFIG_INTERNAL_DH5) +.if defined(NEED_DH_GROUPS) +SRCS+= dh_group5.c +.endif +.endif + +.if defined(NEED_DH_GROUPS) +SRCS+= dh_groups.c +.endif + +.if ${MK_WPA_SUPPLICANT_EAPOL} != "no" +CFLAGS+=-DCONFIG_WPS \ + -DCONFIG_HS20 \ + -DCONFIG_INTERWORKING \ + -DEAP_GTC \ + -DEAP_LEAP \ + -DEAP_MD5 \ + -DEAP_MSCHAPv2 \ + -DEAP_OTP \ + -DEAP_PEAP \ + -DEAP_PSK \ + -DEAP_TLS \ + -DEAP_TTLS \ + -DEAP_WSC \ + -DIEEE8021X_EAPOL +SRCS+= ms_funcs.c +.endif CFLAGS+=-DCONFIG_CRYPTO_INTERNAL \ -DCONFIG_TLS_INTERNAL_CLIENT \ -DCONFIG_TLS_INTERNAL_SERVER \ -DCONFIG_SHA256 \ -DCONFIG_SHA384 \ -DCONFIG_HMAC_SHA384_KDF \ -DCONFIG_INTERNAL_SHA384 #CFLAGS+=-DALL_DH_GROUPS -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= .include diff --git a/usr.sbin/wpa/src/drivers/Makefile b/usr.sbin/wpa/src/drivers/Makefile index 1800b651885f..0f901bdcf2fd 100644 --- a/usr.sbin/wpa/src/drivers/Makefile +++ b/usr.sbin/wpa/src/drivers/Makefile @@ -1,21 +1,21 @@ .include .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpadrivers INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/drivers SRCS= drivers.c \ driver_bsd.c \ driver_common.c \ driver_wired.c \ driver_wired_common.c -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= .include diff --git a/usr.sbin/wpa/src/eap_common/Makefile b/usr.sbin/wpa/src/eap_common/Makefile index 4da89b221b36..7ec416c74102 100644 --- a/usr.sbin/wpa/src/eap_common/Makefile +++ b/usr.sbin/wpa/src/eap_common/Makefile @@ -1,25 +1,25 @@ .include .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpaeap_common INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/eap_common SRCS= chap.c \ eap_common.c \ eap_gpsk_common.c \ eap_pax_common.c \ eap_peap_common.c \ eap_psk_common.c \ eap_sake_common.c \ eap_sim_common.c \ eap_wsc_common.c -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= .include diff --git a/usr.sbin/wpa/src/eap_peer/Makefile b/usr.sbin/wpa/src/eap_peer/Makefile index 524c7cf6c6f1..bab1b690f6d9 100644 --- a/usr.sbin/wpa/src/eap_peer/Makefile +++ b/usr.sbin/wpa/src/eap_peer/Makefile @@ -1,33 +1,33 @@ .include .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpaeap_peer INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/eap_peer SRCS= eap.c \ eap_gtc.c \ eap_leap.c \ eap_md5.c \ eap_methods.c \ eap_mschapv2.c \ eap_otp.c \ eap_peap.c \ eap_psk.c \ eap_tls.c \ eap_tls_common.c \ eap_ttls.c \ eap_wsc.c \ eap_methods.c \ mschapv2.c CFLAGS+=-DIEEE8021X_EAPOL -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= .include diff --git a/usr.sbin/wpa/src/eap_server/Makefile b/usr.sbin/wpa/src/eap_server/Makefile index c5a4566bb444..795d2a9c68a0 100644 --- a/usr.sbin/wpa/src/eap_server/Makefile +++ b/usr.sbin/wpa/src/eap_server/Makefile @@ -1,34 +1,34 @@ .include .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpaeap_server INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/eap_server SRCS= eap_server.c \ eap_server_aka.c \ eap_server_gpsk.c \ eap_server_gtc.c \ eap_server_identity.c \ eap_server_md5.c \ eap_server_methods.c \ eap_server_mschapv2.c \ eap_server_pax.c \ eap_server_peap.c \ eap_server_pwd.c \ eap_server_sake.c \ eap_server_sim.c \ eap_server_tls.c \ eap_server_tls_common.c \ eap_server_ttls.c \ eap_server_wsc.c \ eap_sim_db.c -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= .include diff --git a/usr.sbin/wpa/src/eapol_auth/Makefile b/usr.sbin/wpa/src/eapol_auth/Makefile index 7f05367edfb0..984b96df5c6f 100644 --- a/usr.sbin/wpa/src/eapol_auth/Makefile +++ b/usr.sbin/wpa/src/eapol_auth/Makefile @@ -1,18 +1,18 @@ .include .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpaeapol_auth INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/eapol_auth SRCS= eapol_auth_sm.c \ eapol_auth_dump.c -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= .include diff --git a/usr.sbin/wpa/src/eapol_supp/Makefile b/usr.sbin/wpa/src/eapol_supp/Makefile index 2b3cc0179109..a4588fc23de1 100644 --- a/usr.sbin/wpa/src/eapol_supp/Makefile +++ b/usr.sbin/wpa/src/eapol_supp/Makefile @@ -1,19 +1,19 @@ .include .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpaeapol_supp INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/eapol_supp SRCS= eapol_supp_sm.c CFLAGS+=-DIEEE8021X_EAPOL -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= .include diff --git a/usr.sbin/wpa/src/l2_packet/Makefile b/usr.sbin/wpa/src/l2_packet/Makefile index 89ce771b0343..f53dc81fdf52 100644 --- a/usr.sbin/wpa/src/l2_packet/Makefile +++ b/usr.sbin/wpa/src/l2_packet/Makefile @@ -1,19 +1,19 @@ .include .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpal2_packet INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/l2_packet SRCS= l2_packet_freebsd.c CFLAGS+=-DIEEE8021X_EAPOL -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= .include diff --git a/usr.sbin/wpa/src/radius/Makefile b/usr.sbin/wpa/src/radius/Makefile index 1ef986a799ae..a37d60be6f7d 100644 --- a/usr.sbin/wpa/src/radius/Makefile +++ b/usr.sbin/wpa/src/radius/Makefile @@ -1,24 +1,24 @@ .include .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wparadius INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/radius SRCS= radius.c \ radius_client.c \ radius_das.c \ radius_server.c .if ${MK_INET6} != "no" CFLAGS+= -DCONFIG_IPV6 .endif -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= .include diff --git a/usr.sbin/wpa/src/rsn_supp/Makefile b/usr.sbin/wpa/src/rsn_supp/Makefile index 1b50689e6960..4d952c2204c4 100644 --- a/usr.sbin/wpa/src/rsn_supp/Makefile +++ b/usr.sbin/wpa/src/rsn_supp/Makefile @@ -1,26 +1,26 @@ .include .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wparsn_supp INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/rsn_supp SRCS= pmksa_cache.c \ wpa_ft.c \ tdls.c \ preauth.c \ wpa.c \ wpa_ie.c CFLAGS+=-DCONFIG_TDLS \ -DCONFIG_WNM \ -DIEEE8021X_EAPOL -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= .include diff --git a/usr.sbin/wpa/src/tls/Makefile b/usr.sbin/wpa/src/tls/Makefile index defe9b0faf6e..e5fdf96444d6 100644 --- a/usr.sbin/wpa/src/tls/Makefile +++ b/usr.sbin/wpa/src/tls/Makefile @@ -1,38 +1,43 @@ .include .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpatls INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/tls -SRCS= asn1.c \ +SRCS= tlsv1_server.c + +.if defined(TLS_FUNCS) +.if defined(CONFIG_INTERNAL_TLS) +SRCS+= asn1.c \ bignum.c \ pkcs1.c \ pkcs5.c \ pkcs8.c \ rsa.c \ tlsv1_client.c \ + tlsv1_client_ocsp.c \ tlsv1_client_read.c \ tlsv1_client_write.c \ - tlsv1_client_ocsp.c \ tlsv1_common.c \ tlsv1_cred.c \ tlsv1_record.c \ - tlsv1_server.c \ tlsv1_server_read.c \ tlsv1_server_write.c \ x509v3.c +.endif +.endif CFLAGS+=-DCONFIG_INTERNAL_LIBTOMMATH \ -DCONFIG_CRYPTO_INTERNAL \ -DCONFIG_TLSV11 \ -DCONFIG_TLSV12 -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= .include diff --git a/usr.sbin/wpa/src/utils/Makefile b/usr.sbin/wpa/src/utils/Makefile index f08a2d78fced..22ec732a2b3b 100644 --- a/usr.sbin/wpa/src/utils/Makefile +++ b/usr.sbin/wpa/src/utils/Makefile @@ -1,32 +1,32 @@ .include .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpautils INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/utils SRCS= base64.c \ bitfield.c \ common.c \ edit.c \ eloop.c \ ip_addr.c \ os_unix.c \ uuid.c \ wpa_debug.c \ wpabuf.c CFLAGS+=-DCONFIG_DEBUG_FILE .if ${MK_INET6} != "no" CFLAGS+= -DCONFIG_IPV6 .endif -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= .include diff --git a/usr.sbin/wpa/src/wps/Makefile b/usr.sbin/wpa/src/wps/Makefile index ddb40b682c27..5f5485d69bce 100644 --- a/usr.sbin/wpa/src/wps/Makefile +++ b/usr.sbin/wpa/src/wps/Makefile @@ -1,39 +1,39 @@ .include .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpawps INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/wps SRCS= http_client.c \ httpread.c \ http_server.c \ upnp_xml.c \ wps_attr_build.c \ wps_attr_parse.c \ wps_attr_process.c \ wps.c \ wps_common.c \ wps_dev_attr.c \ wps_enrollee.c \ wps_registrar.c \ wps_upnp_ap.c \ wps_upnp.c \ wps_upnp_event.c \ wps_upnp_ssdp.c \ wps_upnp_web.c CFLAGS+=-DCONFIG_P2P .if ${MK_INET6} != "no" CFLAGS+= -DCONFIG_IPV6 .endif -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= .include diff --git a/usr.sbin/wpa/wpa_cli/Makefile b/usr.sbin/wpa/wpa_cli/Makefile index 7568154a7e45..bf2cf6252550 100644 --- a/usr.sbin/wpa/wpa_cli/Makefile +++ b/usr.sbin/wpa/wpa_cli/Makefile @@ -1,39 +1,37 @@ # $FreeBSD$ .include .include "../Makefile.inc" +.include "../Makefile.crypto" + .PATH.c:${WPA_SUPPLICANT_DISTDIR} PACKAGE= wpa PROG= wpa_cli SRCS= wpa_cli.c MAN= wpa_cli.8 CFLAGS+= -DCONFIG_TLS=openssl # enable use of d_type to identify unix domain sockets CFLAGS+= -D_DIRENT_HAVE_D_TYPE CFLAGS+= -DCONFIG_WPA_CLI_EDIT=y LIBADD+=wpaap \ wpacommon \ wpacrypto \ wpaeap_common \ wpaeap_peer \ wpaeap_server \ wpaeapol_auth \ wpaeapol_supp \ wpal2_packet \ wparadius \ wparsn_supp \ wpatls \ wpautils LIBADD+= pcap util -TLS_FUNCS=y - -.include "../Makefile.crypto" - .include diff --git a/usr.sbin/wpa/wpa_passphrase/Makefile b/usr.sbin/wpa/wpa_passphrase/Makefile index 0dcb3e69da98..4cd540696d67 100644 --- a/usr.sbin/wpa/wpa_passphrase/Makefile +++ b/usr.sbin/wpa/wpa_passphrase/Makefile @@ -1,19 +1,19 @@ # $FreeBSD$ .include "../Makefile.inc" +.include "../Makefile.crypto" + .PATH.c:${WPA_SUPPLICANT_DISTDIR} PACKAGE= wpa PROG= wpa_passphrase SRCS= wpa_passphrase.c CFLAGS+= -DCONFIG_CRYPTO_INTERNAL -DINTERNAL_SHA1 -DINTERNAL_MD5 LIBADD+= util wpacrypto wpautils MAN= wpa_passphrase.8 -.include "../Makefile.crypto" - .include diff --git a/usr.sbin/wpa/wpa_priv/Makefile b/usr.sbin/wpa/wpa_priv/Makefile index fd316402c1cf..d3b693341276 100644 --- a/usr.sbin/wpa/wpa_priv/Makefile +++ b/usr.sbin/wpa/wpa_priv/Makefile @@ -1,16 +1,16 @@ # $FreeBSD$ .include "../Makefile.inc" +.include "../Makefile.crypto" + .PATH.c:${WPA_SUPPLICANT_DISTDIR} PACKAGE= wpa PROG= wpa_priv SRCS= os_unix.c eloop.c common.c wpa_debug.c wpabuf.c wpa_priv.c \ l2_packet_freebsd.c -LIBADD= pcap wpadrivers - -.include "../Makefile.crypto" +LIBADD+=pcap wpadrivers .include diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile index 482c06d68e40..332f66315346 100644 --- a/usr.sbin/wpa/wpa_supplicant/Makefile +++ b/usr.sbin/wpa/wpa_supplicant/Makefile @@ -1,121 +1,120 @@ # $FreeBSD$ .include .include "../Makefile.inc" +.include "../Makefile.crypto" + .PATH.c:${WPA_SUPPLICANT_DISTDIR} \ ${WPA_DISTDIR}/src/drivers PACKAGE= wpa PROG= wpa_supplicant SRCS= blacklist.c \ bss.c \ config.c \ config_file.c \ ctrl_iface.c \ ctrl_iface_unix.c \ eap_register.c \ events.c \ gas_query.c \ main.c \ notify.c \ op_classes.c \ offchannel.c \ rrm.c \ scan.c \ wmm_ac.c \ wpa_supplicant.c \ wpas_glue.c MAN= wpa_supplicant.8 wpa_supplicant.conf.5 .if ${MK_EXAMPLES} != "no" FILESDIR= ${SHAREDIR}/examples/etc .PATH: ${WPA_SUPPLICANT_DISTDIR} FILES= wpa_supplicant.conf .endif CFLAGS+=-DCONFIG_BACKEND_FILE #CFLAGS+= -g -LIBADD= pcap util wpaap wpacommon wpacrypto wpadrivers wpaeapol_supp \ +LIBADD+=pcap util wpaap wpacommon wpacrypto wpadrivers wpaeapol_supp \ wpaeap_common wpaeap_server \ wpaeap_peer wpal2_packet wparsn_supp wpatls wpautils wpawps # 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" CFLAGS+=-DEAP_GTC \ -DEAP_LEAP \ -DEAP_MD5 \ -DEAP_MSCHAPv2 \ -DEAP_OTP \ -DEAP_PEAP \ -DEAP_PSK \ -DEAP_TLS \ -DEAP_TTLS \ -DEAP_WSC \ -DIEEE8021X_EAPOL SRCS+= hs20_supplicant.c \ interworking.c \ wps_supplicant.c NEED_AES_EAX=y NEED_AES_ENCBLOCK=y NEED_AES_OMAC1=y .endif -TLS_FUNCS=y .if !empty(CFLAGS:M*-DEAP_AKA) SRCS+= eap_aka.c NEED_SIM_COMMON=y NEED_AES_CBC=y .endif .if !empty(CFLAGS:M*-DEAP_SIM) SRCS+= eap_sim.c NEED_SIM_COMMON=y NEED_AES_CBC=y .endif .if defined(NEED_SIM_COMMON) SRCS+= eap_sim_common.c NEED_FIPS186_2_PRF=y .endif # 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 LIBADD+= pcslite pthread .endif .if !empty(CFLAGS:M*-DEAP_GPSK) CFLAGS+=-DEAP_GPSK_SHA256 SRCS+= eap_gpsk.c \ eap_gpsk_common.c NEED_AES_OMAC1=y .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 -.include "../Makefile.crypto" - .include