wifi: Add WPA2 EAP-TLS support

Add basic WPA2 EAP-TLS support.
Also, add test infrasturcture esp. the certification handling,
non-certificate credentials are take as runtime input and certificated
are build time input for testing.

A real application can set certificates at runtime too.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This commit is contained in:
Maochen Wang 2024-06-24 15:42:59 +08:00 committed by Henrik Brix Andersen
commit 1db73c3d4f
14 changed files with 550 additions and 4 deletions

View file

@ -24,6 +24,39 @@ Currently, two types of Wi-Fi drivers are supported:
* Networking or socket offloaded drivers
* Native L2 Ethernet drivers
Wi-Fi Enterprise test: X.509 Certificate header generation
**********************************************************
Wi-Fi enterprise security requires use of X.509 certificates, test certificates
in PEM format are committed to the repo at :zephyr_file:`samples/net/wifi/test_certs` and the during the
build process the certificates are converted to a `C` header file that is included by the Wi-Fi shell
module.
.. code-block:: bash
$ cp client.pem samples/net/wifi/test_certs/
$ cp client-key.pem samples/net/wifi/test_certs/
$ cp ca.pem samples/net/wifi/test_certs/
$ west build -p -b <board> samples/net/wifi
To initiate Wi-Fi connection, the following command can be used:
.. code-block:: console
uart:~$ wifi connect -s <SSID> -k 5 -a anon -K whatever
Server certificate is also provided in the same directory for testing purposes.
Any `AAA` server can be used for testing purposes, for example, `FreeRADIUS` or `hostapd`.
.. important::
The passphrase for the client-key.pem and the server-key.pem is `whatever`.
.. note::
The certificates are for testing purposes only and should not be used in production.
The certificates are generated using `FreeRADIUS raddb <https://github.com/FreeRADIUS/freeradius-server/tree/master/raddb/certs> _` scripts.
API Reference
*************