3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-23 07:29:28 +01:00
Commit Graph

2248 Commits

Author SHA1 Message Date
James Prestwood
5c11c2f351 autotest: test AP Roam 2018-01-18 15:35:38 -06:00
James Prestwood
27a35da0ba autotests: add AP roam support to hostapd.py 2018-01-18 15:35:38 -06:00
James Prestwood
38e9a67da8 device: Add support for AP directed roaming
This patch adds a watcher/parser for the frame event associated with
an AP directed BSS transition (AP roaming). When the AP sends a BSS
transition request, this will parse out the BSS candidate list
(neighbor report) and initiate a roam scan. After this point the
existing roaming code path is reused.
2018-01-18 15:32:42 -06:00
James Prestwood
6a9de526a8 autotest: fix possible hlrauc race condition
The AuthCenter will now wait for the RX thread to start before
continuing with the test.

Also removed the non blocking option and fixed the loop to
handle a blocking recvfrom call.
2018-01-18 14:43:53 -06:00
Tim Kourt
ca183343e2 auto-t: Cleanup after a failure 2018-01-17 10:37:15 -06:00
Andrew Zaborowski
fb8063f37f netdev: Make sure we send SET_STATION after FT
Make sure that we set the AUTHORIZED sta flag after an FT in
netdev_set_pairwise_key_cb, I broke this in
a03839f8ef.
2018-01-16 11:13:54 -06:00
Andrew Zaborowski
69b852126d device: Remove unnecessary assignment 2018-01-16 11:12:10 -06:00
Tim Kourt
71669c4aec plugins: fix memory leak 2018-01-10 14:30:54 -06:00
Tim Kourt
b1745aca79 auto-t: stop AuthCenter on failures 2018-01-04 10:43:03 -06:00
James Prestwood
b8f426acfc docs: hlrauc documentation for pycrypto
The python library "pycrypto" is required for hlrauc to run.
2018-01-04 10:42:11 -06:00
James Prestwood
bacc4e7938 docs: added documentation for ofono/test runner 2018-01-04 10:42:11 -06:00
James Prestwood
cf3372235c autotests: EAP-AKA' autotest using ofono 2017-12-14 17:47:39 -06:00
James Prestwood
6d07cac299 autotest: added test for EAP-SIM with ofono 2017-12-14 17:47:34 -06:00
James Prestwood
9d4532fe68 autotest: Added autotest for EAP-AKA with ofono 2017-12-14 17:47:32 -06:00
James Prestwood
6942e9c7b1 autotest: Added ofono.py utility
A new class which can be used to power on a modem and wait
for the Interfaces/Properties EAP-SIM/AKA need for
authentication.
2017-12-14 17:47:29 -06:00
James Prestwood
d175e4aa42 test-runner: add ofono/phonesim to test-runner
A new option 'sim_keys' can be put in the SETUP group. If
sim_keys=ofono, then test-runner will attempt to start ofono
and phonesim to be used with EAP-SIM/AKA. If ofono OR phonesim
are not found the test will be skipped.

Any other value of 'sim_keys' should be a 'keys' file
e.g. /tmp/sim_keys.conf which should contain hardcoded
SIM/AKA key values.
2017-12-14 17:46:46 -06:00
James Prestwood
341fb0613a autotest: Added phonesim.conf file
SIM/AKA/AKA' (ofono) autotests will require phonesim.conf for
ofono to communicate with phonesim
2017-12-14 17:41:41 -06:00
James Prestwood
9474785839 autotest: Updated sim_keys for identity prefix change 2017-12-14 16:23:40 -06:00
James Prestwood
f82c2253ce eap-aka/sim: Automatically prefix identities
The identity retrieved from simauth was required to include the
prefix for SIM/AKA/AKA', but in reality a real SIM would not
include that prefix in the IMSI. Now the correct prefix is
prepended onto the identity depending on the EAP method.
2017-12-14 16:23:40 -06:00
James Prestwood
f7a9caef2b simauth: remove unregister API
The unregister simauth API was unused and not required, this
also fixes a double free when freeing the NAI.
2017-12-14 16:22:09 -06:00
James Prestwood
74d991bf8e autotest: update EAP-AKA' autotest after plugin change
A new 'keys' file must be added for hardcoded keys
2017-12-14 13:49:59 -06:00
James Prestwood
59c5e0b149 autotest: update EAP-SIM autotest after plugin change
A new 'keys' file must be added for hardcoded keys
2017-12-14 13:49:59 -06:00
James Prestwood
daa215a9c3 autotest: update EAP-AKA autotest after plugin change
A new 'keys' file must be added for hardcoded keys
2017-12-14 13:49:59 -06:00
James Prestwood
4911ba1e59 unit: updated Makefile to build simauth.c for eap-sim 2017-12-13 17:13:29 -06:00
James Prestwood
e9e96604c5 autotests: fix issue with hlrauc reading sim database
hlrauc.py was not stripping out newlines when reading the sim
database files.

Also added a print if an exception occurred.
2017-12-13 17:13:29 -06:00
James Prestwood
263074511d autotests: updated hlrauc.py to support re-sync
If the peer detects a sync error, it sends back AUTS. The
authentication center must then re-synchronize and update
the SQN it has saved for the given ISMI.
2017-12-13 17:13:29 -06:00
James Prestwood
5f3bf1dbac eap-aka: support for synchronization error
If the SQN in AUTN is incorrect the simauth module will return
the AUTS parameter, which is sent back to the server and the
servers SQN number is updated.
2017-12-13 17:13:29 -06:00
James Prestwood
3de239ed9e simutil: removed milenage algorithm from simutil
The simauth module now checks the milenage values
2017-12-13 17:13:29 -06:00
James Prestwood
1fa218fc8d eap-aka: Updated EAP-AKA to use simauth module 2017-12-13 16:16:32 -06:00
James Prestwood
80aa03edd8 eap-sim: Updated EAP-SIM to use simauth module 2017-12-13 16:14:59 -06:00
James Prestwood
a1ceb34bec simauth: fixup to add proper return values
The GSM and Milenage API's should return an integer which
can be used to cancel the request, they were returning bool.
2017-12-13 16:12:24 -06:00
James Prestwood
5d6118681d plugins: added ofono plugin to build 2017-12-13 11:53:42 -06:00
James Prestwood
ebc3304264 plugins: added ofono plugin
Implements a sim auth driver that communicates with ofono to handle
GSM/UMTS authentication algorithms. This plugin takes care of
disovering ofono, the modem, IMSI, and SIM capabilities i.e. what
algorithms are supported.
2017-12-13 11:53:42 -06:00
James Prestwood
3eb0083170 plugins: updated sim_hardcoded with simauth changes 2017-12-11 23:37:04 -06:00
James Prestwood
36804b1b5c simauth: add register/unregister API's
Forcing a plugin to create and register simauth at once is sometimes
inconvenient. This patch separates the creation and registration
into two API's, and also adds several others to add the required simauth
data incrementally (identity, driver data, sim/aka support). This also
allows for the driver to unregister the auth provider without freeing
up the simauth object itself e.g. if the driver temporarily becomes
unavailable, but will come back sometime in the future.

The simauth watch API's were also renamed. Watchers will now get a
callback when the provider has been unregistered, so they have been
renamed to sim_auth_unregistered_watch_[add|remove].
2017-12-11 23:36:43 -06:00
Denis Kenzior
dd867a1e13 build: Add new dbus-client.[ch] files from ell 2017-12-06 15:05:06 -06:00
James Prestwood
074fb7df56 make: added hardcoded SIM plugin to build 2017-12-06 15:04:07 -06:00
James Prestwood
48800e2a7a plugins: hardcoded SIM plugin
Provides a driver for hardcoding EAP-SIM/AKA keys. The driver
expects the environment variable IWD_SIM_KEYS to point to a
valid config file with IMSI, Kc, SRES for SIM or IMSI, KI, OPC,
AMF for AKA. To use this driver '--plugin=sim_hardcoded' must
be supplied when IWD starts.
2017-12-06 15:03:53 -06:00
James Prestwood
1a975a1168 simauth: fixup, destroy watchlist was not being removed 2017-11-30 12:44:06 -06:00
Denis Kenzior
777c7c3dae simauth: Fix compiler warning
src/simauth.c:163:6: error: no previous declaration for ‘sim_auth_cancel_request’ [-Werror=missing-declarations]
 void sim_auth_cancel_request(struct iwd_sim_auth *auth, int id)
      ^~~~~~~~~~~~~~~~~~~~~~~
2017-11-30 08:56:10 -06:00
James Prestwood
a595587b65 main: start simauth module 2017-11-30 08:49:49 -06:00
James Prestwood
6c95faf88f make: added simauth source to build 2017-11-30 08:49:49 -06:00
James Prestwood
e030151f7d main: start up plugin module
iwd now supports plugin loading, whitelisting and blacklisting.  Both
the whitelist and the blacklist support multiple patterns separated by a
',' character.
2017-11-28 13:32:36 -06:00
James Prestwood
8c6099fb9e plugins: added plugin module to build 2017-11-28 13:30:44 -06:00
James Prestwood
09de4433ad plugins: module to load ell plugins 2017-11-28 13:30:06 -06:00
James Prestwood
517df48101 make: plugin system for build
Preperation for ell plugins. New plugins can be added to
builtin_sources/builtin_modules, which will be added
to src/builtin.h when it is generated.
2017-11-28 13:20:33 -06:00
Andrew Zaborowski
016dcd52d8 device: Fix an autoconnect corner case
Make sure device->autoconnect is set when entering the autoconnect state
after netdev UP event.  Otherwise the next time
device_set_autoconnect(device, false) is called it will exit early seeing
that device->autoconnect is false and not switch the device state.
2017-11-27 09:56:04 -06:00
James Prestwood
46c1e8fa60 simauth: new module to handle EAP-SIM/AKA auth
This is the core module that takes care of registering
authentication drivers. EAP-SIM/AKA will be able to acquire
a driver that supports the required algorithms. The driver
implementation (hardcoded/ofono etc.) is isolated into
separate plugin modules.
2017-11-22 11:59:13 -06:00
James Prestwood
1d119d58c1 watchlist: added macro for notifying with no args
The macros currently did not support notifying a watchlist with
no extra arguments.
2017-11-16 14:10:47 -06:00
James Prestwood
c0fe2b78c4 eap: new method API for getting EAP-Identity
EAP-SIM/AKA/AKA' retrieve the EAP-Identity off the SIM card
not from the settings file. This adds a new EAP method API
which can optionally be implemented to retrieve the identity.
If get_identity is implemented, the EAP layer will use it to
retrieve the identity rather than looking in the settings file.
2017-11-13 11:09:37 -06:00