libeap.git
16 years agoChargeable-User-Identity (RFC 4372) in eapol_test
Tomasz Wolniewicz [Sun, 30 Mar 2008 14:39:19 +0000 (17:39 +0300)]
Chargeable-User-Identity (RFC 4372) in eapol_test

Implements the Chargable-User-Identity (CUI), as defined in RFC 4372.
Option "-i" causes the eapol_test to send a NUL CUI - which is a request to
send a CUI back. Capital "-I" allows to specify the value of the CUI.
This has been defined for cases where the client wants to reauthenticate.

16 years agoTNC: Added preliminary code for IF-TNCCS-SOH server side support
Jouni Malinen [Sun, 30 Mar 2008 14:10:44 +0000 (17:10 +0300)]
TNC: Added preliminary code for IF-TNCCS-SOH server side support

If TNC is enabled, PEAPv0 server is now sending out SoH request to initiate
IF-TNCCS-SOH (Microsoft NAP / Statement of Health) handshake. The results
are currently only shown in debug log and they do not affect authentication
or authorization result.

16 years agoEAP-TTLS: Fixed implicit challenge derivation to use correct output length
Jouni Malinen [Sun, 23 Mar 2008 10:07:59 +0000 (12:07 +0200)]
EAP-TTLS: Fixed implicit challenge derivation to use correct output length

The previous version was deriving unnecessarily large amount of output data
for the implicit challenge. With the TLS PRF, this was not causing any
problems because the output length is not explicitly bound into the
derivation. Anyway, it is better to use the correct output length should
the PRF be ever changed to a one that uses the output length to change the
beginning of the output data.

16 years agoEAP-PEAP: Fixed interop issues in key derivation with cryptobinding
Jouni Malinen [Wed, 19 Mar 2008 14:58:06 +0000 (16:58 +0200)]
EAP-PEAP: Fixed interop issues in key derivation with cryptobinding

It looks like Microsoft implementation does not match with their
specification as far as PRF+ label usage is concerned.. IPMK|CMK is derived
without null termination on the label, but the label for CSK derivation
must be null terminated.

This allows cryptobinding to be used with PEAPv0 in a way that
interoperates with Windows XP SP3 (RC2) and as such, this functionality is
now enabled as an optional addition to PEAPv0.

16 years agoEAP-PEAP: Swap MS-CHAP-v2 MPPE keys for EAP-PEAP ISK derivation
Jouni Malinen [Tue, 18 Mar 2008 14:27:55 +0000 (16:27 +0200)]
EAP-PEAP: Swap MS-CHAP-v2 MPPE keys for EAP-PEAP ISK derivation

Microsoft uses reverse order for MS-MPPE keys in EAP-PEAP when compared to
EAP-FAST derivation of ISK. Swap the keys here to get the correct ISK for
EAP-PEAPv0 cryptobinding. This resolves the cryptobinding interop issue
with WinXP SP3 RC2. However, it looks like MSK derivation does not
interoperate when using cryptobinding, so this code remains disabled for
the time being.

16 years agoEAP-PEAP: Added preliminary code for PEAPv0 and PEAPv2 cryptobinding
Jouni Malinen [Tue, 18 Mar 2008 10:19:52 +0000 (12:19 +0200)]
EAP-PEAP: Added preliminary code for PEAPv0 and PEAPv2 cryptobinding

This implementation is complete for PEAPv0 (Microsoft extension), but the
use of cryptobinding is disabled in this version, i.e., this does not
change protocol behavior at all.

Interop tests between hostapd and wpa_supplicant work fine, but there are
some problems in getting hostapd to interoperate with Windows XP SP3 RC2
(peer replies with Result Failure to the attempted cryptobinding). The
implementation will remain disabled until this issue has been resolved.

16 years agoEAP-PEAP: Moved EAP-TLV processing into eap_peap.c
Jouni Malinen [Tue, 18 Mar 2008 09:26:17 +0000 (11:26 +0200)]
EAP-PEAP: Moved EAP-TLV processing into eap_peap.c

EAP-PEAP was the only method that used the external eap_tlv.c peer
implementation. This worked fine just for the simple protected result
notification, but extending the TLV support for cryptobinding etc. is not
trivial with such separation. With the TLV processing integrated into
eap_peap.c, all the needed information is now available for using
additional TLVs.

16 years agoEAP-PEAP: Moved EAP-TLV processing into eap_peap.c
Jouni Malinen [Tue, 18 Mar 2008 06:31:04 +0000 (08:31 +0200)]
EAP-PEAP: Moved EAP-TLV processing into eap_peap.c

EAP-PEAP was the only method that used the external eap_tlv.c server
implementation. This worked fine just for the simple protected result
notification, but extending the TLV support for cryptobinding etc. is not
trivial with such separation. With the TLV processing integrated into
eap_peap.c, all the needed information is now available for using
additional TLVs.

16 years agoSome cleanup for the new driver wrapper for PS3
Jouni Malinen [Thu, 13 Mar 2008 17:05:45 +0000 (19:05 +0200)]
Some cleanup for the new driver wrapper for PS3

wpa_printf() does not use '\n'. Fixed set_wpa_key() to allocate buf for
ASCII passphrase case.

16 years agoAdd support for PS3 Linux wireless driver
Masakazu Mokuno [Thu, 13 Mar 2008 17:00:37 +0000 (19:00 +0200)]
Add support for PS3 Linux wireless driver

This adds support for PS3 wireless to wpa_supplicant.

Although PS3 wireless driver is designed to conform the WEXT standard
as much as possible, unfortunately the wext driver wrapper of
wpa_supplicant can not support PS3 wireless fully because:

 - PS3 wireless driver uses private WEXT ioctls for accepting PSK of
   WPA-Personal from the userland.
   WEXT does not specify the way to do it.

 - The association and 4-way handshake are done by PS3 virtual
   wireless device. The guest OSes can not interfere it.

 - No EAPOL frames are allowed to go outside of the
   hypervisor/firmware nor come from. They are eaten by the firmware.

Thus I needed to make a new driver wrapper for PS3 wireless.

This patch can be applied against the latest 0.6.x tree.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
16 years agoSupport for RADIUS ACLs with drivers that do not use hostapd MLME
Chris Zimmermann [Wed, 12 Mar 2008 09:43:55 +0000 (11:43 +0200)]
Support for RADIUS ACLs with drivers that do not use hostapd MLME

Sam Leffler <sam@errno.com>:
Attached are changes from Chris Zimmerman (cc'd) to allow drivers to handle
radius ACL's.  The patch is against 0.5.10 but I suspect will also apply to
your latest code.  These mods enable radius acl support in freebsd w/ my
vap code.

You may want to do the changes to ieee802_11_auth.c differently as they
currently require all participating drivers to work the same.  You might be
able to check the return value from hostapd_set_radius_acl_auth and use
that to decide whether the alternate code should be run so you can have 1
driver using this stuff while the other does not.

(jm: Added without more dynamic check for now; in addition, none of the
current in-tree driver wrappers actually implement these handlers, so this
is in preparation for future changes)

16 years agohostapd_allowed_address() is called from hostapd_config_reload_sta() with
Chris Zimmermann [Wed, 12 Mar 2008 09:39:56 +0000 (11:39 +0200)]
hostapd_allowed_address() is called from hostapd_config_reload_sta() with
session_timeout and acct_interim_interval set to NULL.  Without checking
these before accessing, we'd cause a NULL pointer access in this case.  In
ieee802_11.c calls hostapd_allowed_address() with valid pointers.

16 years agoFT: Use correct BSSID when deriving PTK and verifying MIC
Jouni Malinen [Wed, 12 Mar 2008 09:20:20 +0000 (11:20 +0200)]
FT: Use correct BSSID when deriving PTK and verifying MIC

The old version was using struct wpa_sm::bssid which is not necessarily
updated to point to the correct target address when doing over-the-air FT
since the address is used before the association has actually been
completed.

16 years agoDelete PTK SA on (re)association if this is not part of a Fast BSS
Jouni Malinen [Wed, 12 Mar 2008 09:18:57 +0000 (11:18 +0200)]
Delete PTK SA on (re)association if this is not part of a Fast BSS
Transition. This fixes a potential issue where an incorrectly behaving AP
could send a group key update using the old (now invalid after reassociate)
PTK. This could also happen if there is a race condition between reporting
received EAPOL frames and association events.

16 years agoThe attached patch fixes a few build errors when compiling with GCC 4.3,
Ryan Hill [Wed, 12 Mar 2008 07:39:25 +0000 (09:39 +0200)]
The attached patch fixes a few build errors when compiling with GCC 4.3,
caused by a few missing header includes. It was done against 0.5.8, but
still applies to 0.5.10.

16 years agoSilence gcc 4.3.0 warnings about invalid array indexes
Jouni Malinen [Wed, 12 Mar 2008 07:33:18 +0000 (09:33 +0200)]
Silence gcc 4.3.0 warnings about invalid array indexes

16 years agoTNC: Added TNC server support into documentation and ChangeLogs
Jouni Malinen [Sun, 9 Mar 2008 10:14:15 +0000 (12:14 +0200)]
TNC: Added TNC server support into documentation and ChangeLogs

16 years agoTNC: Integrated TNC support into EAP-TTLS server
Jouni Malinen [Sun, 9 Mar 2008 10:05:06 +0000 (12:05 +0200)]
TNC: Integrated TNC support into EAP-TTLS server

If TNC is enabled, EAP-TTLS will run a second EAP (TNC) inside the tunnel
after a successful authentication.

16 years agoTNC: Fixed TNC when using EAP-TTLS with non-EAP Phase 2
Jouni Malinen [Sun, 9 Mar 2008 10:04:10 +0000 (12:04 +0200)]
TNC: Fixed TNC when using EAP-TTLS with non-EAP Phase 2

Need to process EAP AVP after the non-EAP Phase 2 method. In addition,
EAP-TTLS/MSCHAPv2 needs special code for handling the starting of TNC after
extra roundtrip of MSCHAPv2 success message.

16 years agoTNC: Integrated TNC support into EAP-FAST server
Jouni Malinen [Sun, 9 Mar 2008 09:22:17 +0000 (11:22 +0200)]
TNC: Integrated TNC support into EAP-FAST server

Tunneled EAP sequence is now used to perform both the authentication (e.g.,
using EAP-GTC) and TNC validation (EAP-TNC) inside the EAP-FAST tunnel if
TNC has been enabled.

16 years agoTNC: Added support for using TNC with EAP-FAST
Jouni Malinen [Sun, 9 Mar 2008 09:21:01 +0000 (11:21 +0200)]
TNC: Added support for using TNC with EAP-FAST

16 years agoTNC: Provide 'tnc' configuration option for EAP server and methods
Jouni Malinen [Sun, 9 Mar 2008 08:42:53 +0000 (10:42 +0200)]
TNC: Provide 'tnc' configuration option for EAP server and methods

16 years agoTNC: Added preliminary TNC implementation for hostapd
Jouni Malinen [Sun, 9 Mar 2008 08:37:18 +0000 (10:37 +0200)]
TNC: Added preliminary TNC implementation for hostapd

This adds EAP-TNC method and TNCS (IF-IMV and IF-TNCCS) functionality.
There is no integration with EAP-TTLS and EAP-FAST at this point, so this
version is not yet suitable for real use (i.e., EAP-TNC can only be tested
outside a tunnel which is not an allowed configuration for deployment).
However, the basic TNCS functionality is more or less complete and this
version seems to interoperate with wpa_supplicant.

16 years agoMake the "invalid group" error show up with default verbosity level
Jouni Malinen [Thu, 6 Mar 2008 20:49:46 +0000 (22:49 +0200)]
Make the "invalid group" error show up with default verbosity level

16 years agoFix qt3 wpa_gui build
Dan Williams [Wed, 5 Mar 2008 16:30:01 +0000 (18:30 +0200)]
Fix qt3 wpa_gui build

When a WpaMsg item to the QValueList WpaMsgList, there's no constructor
that the QValueList can call.  This is a port of the fix from the stable
branch where it builds fine.

16 years agoFix potential use-after-free in dbus byte array demarshaling code
Dan Williams [Wed, 5 Mar 2008 14:15:10 +0000 (16:15 +0200)]
Fix potential use-after-free in dbus byte array demarshaling code

The byte array code should be clearing its own pointer, not the string
array pointer.

16 years agoAdded a missing '#' to indicate a comment.
Jouni Malinen [Wed, 5 Mar 2008 14:06:43 +0000 (16:06 +0200)]
Added a missing '#' to indicate a comment.

16 years agoRenamed local DBUS_VERSION define to avoid conflict with dbus 1.1 headers
Jouni Malinen [Wed, 5 Mar 2008 14:05:26 +0000 (16:05 +0200)]
Renamed local DBUS_VERSION define to avoid conflict with dbus 1.1 headers

16 years agoEAP-FAST: Verify that identity from PAC-Opaque matches with Phase 2 (GTC)
Jouni Malinen [Thu, 28 Feb 2008 02:00:12 +0000 (18:00 -0800)]
EAP-FAST: Verify that identity from PAC-Opaque matches with Phase 2 (GTC)

16 years agoEAP-FAST: Cleaned up TLV processing and added support for EAP Sequences
Jouni Malinen [Thu, 28 Feb 2008 01:59:34 +0000 (17:59 -0800)]
EAP-FAST: Cleaned up TLV processing and added support for EAP Sequences

Number of TLVs were processed in groups and these cases were now separated
into more flexible processing of one TLV at the time. wpabuf_concat()
function was added to make it easier to concatenate TLVs. EAP Sequences are
now supported in both server and peer code, but the server side is not
enabled by default.

16 years agoEAP-FAST: Define and use EAP_FAST_CMK_LEN
Jouni Malinen [Thu, 28 Feb 2008 01:58:46 +0000 (17:58 -0800)]
EAP-FAST: Define and use EAP_FAST_CMK_LEN

16 years agoRemoved extra '_' from struct eap_tlv_crypto_binding__tlv name
Jouni Malinen [Thu, 28 Feb 2008 01:58:13 +0000 (17:58 -0800)]
Removed extra '_' from struct eap_tlv_crypto_binding__tlv name

16 years agoEAP-FAST: Divided eap_fast_process() into number of helper functions
Jouni Malinen [Thu, 28 Feb 2008 01:57:49 +0000 (17:57 -0800)]
EAP-FAST: Divided eap_fast_process() into number of helper functions

16 years agoEAP-FAST: Moved common peer/server functionality into a shared file
Jouni Malinen [Thu, 28 Feb 2008 01:57:19 +0000 (17:57 -0800)]
EAP-FAST: Moved common peer/server functionality into a shared file

16 years agoEAP-FAST: Added shared helper functions for building TLVs
Jouni Malinen [Thu, 28 Feb 2008 01:56:30 +0000 (17:56 -0800)]
EAP-FAST: Added shared helper functions for building TLVs

16 years agoEAP-FAST: Add peer identity into EAP-FAST PAC-Opaque
Jouni Malinen [Thu, 28 Feb 2008 01:55:40 +0000 (17:55 -0800)]
EAP-FAST: Add peer identity into EAP-FAST PAC-Opaque

This allows Phase 2 Identity Request to be skipped if the identity is
already known from PAC-Opaque received in TLS handshake in order to save
one roundtrip from normal authentication.

16 years agoPreparations for 0.4.11 release
Jouni Malinen [Thu, 28 Feb 2008 01:54:41 +0000 (17:54 -0800)]
Preparations for 0.4.11 release

16 years agoAdded max_listen_interval configuration option
Jouni Malinen [Thu, 28 Feb 2008 01:54:06 +0000 (17:54 -0800)]
Added max_listen_interval configuration option

This allows associations to be denied if the STA tries to use too large
listen interval. The default value is 65535 which matches with the field
size limits.

16 years agodriver_ralink: Make sure assoc_{req,resp}_ies do not get double-freed
Jouni Malinen [Thu, 28 Feb 2008 01:53:22 +0000 (17:53 -0800)]
driver_ralink: Make sure assoc_{req,resp}_ies do not get double-freed

16 years agodriver_ralink: Use os_strlcpy instead of os_strncpy to ensure null
Jouni Malinen [Thu, 28 Feb 2008 01:52:43 +0000 (17:52 -0800)]
driver_ralink: Use os_strlcpy instead of os_strncpy to ensure null
termination

16 years agodriver_ralink: Fixed couple of memory leaks on error path
Jouni Malinen [Thu, 28 Feb 2008 01:52:05 +0000 (17:52 -0800)]
driver_ralink: Fixed couple of memory leaks on error path

16 years agoVerify that os_get_time() does not fail before using the time value when
Jouni Malinen [Thu, 28 Feb 2008 01:50:36 +0000 (17:50 -0800)]
Verify that os_get_time() does not fail before using the time value when
registering an eloop timeout.

16 years agoFixed base64_decode() reject empty input buffers
Jouni Malinen [Thu, 28 Feb 2008 01:49:59 +0000 (17:49 -0800)]
Fixed base64_decode() reject empty input buffers

16 years agoEnforce non-zero MPPE key length
Jouni Malinen [Thu, 28 Feb 2008 01:49:24 +0000 (17:49 -0800)]
Enforce non-zero MPPE key length

16 years agoEnhance manpage with use of emphasis instead of strong quote
Kel Modderman [Thu, 28 Feb 2008 01:48:23 +0000 (17:48 -0800)]
Enhance manpage with use of emphasis instead of strong quote

The Debian package checker "lintian" was making noise about
wpa_supplicant.conf(5). It was caused by a line beginning with ', which is
apparently not liked by man(1).

I suggest the use of <emphasis>word</emphasis> where 'word' is used at the
moment.

Signed-off-by: Kel Modderman <kel@otaku42.de>
16 years agoSilence SIOCSIWAUTH ioctl failure message.
Jouni Malinen [Thu, 28 Feb 2008 01:47:23 +0000 (17:47 -0800)]
Silence SIOCSIWAUTH ioctl failure message.

These are expected in most cases and there is no need to confuse users
with the messages in stderr (perror was used here). These are now only
shown in debug output and EOPNOTSUPP errors are silently ignored.

16 years agoAdded listen interval to hostapd sta_add() driver function
Jouni Malinen [Thu, 28 Feb 2008 01:45:00 +0000 (17:45 -0800)]
Added listen interval to hostapd sta_add() driver function

16 years agoAdded files that cg-init excluded hostap_0_6_3
Jouni Malinen [Thu, 28 Feb 2008 01:36:06 +0000 (17:36 -0800)]
Added files that cg-init excluded

16 years agoRe-initialize hostapd/wpa_supplicant git repository based on 0.6.3 release
Jouni Malinen [Thu, 28 Feb 2008 01:34:43 +0000 (17:34 -0800)]
Re-initialize hostapd/wpa_supplicant git repository based on 0.6.3 release