summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change license for tests filesLucie Gérard2024-02-041-1/+1
| | | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QTestEventLoop: add enterLoop(std::chrono::milliseconds) overloadAhmad Samir2023-03-031-3/+5
| | | | | | | Task-number: QTBUG-110059 Change-Id: Ibf1d76afd313e390103be4a22e44af7fb41ace1b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use SPDX license identifiersLucie Gérard2022-05-161-27/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QDtls(Cookie) autotests - use the proper API to detect DTLS supportTimur Pocheptsov2021-06-031-1/+4
| | | | | | | | | Instead of relying on some string comparisons and the current knowledge of which backend supports DTLS, use the proper API we already have in place to test if a particular class is supported by the active backend. Change-Id: I58ca0f7b7fcef68ec375cd64b83e51d4335817da Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix auto-tests that are fooled by the presence of more than one pluginTimur Pocheptsov2021-05-271-1/+6
| | | | | | | | | | | | | | | It's possible that Qt is built with OpenSSL and some other backend. The ifdefs generated are not mutually exclusive anymore, as it was in the past. So tests should rely on the actual backend they have working at runtime. In the process of fixing the auto-tests, modernized feature #if-ery and some associated compilation issues. Fixes: QTBUG-92875 Change-Id: I2be1b924d506fd36dc4e2c6c9158b5023ff87f32 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* tst_qdtlscookie: use a proper 'enterLoopMSecs' instead of 'enterLoop'Timur Pocheptsov2021-03-051-1/+1
| | | | | | | | | It's a bit weird to calculate timeout in milliseconds and then pass it as number of seconds ... Pick-to: 6.1 5.15 Change-Id: I1127163ea06e49ac1b53eea6f60ee8590319bfa1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Replace QtTest headers with QTestDavid Skoland2020-12-221-1/+2
| | | | | | | | | | | Complete search and replace of QtTest and QtTest/QtTest with QTest, as QtTest includes the whole module. Replace all such instances with correct header includes. See Jira task for more discussion. Fixes: QTBUG-88831 Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44 Pick-to: 6.0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QDtls(cookie verifier): make sure a server can re-use 'Client Hello'Timur Pocheptsov2020-11-301-0/+14
| | | | | | | | | | | | | | | | And extend an auto-test for this. When a cookie verification mechanism is enabled, and verifier, indeed, verifies that some datagram is a 'Client Hello' message with a proper cookie attached, we start a real DTLS handshake creating a QDtls object and calling 'doHandshake'. In case cookie verification was enabled, we need parameters from the verifier (it's a crypto-strong 'number' and hash algorithm) to 'lock and load' the TLS state machine in a freshly created TLS session object. This code path previously was only tested manually and was found by LCOV as untested. Pick-to: 5.15 Pick-to: 6.0 Change-Id: Ieacb8c989997999ea10e15bda6ae106a0338b698 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* DTLS auto-test(s) - fix a buggy logic with pending datagramsTimur Pocheptsov2019-10-101-3/+3
| | | | | | Fixes: QTBUG-79128 Change-Id: Ifebd5b056541b7732b15b5cf063ad22ab754a64c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QDtls - refactorTimur Pocheptsov2018-07-261-3/+3
| | | | | | | | | This patch renames rather awkward 'remote' into more conventional 'peer' (similar to what we have in QAbstractSocket). Change-Id: Ifc45e538b8adf9cc076bd7aee693277829fd94dc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* DTLS cookie auto-test - do not check the exact UDP socket errorsTimur Pocheptsov2018-06-281-2/+0
| | | | | | | | | | It was observed on OpenSUSE VM in CI - apparently, even after succesfull read from UDP socket error was not UnknownSocketError. While it's under investigation, the DTLS auto-test should limit itself by DTLS things and barely test IO success (socket-wise) when needed. Change-Id: I0773a02c591432b0d6c894f4131f70e41dc7ed72 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QDtlsClientVerifier - add auto-testTimur Pocheptsov2018-06-191-0/+480
This part of DTLS is relatively easy to test: we never do a complete handshake. Certificates, verification, ciphers, etc. - do not matter at this stage (to be tested in tst_QDtls). Errors are mostly insignificant and can be ignored or handled trivially. The test is OpenSSL-only: SecureTransport failed to correctly implement/ support server-side DTLS, the problem reported quite some time ago and no fixes from Apple so far. Task-number: QTBUG-67597 Change-Id: I21ad4907de444ef95d5d83b50083ffe211a184f8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>