Jouni Malinen
9a4feed2f8
tests: Update dpp_proto_after_wrapped_data_pkex_cr_req for PKEXv2
...
Check for both PKEX v1 and v2 variants of the message.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-01-24 22:58:38 +02:00
Jouni Malinen
bb6fa62b3f
tests: Fix DPP PKEXv2 capability checks
...
At least for the time being PKEXv2 needs CONFIG_DPP3=y to work in a
testable manner. Couple of the test cases did not cover this correctly
and resulted in failures (instead of skipping the tests) when the
default build configuration was used. Fix that by checking for DPP
version 3.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2021-12-14 19:45:43 +02:00
Jouni Malinen
f373c7b93f
tests: DPP PKEXv2
...
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2021-12-07 23:26:29 +02:00
Jouni Malinen
00b2fb2d04
tests: DPP3 protocol version during network introduction
...
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2021-12-03 21:24:59 +02:00
Jouni Malinen
77ddd38b66
DPP3: Add build option for version 3 functionality
...
CONFIG_DPP3=y can now be used to configure hostapd and wpa_supplicant
builds to include DPP version 3 functionality. This functionality is
still under design and the implementation is experimental and not
suitable to be enabled in production uses before the specification has
been finalized.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2021-12-03 21:24:59 +02:00
Cedric Izoard
fa193c1a73
tests: Fix DPP test cases for BoringSSL
...
When checking DPP capabilities the Brainpool flag was not always set
when needed, leading to run a test with the Brainpool curves not
supported by BoringSSL.
Use a short form for the DER length of EC privateKey with NIST P-521
curve. Indeed BoringSSL returns an error when parsing DER sequence 30 81
50 ... because the length 81 50 could have been encoded as 50 and
according comment in BoringSSL:
ITU-T X.690 section 10.1 (DER length forms) requires encoding the
length with the minimum number of octets.
Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
2021-11-03 15:48:45 +02:00
Cedric Izoard
2086ae46b3
DPP: Replace dpp_bootstrap_key_der() with crypto_ec_key_get_subject_public_key()
...
As BoringSSL version of i2d_PUBKEY() doesn't respect the
POINT_CONVERSION_COMPRESSED flag redefine a specific
crypto_ec_key_get_subject_public_key() version for BoringSSL based on
dpp_bootstrap_key_der().
The only other user of crypto_ec_key_get_subject_public_key() is SAE-PK
for which the public key should also be formatted using compressed
format.
Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
2021-11-03 15:45:00 +02:00
Cedric Izoard
c6f2103cac
DPP: Replace dpp_get_pubkey_point() with crypto_ec_key_get_pubkey_point()
...
Move code of dpp_get_pubkey_point() to a crypto library specific
function crypto_ec_key_get_pubkey_point().
Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
2021-10-26 18:06:32 +03:00
Jouni Malinen
a47d484919
tests: DPP Controller management in hostapd over interface addition/removal
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2021-10-19 00:32:02 +03:00
Jouni Malinen
d961326f19
tests: DPP Relay and incomplete connections
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2021-04-13 00:31:36 +03:00
Jouni Malinen
e6510056db
tests: DPP PFS error cases
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-03-24 00:05:05 +02:00
Jouni Malinen
4871df4bf7
tests: DPP NFC operation failures in hostapd
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-03-21 16:55:44 +02:00
Jouni Malinen
9c809b2aaa
tests: DPP bootstrapping via NFC URI record (hostapd reading tag)
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-03-21 16:39:46 +02:00
Jouni Malinen
c4b2d6f566
tests: DPP GAS Query error cases with hostapd
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-03-21 16:33:41 +02:00
Jouni Malinen
ed8a5733bd
tests: DPP and hostapd as Enrollee with GAS fragmentation/timeout
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-03-20 12:55:21 +02:00
Jouni Malinen
9056f918b6
tests: DPP connection status - success with hostapd as Configurator
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-03-20 12:19:12 +02:00
Jouni Malinen
fb9cd650e5
tests: DPP with hostapd as configurator/initiator with v1 enrollee
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-03-20 11:57:10 +02:00
Jouni Malinen
68b69d6607
tests: DPP chirp by an AP on 5 GHz
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-03-20 11:57:10 +02:00
Jouni Malinen
6e3fed1d98
tests: DPP Authentication Confirm timeout in hostapd
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-03-14 18:52:54 +02:00
Jouni Malinen
87429fc687
tests: Check DPP capability in couple of forgotten cases
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-03-14 13:08:04 +02:00
Jouni Malinen
ac2dddf7d1
tests: DPP NFC with hostapd
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-03-07 17:38:27 +02:00
Jouni Malinen
96279a5c51
tests: DPP chirp with an AP as a standalone Configurator
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-03-07 13:18:01 +02:00
Jouni Malinen
fd13693cac
tests: DPP PKEX errors with hostapd
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-03-07 13:12:37 +02:00
Jouni Malinen
d28c2de249
tests: DPP chirp errors in hostapd
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-03-07 13:02:59 +02:00
Jouni Malinen
692ff6f002
tests: DPP Controller management in hostapd
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-03-07 12:57:25 +02:00
Jouni Malinen
811d26705a
tests: DPP config overrides in hostapd
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-02-28 22:48:00 +02:00
Jouni Malinen
250cb99f4d
tests: Additional coverage for hostapd GET_CONFIG key_mgmt values
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2021-02-28 22:31:58 +02:00
Jouni Malinen
ffcca901e7
tests: DPP Authentication Request destination address in chirp case
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2021-02-09 20:43:33 +02:00
Jouni Malinen
995ee4c94b
tests: DPP Responder behavior on missing Auth Confirm
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2021-01-22 19:18:10 +02:00
Andrei Otcheretianski
eac2b65635
tests: Skip dpp_enterprise_tcp tests without OpenSSL
...
Skip these tests if OpenSSL wasn't loaded, instead of crashing.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2020-12-04 11:54:27 +02:00
Jouni Malinen
2d8a7cf3f5
tests: Update dpp_controller_rx_errors to use the assigned TCP port
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-10-21 00:31:01 +03:00
Jouni Malinen
fe27c464fd
tests: DPP-CHIRP-RX reception
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-10-07 21:31:46 +03:00
Jouni Malinen
d049aeb0c6
tests: DPP with hostapd as configurator requiring fragmentation
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-10-06 23:37:17 +03:00
Jouni Malinen
440a5e235b
tests: DPP PFS fallback with SAE enabled
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-09-23 23:09:32 +03:00
Jouni Malinen
255e29fcae
tests: DPP Controller in hostapd
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-08-25 16:11:43 +03:00
Jouni Malinen
ab676bc1fa
tests: DPP over TCP (mutual)
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-08-12 12:08:26 +03:00
Jouni Malinen
57e2e5ed7a
tests: DPP over TCP for enterprise provisioning (Controller initiating)
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-08-10 10:42:49 +03:00
Jouni Malinen
b58cd7aa1c
tests: DPP reconfiguration retries
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-08-08 00:14:00 +03:00
Jouni Malinen
ad2119cbc6
tests: DPP reconfiguration connector with different groups
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-08-07 15:26:15 +03:00
Jouni Malinen
268433ecd0
tests: DPP Configurator enrolling followed by use of the new Configurator
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-07-23 18:01:55 +03:00
Jouni Malinen
1046145093
tests: Copy subject from CSR to certificate
...
Instead of overriding the subject field with something arbitrary, use
the value that is included in the CSR now that there is something there.
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-06-19 00:36:44 +03:00
Jouni Malinen
a758a66725
tests: DPP over TCP for enterprise provisioning
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-06-19 00:13:48 +03:00
Jouni Malinen
725d98a513
tests: DPP and enterprise provisioning and CSR getting rejected
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-06-17 21:42:35 +03:00
Jouni Malinen
5abf8ad9b2
tests: DPP enterprise provisioning
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-06-16 18:26:09 +03:00
Jouni Malinen
d5b596996e
tests: DPP chirp by an AP
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-05-13 17:59:05 +03:00
Jouni Malinen
b37a1ec24f
tests: DPP over TCP (Configurator initiates)
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-05-12 14:48:49 +03:00
Jouni Malinen
217656d098
tests: DPP reconfiguration exchange
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-05-11 17:26:11 +03:00
Jouni Malinen
b227515fae
tests: Update dpp_peer_intro_local_failures to match implementation
...
The memory allocation in dpp_peer_intro() was moved into a helper
function dpp_check_signed_connector(), so update the test case to match.
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-05-11 16:41:33 +03:00
Jouni Malinen
6eb03715e3
tests: Update dpp_pkex_test_fail to match implementation
...
dpp_derive_ke() was renamed to dpp_derive_bk_ke().
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-05-10 15:55:30 +03:00
Jouni Malinen
046f2d1fb9
tests: DPP URI version information
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-05-06 11:59:11 +03:00
Jouni Malinen
1a59ebf2e5
tests: DPP version override
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-05-04 00:37:45 +03:00
Jouni Malinen
f114156804
tests: Disable PFS in dpp_akm_sha*
...
These test cases are using externally generated PMKSA cache entry which
does not support use of PFS. This will start failing if the station
claims to support PFS in such cases, so explicitly disable PFS
functionality in these test cases for now.
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-05-04 00:37:44 +03:00
Jouni Malinen
61e22e45c8
tests: DPP PFS and cfg80211 connect command
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-05-04 00:37:44 +03:00
Jouni Malinen
6c67ad0a52
tests: Check DPP PFS negotiation result
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-05-04 00:37:44 +03:00
Jouni Malinen
fe319fc7ed
tests: DPP QR Code and authentication exchange (rand_mac_addr=1)
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-04-22 17:09:01 +03:00
Jouni Malinen
7e88ed8e2d
tests: Use function decorator to clean up --long processing
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2020-04-18 11:35:32 +03:00
Jouni Malinen
62d5616155
tests: DPP netAccessKey for reconfig
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-04-03 12:45:03 +03:00
Jouni Malinen
a34fb79788
tests: DPP reconfiguration connector
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-04-02 21:34:49 +03:00
Jouni Malinen
e96d319140
tests: DPP PFS
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-03-28 17:27:42 +02:00
Jouni Malinen
ef46f143bc
tests: dpp_controller_rx_failure to match implementation changes
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-03-27 20:05:25 +02:00
Jouni Malinen
f1732b4d1a
tests: DPP chirping
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-03-27 20:05:25 +02:00
Jouni Malinen
d299756e3e
tests: DPP QR Code and enrollee initiating with netrole specified
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-02-11 06:43:02 +02:00
Jouni Malinen
3e4b709fb0
tests: Configurator provisioning test cases to use conf=configurator
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-02-08 07:19:53 +02:00
Jouni Malinen
269a78786e
tests: dpp_pkex_alloc_fail to match implementation change
...
The new dpp_alloc_auth() function addition changed function call
backtraces for memory allocation failure tests.
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-02-08 07:19:53 +02:00
Jouni Malinen
7128197862
tests: DPP and duplicated Authentication Confirmation
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-02-08 07:19:53 +02:00
Jouni Malinen
12cdfb4d7b
tests: DPP Configurator provisioning
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-01-31 23:32:34 +02:00
Jouni Malinen
db1aa8f19f
tests: DPP bootstrapping via NFC negotiated handover
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-01-27 20:36:09 +02:00
Jouni Malinen
2bbe6ad3aa
DPP: Helper function for bootstrapping URI generation
...
The new dpp_gen_uri() helper function can be used to build the
bootstrapping URI from locally stored information. This can be used to
make it easier to update the URI, e.g., for NFC negotiated connection
handover cases.
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-01-27 20:36:09 +02:00
Jouni Malinen
5bf51d38b0
tests: Fix DPP capability checking to avoid failures in non-DPP build
...
"finally" handler should not trigger a new exception when trying to
clear state for non-DPP builds. In addition, couple of checks for DPP
capability in the build were missing.
Signed-off-by: Jouni Malinen <j@w1.fi>
2020-01-26 13:40:56 +02:00
Jouni Malinen
19d4a5de11
tests: Fix a missing parentheses in an error message
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2020-01-01 12:23:25 +02:00
Jouni Malinen
4e9bcdebf3
tests: Replace tcpdump with wlantest
...
This removes dependency on tcpdump by using an already included test
tool for capturing frames with Ethernet headers. There were some issues
in getting tcpdump working on Ubuntu 19.10, so this seems to be a clean
way of addressing that.
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-12-27 23:43:09 +02:00
Jouni Malinen
f94e677d33
tests: DPP exchange when driver uses a separate P2P Device interface
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-12-23 11:20:17 +02:00
Jouni Malinen
dbdd445d33
tests: Make DPP text cases more robust for DPP-TX event processing
...
The previous waits were matching both DPP-TX and DPP-TX-STATUS and if
the latter event was received, the test cases would either report
failure or would not really test what was supposed to be verified. Fix
this by waiting explicitly for "DPP-TX " to avoid matching
"DPP-TX-STATUS" prefix.
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-12-22 23:33:21 +02:00
Jouni Malinen
972edba185
tests: DPP connection status - association rejection
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-12-20 16:53:26 +02:00
Jouni Malinen
4a667b01e6
tests: DPP bootstrapping via NFC URI record
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-12-05 12:37:51 +02:00
Jouni Malinen
e0cd7172c2
tests: Advertise UTF-8 SSID in DPP-provisioned AP
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-11-28 16:39:09 +02:00
Jouni Malinen
ca6a2ac705
tests: DPP ssid_charset/ssid64
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-11-28 16:39:09 +02:00
Jouni Malinen
4cab417af0
tests: DPP configuration saving
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-10-27 19:50:22 +02:00
Jouni Malinen
11bbb7ecb8
tests: DPP MUD URL
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-09-19 00:21:47 +03:00
Jouni Malinen
b256d9393d
tests: DPP2 connection status result
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-09-16 17:25:34 +03:00
Jouni Malinen
530b31ea88
tests: Fix DPP wait_auth_success() check for Configurator success
...
This looked like a copy-paste error in the event message check and once
that was fixed, couple of test cases needed fixes to expect a success
from the Configurator.
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-09-15 17:01:59 +03:00
Jouni Malinen
ba2d5f3642
tests: DPP network introduction with expired netaccesskey
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-08-11 16:45:43 +03:00
Jouni Malinen
b4928ff9cb
tests: DPP Controller RX error cases
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-06 21:02:12 +03:00
Jouni Malinen
161490906a
tests: DPP TCP failure cases
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-06 20:22:44 +03:00
Jouni Malinen
c9ead82d11
tests: Fix robustness issue in DPP test cases with SAE
...
The sae_groups parameter needs to be cleared before attempt a SAE
connection in a test case to avoid issues with this parameter having
been left to something else than the default one by a previous test
case. This was found with the following sequence:
sae_pwe_failure dpp_auto_connect_legacy_psk_sae_1
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-05-25 21:18:24 +03:00
Jouni Malinen
358141344a
tests: DPP channel-list with multiple channels in opclass
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-05-23 01:37:16 +03:00
Jouni Malinen
5fbefcc64b
tests: DPP over TCP using Controller/Relay
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-04-22 21:08:59 +03:00
Jouni Malinen
5be5b81678
tests: dpp_bootstrap_gen_failures to match implementation changes
...
The separate dpp_bootstrap_gen() functions were merged into a single
one, so the test case needs a matching change to avoid failures.
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-03-24 17:29:45 +02:00
Jouni Malinen
f9bac0f6b3
tests: Remove unnecessary dump_monitor() calls from end of test cases
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-03-18 18:32:31 +02:00
Jouni Malinen
e105110f40
tests: Use a helper function for DPP_CONFIGURATOR_ADD/REMOVE
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-03-18 18:32:31 +02:00
Jouni Malinen
5725b3e355
tests: Use a helper function for DPP_AUTH_INIT
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-03-18 18:32:31 +02:00
Jouni Malinen
84438350ae
tests: DPP AP+STA provisioning and connection with Brainpool curves
...
Increase testing coverage by going through all six possible curves with
full provisioning of AP and STA and connection (which includes PFS with
DPP2).
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-03-18 18:32:31 +02:00
Jouni Malinen
203878d797
tests: Helper function for checking DPP-FAIL reporting
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-03-17 20:58:44 +02:00
Jouni Malinen
6d196e5928
tests: Helper functions for DPP PKEX initiator and responder
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-03-17 20:57:58 +02:00
Jouni Malinen
517f76b158
tests: DPP use the wait_auth_success() helper function
...
Use the already existing helper function and extend it to cover the most
common test sequences.
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-03-17 19:17:31 +02:00
Jouni Malinen
7e0091007c
tests: Use helper function for DPP_LISTEN commands
...
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-03-17 18:19:58 +02:00
Jouni Malinen
421d658a67
tests: Fix ECDSA signature generation
...
Parsing of the DER encoded signature was unable to handle results that
were shorter than the prime. These need to be zero padded from left to
generate the correct value.
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-03-17 16:53:05 +02:00
Jouni Malinen
fab49f6145
tests: Python coding style cleanup (pylint3 bad-whitespace)
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-03-16 18:52:09 +02:00
Jouni Malinen
009b54bedd
tests: DPP and provisoning DPP and legacy AKMs
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-03-16 18:52:09 +02:00
Jouni Malinen
8ad1009e50
tests: DPP and Enrollee rejecting Config Object
...
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-03-15 00:31:09 +02:00