aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* DPP: Report reception of Config Request to upper layersJouni Malinen2018-01-113-0/+5
| | | | | | This is mainly for protocol testing purposes. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* tests: Use longer timeout in sigma_dut_dpp_proto_initiatorJouni Malinen2018-01-111-1/+2
| | | | | | | This is needed to be ready for a sigma_dut change to wait for an extra frame RX event. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* tests: sigma_dut sta_scan_bssJouni Malinen2018-01-111-0/+13
| | | | Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* tests: sigma_dut with alternative OWE transition mode configurationJouni Malinen2018-01-111-0/+31
| | | | Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* tests: sigma_dut and new DPP config index valuesJouni Malinen2018-01-111-0/+24
| | | | Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* tests: DPP QR Code and hostapd as initiator (offchannel)Jouni Malinen2018-01-081-0/+59
| | | | Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* DPP: Authentication exchange retries and channel iteration in hostapdJouni Malinen2018-01-083-30/+335
| | | | | | | | This extends hostapd with previoiusly implemented wpa_supplicant functionality to retry DPP Authentication Request/Response and to iterate over possible negotiation channels. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Report offchannel RX frame frequency to hostapdJouni Malinen2018-01-083-3/+12
| | | | | | | | | | Not all code paths for management frame RX reporting delivered the correct frequency for offchannel RX cases. This is needed mainly for Public Action frame processing in some special cases where AP is operating, but an exchange is done on a non-operational channel. For example, DPP Initiator role may need to do this. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* tests: Enable and require PMF in SAE and OWE test cases with sigma_dutJouni Malinen2018-01-061-16/+39
| | | | | | | | All SAE and OWE associations are expected to require PMF to be negotiated, so enable or require PMF in AP and STA configurations accordingly to match the new sigma_dut behavior. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* GnuTLS: Add option to build with libnettle instead of libgcryptJouni Malinen2017-12-295-9/+494
| | | | | | | | | | | | | GnuTLS-based builds can now be done using either libnettle or libgcrypt for crypto functionality: CONFIG_TLS=gnutls CONFIG_CRYPTO=nettle CONFIG_TLS=gnutls CONFIG_CRYPTO=gnutls Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: GnuTLS configuration of intermediate CA certificateJouni Malinen2017-12-293-81/+116
| | | | | | | | | | GnuTLS seems to require the intermediate CA certificate to be included both in the ca_cert and client_cert file for the cases of server and client certificates using different intermediate CA certificates. Use the user_and_ica.pem file with GnuTLS builds and reorder the certificates in that file to make this work with GnuTLS. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Enable Suite B test cases with GnuTLSJouni Malinen2017-12-281-6/+17
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Speed up suite_b_192_rsa_insufficient_dh in failure caseJouni Malinen2017-12-281-1/+4
| | | | | | | Check for unexpected connection to avoid timeout on TLS alert event if the implementation does not check DH key size at all. Signed-off-by: Jouni Malinen <j@w1.fi>
* GnuTLS: Suite B validationJouni Malinen2017-12-281-11/+55
| | | | | | | | | This allows OpenSSL-style configuration of Suite B parameters to be used in the wpa_supplicant network profile. 128-bit and 192-bit level requirements for ECDHE-ECDSA cases are supported. RSA >=3K case is enforced using GnuTLS %PROFILE_HIGH special priority string keyword. Signed-off-by: Jouni Malinen <j@w1.fi>
* GnuTLS: Add support for disabling TLS versionsJouni Malinen2017-12-281-0/+23
| | | | | | | This extends GnuTLS support for tls_disable_v1_{0,1,2}=1 flags in the phase1 network profile parameter in wpa_supplicant. Signed-off-by: Jouni Malinen <j@w1.fi>
* GnuTLS: Implement tls_get_cipher()Jouni Malinen2017-12-281-2/+29
| | | | | | Provide OpenSSL-style name for the negotiated cipher suite. Signed-off-by: Jouni Malinen <j@w1.fi>
* GnuTLS: Make debug prints clearer for cert/key parsingJouni Malinen2017-12-281-2/+21
| | | | | | | | Indicate more clearly when the parsing succeeds to avoid ending the debug prints with various internal GnuTLS internal error messages even when the parsing actually succeeded in the end. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Skip eap_tls_pkcs8_pkcs5_v15 with GnuTLSJouni Malinen2017-12-281-1/+1
| | | | | | | It looks like this private key format is not supported in GnuTLS (tested with version 3.4.10). Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Fix wpas_config_file with non-mesh and non-SAE buildsJouni Malinen2017-12-281-6/+23
| | | | | | | Check wpa_supplicant capabilities before testing mesh and SAE parameters. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Fix gas_anqp_overrides with non-FILS buildsJouni Malinen2017-12-281-1/+6
| | | | | | | Need to ignore missing RX-ANQP event for the FILS Realm Info if wpa_supplicant build does not include FILS support. Signed-off-by: Jouni Malinen <j@w1.fi>
* GnuTLS: Add TEST_FAIL() to crypto routines for testing purposesJouni Malinen2017-12-281-0/+12
| | | | | | | This allows number of hwsim test cases for local error conditions to be executed with GnuTLS-based builds. Signed-off-by: Jouni Malinen <j@w1.fi>
* GnuTLS: Implement tls_get_version()Jouni Malinen2017-12-281-3/+13
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Skip sigma_dut tests for SAE/DPP based on build capabilitiesJouni Malinen2017-12-271-0/+10
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* GnuTLS: Implement HMAC functions using libgcryptJouni Malinen2017-12-275-0/+156
| | | | | | | Replace the internal HMAC MD5, SHA-1, and SHA256 implementations with the ones from libgcrypt and also add the SHA384 and SHA512 versions. Signed-off-by: Jouni Malinen <j@w1.fi>
* GnuTLS: Implement sha{256,384,512}_vector() using libgcryptJouni Malinen2017-12-275-5/+19
| | | | | | | Replace the internal SHA256 implementation with the one from libgcrypt and also add the SHA384 and SHA512 versions. Signed-off-by: Jouni Malinen <j@w1.fi>
* GnuTLS: Use a helper function for hash functionsJouni Malinen2017-12-271-30/+13
| | | | | | | Use a shared helper function instead of implementing practically same sequence separately for each hash function. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Opportunistic Wireless Encryption and group negotiationJouni Malinen2017-12-271-0/+24
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* OWE: Try all supported DH groups automatically on STAJouni Malinen2017-12-275-5/+49
| | | | | | | | If a specific DH group for OWE is not set with the owe_group parameter, try all supported DH groups (currently 19, 20, 21) one by one if the AP keeps rejecting groups with the status code 77. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Mixed mode BSS and MFP-enabled AP rejecting TKIPJouni Malinen2017-12-271-0/+30
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* Fix MFP-enabled test for disallowed TKIPJouni Malinen2017-12-271-6/+6
| | | | | | | | The test against use of TKIP was done only in MFP-required (ieee80211w=2) configuration. Fix this to check the pairwise cipher for MFP-enabled (ieee80211w=1) case as well. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Mixed SAE and non-SAE network and MFP required with SAEJouni Malinen2017-12-271-0/+32
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* SAE: Add option to require MFP for SAE associationsJouni Malinen2017-12-276-0/+23
| | | | | | | | | | | The new hostapd.conf parameter sae_require_pmf=<0/1> can now be used to enforce negotiation of MFP for all associations that negotiate use of SAE. This is used in cases where SAE-capable devices are known to be MFP-capable and the BSS is configured with optional MFP (ieee80211w=1) for legacy support. The non-SAE stations can connect without MFP while SAE stations are required to negotiate MFP if sae_require_mfp=1. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Set PMK length in eapol-fuzzerJouni Malinen2017-12-271-1/+5
| | | | | | | | | | Commit b488a12948751f57871f09baa345e59b23959a41 ('Clear PMK length and check for this when deriving PTK') started rejecting PTK derivation based on PMK length. This reduced coverage from the eapol-fuzzer, so set the default length when initializing the state machine in the fuzzer to reach the previously used code paths. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: SAE protocol testing - Confirm replayJouni Malinen2017-12-271-0/+78
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* SAE: Set special Sc value when moving to Accepted stateJouni Malinen2017-12-272-1/+3
| | | | | | | | | Set Sc to 2^16-1 when moving to Accepted state per IEEE Std 802.11-2016, 12.4.8.6.5 (Protocol instance behavior - Confirmed state). This allows the peer in Accepted state to silently ignore unnecessary retransmissions of the Confirm message. Signed-off-by: Jouni Malinen <j@w1.fi>
* SAE: Add Rc variable and peer send-confirm validationJouni Malinen2017-12-272-3/+28
| | | | | | | | | | | This implements the behavior described in IEEE Std 802.11-2016, 12.4.8.6.6 (Protocol instance behavior - Accepted state) to silently discard received Confirm message in the Accepted state if the new message does not use an incremented send-confirm value or if the special 2^16-1 value is used. This avoids unnecessary processing of retransmitted Confirm messages. Signed-off-by: Jouni Malinen <j@w1.fi>
* SAE: Print state changes in debug logJouni Malinen2017-12-263-13/+51
| | | | | | This makes it easier to follow state changes in SAE protocol instances. Signed-off-by: Jouni Malinen <j@w1.fi>
* SAE: Make dot11RSNASAESync configurableJouni Malinen2017-12-266-10/+16
| | | | | | | | | The new hostapd.conf parameter sae_sync (default: 5) can now be used to configure the dot11RSNASAESync value to specify the maximum number of synchronization errors that are allowed to happen prior to disassociation of the offending SAE peer. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Make dpp_pkex_test_fail and dpp_pkex_alloc_fail more robustJouni Malinen2017-12-251-3/+3
| | | | | | | | | | | Wait for test/allocation failure for longer than the wait_fail_trigger() default two seconds to allow DPP (in particular, PKEX) retransmission to occur. This removes some issues where the previous wait was more or less exactly the same duration as the retransmission interval and the first Listen operation not always starting quickly enough to receive the first frame. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Fix "ocsp: Digest must be before -cert or -serial"leishaoting2017-12-241-1/+1
| | | | | | | | | | | | | | | When executing ./start.sh with OpenSSL 1.1.0f, an OCSP operation fails. Put "-sha256" ahead of "-serial" to fix this. ~# openssl version OpenSSL 1.1.0f 25 May 2017 ~# openssl ocsp -reqout /lkp/benchmarks/hwsim/tests/hwsim/logs/current/ocsp-req.der -issuer /lkp/benchmarks/hwsim/tests/hwsim/auth_serv/ca.pem -serial 0xD8D3E3A6CBE3CD12 -no_nonce -sha256 ocsp: Digest must be before -cert or -serial ocsp: Use -help for summary. ~# openssl ocsp -reqout /lkp/benchmarks/hwsim/tests/hwsim/logs/current/ocsp-req.der -issuer /lkp/benchmarks/hwsim/tests/hwsim/auth_serv/ca.pem -sha256 -serial 0xD8D3E3A6CBE3CD12 -no_nonce Signed-off-by: leishaoting <leist.fnst@cn.fujitsu.com>
* PAE: Remove OpenSSL header dependencyJouni Malinen2017-12-241-2/+2
| | | | | | | | Instead of requiring OpenSSL headers to be available just for the SSL3_RANDOM_SIZE definition, replace that macro with a fixed length (32) to simplify dependencies. Signed-off-by: Jouni Malinen <j@w1.fi>
* EAP-pwd: Use abstract crypto APISean Parkinson2017-12-248-542/+320
| | | | | | | This makes it easier to use EAP-pwd with other crypto libraries than OpenSSL. Signed-off-by: Sean Parkinson <sean@wolfssl.com>
* EAP-EKE: Use abstract crypto APISean Parkinson2017-12-241-27/+5
| | | | | | This makes it easier to use EAP-pwd with other crypto libraries. Signed-off-by: Sean Parkinson <sean@wolfssl.com>
* Enhance crypto abstract API for DHSean Parkinson2017-12-241-24/+13
| | | | | | | | | | The patch offers alternate implementations of some functions using the abstract cryptographic API. This work was done in preparation for the changes to allow hostap to be compiled with the wolfSSL cryptography and TLS library. Signed-off-by: Sean Parkinson <sean@wolfssl.com>
* crypto: Implement new crypto API functions for DHJouni Malinen2017-12-244-0/+144
| | | | | | | | This implements crypto_dh_init() and crypto_dh_derive_secret() using os_get_random() and crypto_mod_exp() for all crypto_*.c wrappers that include crypto_mod_exp() implementation. Signed-off-by: Jouni Malinen <j@w1.fi>
* OpenSSL: Implement new crypto API functionsJouni Malinen2017-12-241-0/+44
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* Enhance crypto abstract APISean Parkinson2017-12-241-0/+57
| | | | | | | Add more crypto_*() wrappers to enable use of other crypto libraries than OpenSSL. Signed-off-by: Sean Parkinson <sean@wolfssl.com>
* Fix copy-paste errors in function commentsSean Parkinson2017-12-241-2/+2
| | | | | | Use correct function names for the documentation. Signed-off-by: Sean Parkinson <sean@wolfssl.com>
* DH: Remove trailing whitespaceJouni Malinen2017-12-241-1/+1
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* EAP-pwd: Remove trailing empty lineJouni Malinen2017-12-231-1/+0
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>