libeap.git
15 years agoPreparations for 0.6.6 release hostap_0_6_6
Jouni Malinen [Sun, 23 Nov 2008 15:02:06 +0000 (17:02 +0200)]
Preparations for 0.6.6 release

15 years agoPreparations for 0.6.6 release
Jouni Malinen [Sun, 23 Nov 2008 15:00:52 +0000 (17:00 +0200)]
Preparations for 0.6.6 release

15 years agoSimplified RADIUS accounting id usage
Jouni Malinen [Sun, 23 Nov 2008 09:12:17 +0000 (11:12 +0200)]
Simplified RADIUS accounting id usage

Changed accounting_sta_start() to call accounting_sta_get_id()
internally in accounting.c so that external callers do not need to do
anything to allocate unique accounting id. When starting a new session,
a unique identifier is needed anyway, so no need to keep these
operations separate.

15 years agoUse SM_ENTER_GLOBAL to clean up EAPOL state machine debug messages
Jouni Malinen [Sun, 23 Nov 2008 09:01:28 +0000 (11:01 +0200)]
Use SM_ENTER_GLOBAL to clean up EAPOL state machine debug messages

This removes unnecessary messages about entering REAUTH_TIMER INITIALIZE
state every second when a STA is in unauthenticated state.

15 years agoAllocate new Acct-Session-Id on EAPOL-Logoff
Jouni Malinen [Sun, 23 Nov 2008 08:47:36 +0000 (10:47 +0200)]
Allocate new Acct-Session-Id on EAPOL-Logoff

Stop accounting session on EAPOL-Logoff and use new Acct-Session-Id if
STA authenticates again within same association after this.

15 years agoFixed listen interval configuration for nl80211 drivers
Jouni Malinen [Sat, 22 Nov 2008 19:20:27 +0000 (21:20 +0200)]
Fixed listen interval configuration for nl80211 drivers

Need to update the struct sta_info value, too, and not only the local
variable used in handle_assoc()..

15 years agoAdd more verbose debug output for GSM-Milenage use (RAND,SRES,Kc)
Jouni Malinen [Sat, 22 Nov 2008 12:06:58 +0000 (14:06 +0200)]
Add more verbose debug output for GSM-Milenage use (RAND,SRES,Kc)

15 years agoRemove experimental non-AP STA code from hostapd
Jouni Malinen [Fri, 21 Nov 2008 18:48:58 +0000 (20:48 +0200)]
Remove experimental non-AP STA code from hostapd

This was used to allow hostapd to associate as a non-AP STA to another
AP one the same channel while still acting as an AP with the Host AP
driver. This was very experimental and did not work with all firmware
versions. Nowadays, much better way of doing this is to use mac80211
virtual non-AP STA interface. As such, this experimental code can be
removed from hostapd to reduce the code size and make MLME code easier
to understand since it is now only handling AP functionality.

15 years agoRemove overly complex hostapd setup sequence with n+1 callbacks
Jouni Malinen [Fri, 21 Nov 2008 18:39:33 +0000 (20:39 +0200)]
Remove overly complex hostapd setup sequence with n+1 callbacks

This code was originally added as a mechanism to handle long waits
during channel selection and/or radar detection. It is not currently
really used and makes the setup sequence nearly impossible to
understand. Let's get rid of the unwanted complexity. This needs to be
redesigned if it is ever needed again.

15 years agoRemoved forgotten register_drivers() prototype
Jouni Malinen [Fri, 21 Nov 2008 17:51:06 +0000 (19:51 +0200)]
Removed forgotten register_drivers() prototype

Driver registration style was changed long time ago and this is not used
anymore.

15 years agoRemoved partial IEEE 802.11h implementation
Jouni Malinen [Fri, 21 Nov 2008 17:45:20 +0000 (19:45 +0200)]
Removed partial IEEE 802.11h implementation

This code was not finished and did not work with the current mac80211
design. In order to avoid confusing users, it is better to remove this
completely for now and look at new implementation to work with mac80211.

15 years agoRemoved now unused reconfig variables.
Jouni Malinen [Fri, 21 Nov 2008 17:31:54 +0000 (19:31 +0200)]
Removed now unused reconfig variables.

15 years agoreconfig.c file was not used at all, so remove it.
Jouni Malinen [Fri, 21 Nov 2008 17:28:45 +0000 (19:28 +0200)]
reconfig.c file was not used at all, so remove it.

This implementation of reconfiguration is way too complex. Something
simpler should be implemented to allow dynamic configuration changes.

15 years agoAdded an attribution based on the original SSLeay license for OpenSSL.
Jouni Malinen [Fri, 21 Nov 2008 13:54:35 +0000 (15:54 +0200)]
Added an attribution based on the original SSLeay license for OpenSSL.

15 years agoFixed hostapd build without l2_packet (e.g., RADIUS server only).
Jouni Malinen [Fri, 21 Nov 2008 13:44:00 +0000 (15:44 +0200)]
Fixed hostapd build without l2_packet (e.g., RADIUS server only).

15 years agoFixed canceling of PMKSA caching with driver generated RSN IE
Jouni Malinen [Fri, 21 Nov 2008 13:31:25 +0000 (15:31 +0200)]
Fixed canceling of PMKSA caching with driver generated RSN IE

It looks like some Windows NDIS drivers (e.g., Intel) do not clear the
PMKID list even when wpa_supplicant explicitly sets the list to be
empty. In such a case, the driver ends up trying to use PMKSA caching
with the AP and wpa_supplicant may not have the PMK that would be needed
to complete 4-way handshake.

RSN processing already had some code for aborting PMKSA caching by
sending EAPOL-Start. However, this was not triggered in this particular
case where the driver generates the RSN IE. With this change, this case
is included, too, and the failed PMKSA caching attempt is cleanly
canceled and wpa_supplicant can fall back to full EAP authentication.

15 years agoRemove the unwanted Windows console from the Windows binary version of wpa_gui
Jouni Malinen [Fri, 21 Nov 2008 12:26:11 +0000 (14:26 +0200)]
Remove the unwanted Windows console from the Windows binary version of wpa_gui

15 years agoSilence printf() calls in wpa_gui to avoid stdout output from a GUI program
Jouni Malinen [Fri, 21 Nov 2008 12:05:37 +0000 (14:05 +0200)]
Silence printf() calls in wpa_gui to avoid stdout output from a GUI program

15 years agowpa_gui: Add a PNG version of the tray icon for Windows binary build
Jouni Malinen [Fri, 21 Nov 2008 11:58:12 +0000 (13:58 +0200)]
wpa_gui: Add a PNG version of the tray icon for Windows binary build

It looks like Qt does not support SVG format by default on Windows and
it was not trivial to add the plugin into the build, so for now, build a
16x16 PNG icon file for Windows binary to avoid showing an invisible
icon in the tray.

15 years agoFixed EAP-TLS message fragmentation for the last TLS message
Jouni Malinen [Thu, 20 Nov 2008 17:39:35 +0000 (19:39 +0200)]
Fixed EAP-TLS message fragmentation for the last TLS message

It the message was large enough to require fragmentation (e.g., if a large
Session Ticket data is included), More Fragment flag was set, but no
more fragments were actually sent (i.e., Access-Accept was sent out).

15 years agoFixed Milenage debug output to use correct length for IK and CK
Jouni Malinen [Thu, 20 Nov 2008 13:45:31 +0000 (15:45 +0200)]
Fixed Milenage debug output to use correct length for IK and CK

15 years agoFixed EAPA-AKA warning message about AT_RES length to use bits
Jouni Malinen [Thu, 20 Nov 2008 13:23:51 +0000 (15:23 +0200)]
Fixed EAPA-AKA warning message about AT_RES length to use bits

15 years agoChanged PEAPv0 cryptobinding to be disabled by default
Jouni Malinen [Thu, 20 Nov 2008 10:49:34 +0000 (12:49 +0200)]
Changed PEAPv0 cryptobinding to be disabled by default

There are some interoperability issues with Windows Server 2008 NPS, so
better disable cryptobinding use by default for now.

15 years agoFixed size_t printf format for 64-bit builds
Jouni Malinen [Wed, 19 Nov 2008 19:21:34 +0000 (21:21 +0200)]
Fixed size_t printf format for 64-bit builds

15 years agoFixed a bug in read -> _read cleanup; one missed change
Jouke Witteveen [Wed, 19 Nov 2008 19:20:24 +0000 (21:20 +0200)]
Fixed a bug in read -> _read cleanup; one missed change

15 years agoEAP-PEAP: Copy Binding nonce from cryptobinding request to reply
Jouni Malinen [Wed, 19 Nov 2008 17:25:14 +0000 (19:25 +0200)]
EAP-PEAP: Copy Binding nonce from cryptobinding request to reply

It looks like [MS-PEAP] 3.2.5.6 points towards this being the expected
behavior (however, that chapter is very confusing).

In addition, remove Cryptobinding TLV from response if the received
Cryptobinding TLV is not valid. Add some more debug messages to the case
where the received Cryptobinding TLV is found invalid.

15 years agoSeparate OpenSSL engine configuration for Phase 2
Carolin Latze [Tue, 18 Nov 2008 14:53:32 +0000 (16:53 +0200)]
Separate OpenSSL engine configuration for Phase 2

I fixed the engine issue in phase2 of EAP-TTLS. The problem was that you
only defined one engine variable, which was read already in phase1. I
defined some new variables:

engine2
engine2_id
pin2

and added support to read those in phase2 wheres all the engine
variables without number are only read in phase1. That solved it and I
am now able to use an engine also in EAP-TTLS phase2.

15 years agoroboswitch: Minor coding style cleanup
Jouni Malinen [Tue, 18 Nov 2008 14:35:08 +0000 (16:35 +0200)]
roboswitch: Minor coding style cleanup

15 years agoAdd RoboSwitch driver interface for wpa_supplicant
Jouke Witteveen [Tue, 18 Nov 2008 14:30:32 +0000 (16:30 +0200)]
Add RoboSwitch driver interface for wpa_supplicant

Find attached the patch that creates a new driver: roboswitch. This
driver adds support for wired authentication with a Broadcom
RoboSwitch chipset. For example it is now possible to do wired
authentication with a Linksys WRT54G router running OpenWRT.

LIMITATIONS
- At the moment the driver does not support the BCM5365 series (though
adding it requires just some register tweaks).
- The driver is also limited to Linux (this is a far more technical
restriction).
- In order to compile against a 2.4 series you need to edit
include/linux/mii.h and change all references to "u16" in "__u16". I
have submitted a patch upstream that will fix this in a future version
of the 2.4 kernel. [These modifications (and more) are now included in
the kernel source and can be found in versions 2.4.37-rc2 and up.]

USAGE
- Usage is similar to the wired driver. Choose the interfacename of
the vlan that contains your desired authentication port on the router.
This name must be formatted as <interface>.<vlan>, which is the
default on all systems I know.

15 years agoUpdated userspace MLME instructions for current mac80211
Jouni Malinen [Tue, 18 Nov 2008 13:45:25 +0000 (15:45 +0200)]
Updated userspace MLME instructions for current mac80211

Remove the old code from driver_wext.c since the private ioctl interface is
never going to be used with mac80211. driver_nl80211.c has an
implementation than can be used with mac80211 (with two external patches to
enable userspace MLME configuration are still required, though).

15 years agoRemove extra typedefs since they do not seem to be needed anymore
Jouni Malinen [Tue, 18 Nov 2008 13:06:03 +0000 (15:06 +0200)]
Remove extra typedefs since they do not seem to be needed anymore

These typedefs were causing build issues with new kernel/C library headers,
so lets get rid of them since they do not seem to be needed anymore. This
applies only if CONFIG_FULL_DYNAMIC_VLAN is enabled which is not even
mentioned in the defconfig file, so this should not change behavior more
most users.

15 years agoImproved the error message for passive scan not being available
Jouni Malinen [Tue, 18 Nov 2008 13:01:24 +0000 (15:01 +0200)]
Improved the error message for passive scan not being available

If the driver wrapper does not implement passive_scan handler, do not try
to use strerror() to figure out what the error meant. This is not really an
error that the user should be notified about.

15 years agodriver_nl80211: Remove monitor interface if AP initialization fails
Jouni Malinen [Tue, 18 Nov 2008 12:55:32 +0000 (14:55 +0200)]
driver_nl80211: Remove monitor interface if AP initialization fails

15 years agoChanged channel flags configuration to read the information from the driver
Jouni Malinen [Tue, 18 Nov 2008 12:51:43 +0000 (14:51 +0200)]
Changed channel flags configuration to read the information from the driver
(e.g., via driver_nl80211 when using mac80211) instead of using hostapd as
the source of the regulatory information (i.e., information from CRDA is
now used with mac80211); this allows 5 GHz channels to be used with hostapd
(if allowed in the current regulatory domain).

15 years agoOpenSSL 0.9.9 API change for EAP-FAST session ticket overriding API
Jouni Malinen [Sun, 16 Nov 2008 19:29:12 +0000 (21:29 +0200)]
OpenSSL 0.9.9 API change for EAP-FAST session ticket overriding API

Updated OpenSSL code for EAP-FAST to use an updated version of the
session ticket overriding API that was included into the upstream
OpenSSL 0.9.9 tree on 2008-11-15 (no additional OpenSSL patch is
needed with that version anymore).

15 years agoUpdated interop results for ACS 4.2
Jouni Malinen [Sun, 16 Nov 2008 09:30:34 +0000 (11:30 +0200)]
Updated interop results for ACS 4.2

15 years agoEAP-FAST: Reorder TLVs in PAC Acknowledgment to fix interop issues
Jouni Malinen [Sun, 16 Nov 2008 09:10:29 +0000 (11:10 +0200)]
EAP-FAST: Reorder TLVs in PAC Acknowledgment to fix interop issues

It looks like ACS did not like PAC Acknowledgment TLV before Result TLV, so
reorder the TLVs to match the order shown in a
draft-cam-winget-eap-fast-provisioning-09.txt example. This allows
authenticated provisioning to be terminated with Access-Accept (if ACS has
that option enabled). Previously, provisioning was otherwise successful,
but the server rejected connection due to not understanding the PAC Ack
("Invalid TEAP Data recieved").

15 years agoModified the OpenSSL patch to use session ticket -specific function
Jouni Malinen [Wed, 12 Nov 2008 04:15:27 +0000 (06:15 +0200)]
Modified the OpenSSL patch to use session ticket -specific function

This is the first step in replacing SSL_set_hello_extension() with a new
SSL_set_session_ticket_ext() function that can only be used to override the
session ticket extension, not any arbitrary TLS extension.

SSL_set_hello_extension() is still present as a simple wrapper in this
version to avoid changing the API and to make testing with wpa_supplicant
and hostapd easier. It can be eventually removed when the patch is going in
into OpenSSL distribution.

15 years agoUpdated indentation in the patch to match style used elsewhere in OpenSSL
Jouni Malinen [Wed, 12 Nov 2008 03:06:03 +0000 (05:06 +0200)]
Updated indentation in the patch to match style used elsewhere in OpenSSL

15 years agowpa_gui-qt4: tweak icon Makefile
Kel Modderman [Tue, 11 Nov 2008 15:41:19 +0000 (17:41 +0200)]
wpa_gui-qt4: tweak icon Makefile

Output the xpm icons in more convenient location.

Signed-off-by: Kel Modderman <kel@otaku42.de>
15 years agowpa_gui-qt4: FTBFS with GCC 4.4: missing #include
Martin Michlmayr [Tue, 11 Nov 2008 15:36:37 +0000 (17:36 +0200)]
wpa_gui-qt4: FTBFS with GCC 4.4: missing #include

GCC 4.4 cleaned up some more C++ headers.  You always have to #include
headers directly and cannot rely for things to be included indirectly.

> g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DCONFIG_CTRL_IFACE
-DCONFIG_CTRL_IFACE_UNIX -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui
-I/usr/include/qt4 -I. -I.. -I../../src/utils -I../../src/common -I.moc -I.ui -o
.obj/wpagui.o wpagui.cpp
> wpagui.cpp: In constructor 'WpaGui::WpaGui(QWidget*, const char*,
Qt::WFlags)':
> wpagui.cpp:98: error: 'printf' was not declared in this scope

From: Martin Michlmayr <tbm@cyrius.com>
Bug:  http://bugs.debian.org/505041

Signed-off-by: Kel Modderman <kel@otaku42.de>
15 years agoAdded an optional mitigation mechanism for certain attacks against TKIP by
Jouni Malinen [Sat, 8 Nov 2008 02:43:12 +0000 (04:43 +0200)]
Added an optional mitigation mechanism for certain attacks against TKIP by
delaying Michael MIC error reports by a random amount of time between 0 and
60 seconds if multiple Michael MIC failures are detected with the same PTK
(i.e., the Authenticator does not rekey PTK on first failure report). This
is disabled by default and can be enabled with a build option
CONFIG_DELAYED_MIC_ERROR_REPORT=y in .config.

This may help in making a chopchop attack take much longer time by forcing
the attacker to wait 60 seconds before knowing whether a modified frame
resulted in a MIC failure.

15 years agoEAP-SIM/AKA: fixed initialization to verify PIN even if identity is set
Jouni Malinen [Fri, 7 Nov 2008 18:09:44 +0000 (20:09 +0200)]
EAP-SIM/AKA: fixed initialization to verify PIN even if identity is set

Previously, hardcoded identity in the network configuration skipped both
IMSI reading and PIN verification. This broke cases where PIN is needed for
GSM/UMTS authentication. Now, only IMSI reading is skipped if identity is
hardcoded.

15 years agoEAP-AKA: Validate RES Length field in AT_RES
Jouni Malinen [Fri, 7 Nov 2008 06:34:07 +0000 (08:34 +0200)]
EAP-AKA: Validate RES Length field in AT_RES

This change breaks interoperability with older wpa_supplicant versions
(everything up to and including wpa_supplicant 0.5.10 and 0.6.5) which
incorrectly used this field as number of bytes, not bits, in RES.

15 years agoFixed EAP-AKA RES Length field in AT_RES as length in bits, not bytes
Jouni Malinen [Fri, 7 Nov 2008 06:30:34 +0000 (08:30 +0200)]
Fixed EAP-AKA RES Length field in AT_RES as length in bits, not bytes

15 years agoEAP-FAST server: allow expired PAC for PAC refresh
Jouni Malinen [Thu, 6 Nov 2008 20:57:09 +0000 (22:57 +0200)]
EAP-FAST server: allow expired PAC for PAC refresh

Instead of falling back to full TLS handshake on expired PAC, allow the
PAC to be used to allow a PAC update with some level of server
authentication (i.e., do not fall back to full TLS handshake since we
cannot be sure that the peer would be able to validate server certificate
now). However, reject the authentication since the PAC was not valid
anymore. Peer can connect again with the newly provisioned PAC after this.

15 years agoEAP-FAST: Include Tunnel PAC request only after EAP authentication
Jouni Malinen [Thu, 6 Nov 2008 19:07:53 +0000 (21:07 +0200)]
EAP-FAST: Include Tunnel PAC request only after EAP authentication

15 years agoAdded support for enforcing frequent PTK rekeying
Jouni Malinen [Thu, 6 Nov 2008 17:57:21 +0000 (19:57 +0200)]
Added support for enforcing frequent PTK rekeying

Added a new configuration option, wpa_ptk_rekey, that can be used to
enforce frequent PTK rekeying, e.g., to mitigate some attacks against TKIP
deficiencies. This can be set either by the Authenticator (to initiate
periodic 4-way handshake to rekey PTK) or by the Supplicant (to request
Authenticator to rekey PTK).

With both wpa_ptk_rekey and wpa_group_rekey (in hostapd) set to 600, TKIP
keys will not be used for more than 10 minutes which may make some attacks
against TKIP more difficult to implement.

15 years agoAdded Milenage-GSM simulator for EAP-SIM
Jouni Malinen [Thu, 6 Nov 2008 02:21:32 +0000 (04:21 +0200)]
Added Milenage-GSM simulator for EAP-SIM

CONFIG_SIM_SIMULATOR=y in .config and password="Ki:OPc" in network config
to enable.

15 years agodriver_ndis: Added a workaround for a driver that removes SSID IE in scan
Jouni Malinen [Wed, 5 Nov 2008 21:44:26 +0000 (23:44 +0200)]
driver_ndis: Added a workaround for a driver that removes SSID IE in scan

A driver was found to remove SSID IE from NDIS_WLAN_BSSID_EX IEs, but the
correct SSID is included in NDIS_802_11_SSID structure inside the BSSID
data. If this is seen in scan results, create a matching SSID IE and add it
to the end of IEs to fix scan result parsing.

15 years agoAdded Milenage USIM emulator for EAP-AKA (can be used to simulate test
Jouni Malinen [Wed, 5 Nov 2008 21:02:13 +0000 (23:02 +0200)]
Added Milenage USIM emulator for EAP-AKA (can be used to simulate test
USIM card with a known private key; enable with CONFIG_USIM_SIMULATOR in
.config and password="Ki:OPc:SQN" in network configuration).

15 years agoPreparations for 0.6.5 release hostap_0_6_5
Jouni Malinen [Sat, 1 Nov 2008 15:20:25 +0000 (17:20 +0200)]
Preparations for 0.6.5 release

15 years agoFixed fwrite error path in eap_fast_write_pac not to free buf
Jouni Malinen [Sat, 1 Nov 2008 15:09:28 +0000 (17:09 +0200)]
Fixed fwrite error path in eap_fast_write_pac not to free buf

Caller expects the buffer to be allocated on error, so eap_fast_write_pac()
must be consistent with its behavior on error paths.

15 years agoAdded a comment about VS2008EE and updated WinPcap/OpenSSL versions
Jouni Malinen [Sat, 1 Nov 2008 12:46:00 +0000 (14:46 +0200)]
Added a comment about VS2008EE and updated WinPcap/OpenSSL versions

15 years agoAdded a note about hostapd driver_nl80211 and AP mode in wireless-testing
Jouni Malinen [Sat, 1 Nov 2008 12:32:10 +0000 (14:32 +0200)]
Added a note about hostapd driver_nl80211 and AP mode in wireless-testing

15 years agoFixed ctrl_iface BSS command to fetch scan results, if needed
Jouni Malinen [Sat, 1 Nov 2008 12:28:34 +0000 (14:28 +0200)]
Fixed ctrl_iface BSS command to fetch scan results, if needed

This makes BSS command work line SCAN_RESULTS and allows wpa_gui to get
some scan results without explicit scan results even when using ap_scan=2.

15 years agodriver_nl80211: Remove set_ssid from nl80211 driver
Johannes Berg [Sat, 1 Nov 2008 11:45:34 +0000 (13:45 +0200)]
driver_nl80211: Remove set_ssid from nl80211 driver

This is no longer required (and does not work with current
wireless-testing anymore).

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
15 years agoUpdated VS2005 project files with new and removed C files
Jouni Malinen [Sat, 1 Nov 2008 11:03:09 +0000 (13:03 +0200)]
Updated VS2005 project files with new and removed C files

15 years agoUse os_snprintf() instead of snprintf()
Jouni Malinen [Sat, 1 Nov 2008 11:02:50 +0000 (13:02 +0200)]
Use os_snprintf() instead of snprintf()

15 years agoUse the common ieee802_11_parse_elems() implementations for mlme.c
Jouni Malinen [Wed, 29 Oct 2008 19:57:01 +0000 (21:57 +0200)]
Use the common ieee802_11_parse_elems() implementations for mlme.c

15 years agoMoved ieee802_11_parse_elems() into common code
Jouni Malinen [Wed, 29 Oct 2008 19:48:14 +0000 (21:48 +0200)]
Moved ieee802_11_parse_elems() into common code

15 years agoRemoved the unused hapd argument to ieee802_11_parse_elems()
Jouni Malinen [Wed, 29 Oct 2008 19:33:46 +0000 (21:33 +0200)]
Removed the unused hapd argument to ieee802_11_parse_elems()

15 years agodriver_nl80211: Added TX queue parameter configuration
Jouni Malinen [Wed, 29 Oct 2008 17:35:17 +0000 (19:35 +0200)]
driver_nl80211: Added TX queue parameter configuration

15 years agodriver_nl80211: Added basic rate configuration
Jouni Malinen [Wed, 29 Oct 2008 17:34:27 +0000 (19:34 +0200)]
driver_nl80211: Added basic rate configuration

15 years agoVerify fread(), fwrite(), and system() return values
Jouni Malinen [Wed, 29 Oct 2008 17:33:24 +0000 (19:33 +0200)]
Verify fread(), fwrite(), and system() return values

These were starting to trigger compiler warning with recent glibc header
files and gcc.

15 years agoFixed size_t printf format for 64-bit targets
Jouni Malinen [Wed, 29 Oct 2008 17:30:23 +0000 (19:30 +0200)]
Fixed size_t printf format for 64-bit targets

15 years agonl80211: Finish dumps properly (ported from iw.git)
Jouni Malinen [Wed, 29 Oct 2008 17:28:35 +0000 (19:28 +0200)]
nl80211: Finish dumps properly (ported from iw.git)

15 years agoSet TX queue parameters during initialization
Jouni Malinen [Wed, 29 Oct 2008 17:25:15 +0000 (19:25 +0200)]
Set TX queue parameters during initialization

This was already called from reconfig.c, but the call from hostapd.c had
been forgotten.

15 years agoFixed EAPOL skip for PMKSA caching case to remain in authenticated state
Jouni Malinen [Sat, 25 Oct 2008 17:21:31 +0000 (20:21 +0300)]
Fixed EAPOL skip for PMKSA caching case to remain in authenticated state

Need to make sure that portValid is TRUE in order to avoid PAE state
machine going into DISCONNECTED state on eapol_sm_step(). This could be
triggered at least with OKC.

15 years agoFix group key rekeying when reauth happens during pending group key update
Jouni Malinen [Tue, 21 Oct 2008 10:54:54 +0000 (13:54 +0300)]
Fix group key rekeying when reauth happens during pending group key update

We need to cancel the group key update for a STA if a reauthentication
request is received while the STA is in pending group key update. When
canceling the update, we will also need to make sure that the PTK Group Key
state machine ends up in the correct state (IDLE) to allow future updates
in case of WPA2.

15 years agoEAP-FAST peer: Fixed not to add PAC Request in PAC Acknowledgement message
Jouni Malinen [Sun, 19 Oct 2008 07:02:57 +0000 (10:02 +0300)]
EAP-FAST peer: Fixed not to add PAC Request in PAC Acknowledgement message

15 years agoEAP-FAST: Allow A-ID and A-ID-Info to be configured separately
Jouni Malinen [Sun, 19 Oct 2008 06:55:59 +0000 (09:55 +0300)]
EAP-FAST: Allow A-ID and A-ID-Info to be configured separately

Changed EAP-FAST configuration to use separate fields for A-ID and
A-ID-Info (eap_fast_a_id_info) to allow A-ID to be set to a fixed
16-octet len binary value for better interoperability with some peer
implementations; eap_fast_a_id is now configured as a hex string.

15 years agoFixed WPA/RSN IE validation to verify the proto (WPA vs. WPA2) is enabled
Jouni Malinen [Wed, 15 Oct 2008 03:34:39 +0000 (06:34 +0300)]
Fixed WPA/RSN IE validation to verify the proto (WPA vs. WPA2) is enabled

Previous version could have allowed a broken client to complete WPA (or
WPA2) authentication even if the selected proto was not enabled in hostapd
configuration.

15 years agoAvoid some gcc 4.3 warnings about deprecated string conversions
Jouni Malinen [Tue, 14 Oct 2008 04:39:51 +0000 (07:39 +0300)]
Avoid some gcc 4.3 warnings about deprecated string conversions

15 years agoEAP-FAST: Make PAC-Key lifetime values configurable
Jouni Malinen [Wed, 8 Oct 2008 14:25:47 +0000 (17:25 +0300)]
EAP-FAST: Make PAC-Key lifetime values configurable

The hardcoded values in eap_fast.c were replaced with values read from
hostapd.conf.

15 years agoEAP-FAST: Added support for disabling anonymous/authenticated provisioning
Jouni Malinen [Wed, 8 Oct 2008 13:55:23 +0000 (16:55 +0300)]
EAP-FAST: Added support for disabling anonymous/authenticated provisioning

eap_fast_prov config parameter can now be used to enable/disable different
EAP-FAST provisioning modes:
0 = provisioning disabled
1 = only anonymous provisioning allowed
2 = only authenticated provisioning allowed
3 = both provisioning modes allowed

15 years agoChange the order of Result TLV and PAC TLV to avoid interop issues
Jouni Malinen [Wed, 8 Oct 2008 12:50:01 +0000 (15:50 +0300)]
Change the order of Result TLV and PAC TLV to avoid interop issues

draft-cam-winget-eap-fast-provisioning-06.txt or RFC 4851 do not seem to
mandate any particular order for TLVs, but some interop issues were noticed
with an EAP-FAST peer implementation when Result TLV followed PAC TLV. The
example in draft-cam-winget-eap-fast-provisioning-06.txt shows the TLVs in
the other order, so change the order here, too, to make it less likely to
hit this type of interop issues.

15 years agowpa_gui-qt4: Set EAP-FAST provisioning parameters if inner method is 'any'
Jouni Malinen [Tue, 7 Oct 2008 15:53:02 +0000 (18:53 +0300)]
wpa_gui-qt4: Set EAP-FAST provisioning parameters if inner method is 'any'

15 years agoUpdated the comment on MS-Packet-Info mismatch based on [MS-SOH] info
Jouni Malinen [Thu, 2 Oct 2008 17:26:00 +0000 (20:26 +0300)]
Updated the comment on MS-Packet-Info mismatch based on [MS-SOH] info

15 years agoSoH: Add null termination for empty url in MS-Quarantine-State.
Jouni Malinen [Thu, 2 Oct 2008 17:22:17 +0000 (20:22 +0300)]
SoH: Add null termination for empty url in MS-Quarantine-State.

15 years agoSoH: Add all the mandatory attributes into SSoH vendor specific attribute
Jouni Malinen [Thu, 2 Oct 2008 16:34:22 +0000 (19:34 +0300)]
SoH: Add all the mandatory attributes into SSoH vendor specific attribute

This adds all the attributes that are marked as mandatory for SoH in
IF-TNCCS-SOH v1.0. MS-Machine-Inventory does not contain correct data
(i.e., all version fields are just marked as inapplicable) and
MS-MachineName is hardcoded to wpa_supplicant@w1.fi for now.

15 years agoFixed EAP-FAST peer not to add double Result TLV when ACKing PAC
Jouni Malinen [Thu, 2 Oct 2008 14:38:13 +0000 (17:38 +0300)]
Fixed EAP-FAST peer not to add double Result TLV when ACKing PAC

15 years agoRegister a quick auth timeout if EAPOL fails to avoid long waits
Jouni Malinen [Thu, 2 Oct 2008 14:27:24 +0000 (17:27 +0300)]
Register a quick auth timeout if EAPOL fails to avoid long waits

This may be needed if the AP does not disconnect in case of EAP-FAST
unauthenticated provisioning (EAP-Failure). Adding the local short timeout
will speed up the process in such a case by reducing the wait (which can
often be up to 60 seconds).

15 years agoAdded debug_timestamp option to Windows registry
Jouni Malinen [Thu, 2 Oct 2008 13:26:18 +0000 (16:26 +0300)]
Added debug_timestamp option to Windows registry

15 years agoNDIS: Set authMode=WPA2, if needed, when flushing PMKID cache
Jouni Malinen [Thu, 2 Oct 2008 13:25:41 +0000 (16:25 +0300)]
NDIS: Set authMode=WPA2, if needed, when flushing PMKID cache

Some drivers may refuse OID_802_11_PMKID if authMode is not set to WPA2,
so let's set it temporarily, if needed, when flushing PMKID cache.

15 years agoSet update_config=1 in the example Windows registry config
Jouni Malinen [Thu, 2 Oct 2008 11:12:32 +0000 (14:12 +0300)]
Set update_config=1 in the example Windows registry config

15 years agoSave config after blob updates from EAP (if update_config=1)
Jouni Malinen [Thu, 2 Oct 2008 11:10:53 +0000 (14:10 +0300)]
Save config after blob updates from EAP (if update_config=1)

This allows EAP-FAST PAC updates to be stored when using config blobs
instead of external files.

15 years agowpa_gui-qt4: Fixed phase2 format for EAP-FAST GTC+MSCHAPv2 case
Jouni Malinen [Thu, 2 Oct 2008 11:09:43 +0000 (14:09 +0300)]
wpa_gui-qt4: Fixed phase2 format for EAP-FAST GTC+MSCHAPv2 case

15 years agoFixed a typo
Jouni Malinen [Thu, 2 Oct 2008 09:40:24 +0000 (12:40 +0300)]
Fixed a typo

15 years agowpa_gui-qt4: Set EAP-FAST provisioning parameters
Jouni Malinen [Thu, 2 Oct 2008 09:39:31 +0000 (12:39 +0300)]
wpa_gui-qt4: Set EAP-FAST provisioning parameters

15 years agowpa_gui-qt4: Unset string variables instead of setting them to ""
Jouni Malinen [Thu, 2 Oct 2008 09:24:57 +0000 (12:24 +0300)]
wpa_gui-qt4: Unset string variables instead of setting them to ""

This allows identity (etc.) variables to be removed from configuration
which is different from setting them to an empty string. For example,
EAP-SIM and EAP-AKA can now be configured to use identity string generation
from SIM/USIM by clearing the identity string in wpa_gui.

15 years agoExtended ctrl_iface SET_NETWORK to allow variables to be unset
Jouni Malinen [Thu, 2 Oct 2008 09:16:25 +0000 (12:16 +0300)]
Extended ctrl_iface SET_NETWORK to allow variables to be unset

Setting the value of the SET_NETWORK command to NULL (without quotation)
unsets the variable, i.e., removes it from configuration file. This is
needed to allow GUI programs to clear variables, e.g., identity for
EAP-AKA/SIM.

15 years agowpa_gui-qt4: Added support for configuring Phase 2 method
Jouni Malinen [Wed, 1 Oct 2008 13:43:36 +0000 (16:43 +0300)]
wpa_gui-qt4: Added support for configuring Phase 2 method

15 years agoAdd pcsc="" to configuration for EAP-SIM and EAP-AKA
Jouni Malinen [Wed, 1 Oct 2008 11:44:24 +0000 (14:44 +0300)]
Add pcsc="" to configuration for EAP-SIM and EAP-AKA

This allows real SIM/USIM cards to be used by enabling PC/SC.

15 years agoSilenced some of the driver-related messages for driver=none case
Jouni Malinen [Wed, 1 Oct 2008 11:17:35 +0000 (14:17 +0300)]
Silenced some of the driver-related messages for driver=none case

No need to print these to confuse users that configure hostapd as a RADIUS
server without any AP functionality.

15 years agoAdded a new driver wrapper, "none", for RADIUS server only configuration
Jouni Malinen [Wed, 1 Oct 2008 11:07:55 +0000 (14:07 +0300)]
Added a new driver wrapper, "none", for RADIUS server only configuration

This can be used to limit hostapd code size and clean up debug output for
configurations that do not use hostapd to control AP functionality.

15 years agoFixed EAP-TTLS server to verify eap_ttls_phase2_eap_init() return code
Jouni Malinen [Wed, 1 Oct 2008 10:55:04 +0000 (13:55 +0300)]
Fixed EAP-TTLS server to verify eap_ttls_phase2_eap_init() return code

It is possible that the initialization of the Phase 2 EAP method fails and
if that happens, we need to stop EAP-TTLS server from trying to continue
using the uninitialized EAP method. Otherwise, the server could trigger
a segmentation fault when dereferencing a NULL pointer.

15 years agowpa_gui-qt4: add support for starting in system tray only
Kel Modderman [Wed, 1 Oct 2008 06:48:11 +0000 (09:48 +0300)]
wpa_gui-qt4: add support for starting in system tray only

Allow application to be started in the system tray only when started with
the `-t' command line argument.

Signed-off-by: Kel Modderman <kel@otaku42.de>
15 years agowpa_gui-qt4: clean up closeEvent handler
Kel Modderman [Wed, 1 Oct 2008 06:44:58 +0000 (09:44 +0300)]
wpa_gui-qt4: clean up closeEvent handler

When the system tray icon is created, qApp's setQuitOnLastWindowClosed
property is set to false, therefore do _not_ ignore widget close events, or
else wpa_gui will refuse to exit when the window manager is logging out.

While at it, remove WpaGui::fileExit() and connect fileExitAction to
quit().

Signed-off-by: Kel Modderman <kel@otaku42.de>
15 years agonl80211: clean up netlink code
Jouni Malinen [Tue, 30 Sep 2008 13:46:22 +0000 (16:46 +0300)]
nl80211: clean up netlink code

This is a port of commit cafe38cae01b0fcbc3b795ce02decf4ad93bee8f
from Johannes Berg <johannes@sipsolutions.net> for hostapd to
wpa_supplicant driver_nl80211.c.