OpenTTD Source 20241224-master-gee860a5c8e
|
Tests for network related crypto functions. More...
#include "../stdafx.h"
#include "../3rdparty/catch2/catch.hpp"
#include "../core/format.hpp"
#include "../network/network_crypto_internal.h"
#include "../network/core/packet.h"
#include "../string_func.h"
Go to the source code of this file.
Data Structures | |
class | MockNetworkSocketHandler |
class | TestPasswordRequestHandler |
Functions | |
static std::tuple< Packet, bool > | CreatePacketForReading (Packet &source, MockNetworkSocketHandler *socket_handler) |
static void | TestAuthentication (NetworkAuthenticationServerHandler &server, NetworkAuthenticationClientHandler &client, NetworkAuthenticationServerHandler::ResponseResult expected_response_result, NetworkAuthenticationClientHandler::RequestResult expected_request_result) |
TEST_CASE ("Authentication_KeyExchangeOnly") | |
static void | TestAuthenticationPAKE (std::string server_password, std::string client_password, NetworkAuthenticationServerHandler::ResponseResult expected_response_result) |
TEST_CASE ("Authentication_PAKE") | |
static void | TestAuthenticationAuthorizedKey (const X25519SecretKey &client_secret_key, const X25519PublicKey &server_expected_public_key, NetworkAuthenticationServerHandler::ResponseResult expected_response_result) |
TEST_CASE ("Authentication_AuthorizedKey") | |
TEST_CASE ("Authentication_Combined") | |
static void | CheckEncryption (MockNetworkSocketHandler *sending_socket_handler, MockNetworkSocketHandler *receiving_socket_handler) |
TEST_CASE ("Encryption handling") | |
Variables | |
static MockNetworkSocketHandler | mock_socket_handler |
Tests for network related crypto functions.
Definition in file test_network_crypto.cpp.
|
static |
Definition at line 215 of file test_network_crypto.cpp.
|
static |
Definition at line 34 of file test_network_crypto.cpp.
TEST_CASE | ( | "Authentication_AuthorizedKey" | ) |
Definition at line 132 of file test_network_crypto.cpp.
TEST_CASE | ( | "Authentication_Combined" | ) |
Definition at line 148 of file test_network_crypto.cpp.
TEST_CASE | ( | "Authentication_KeyExchangeOnly" | ) |
Definition at line 84 of file test_network_crypto.cpp.
TEST_CASE | ( | "Authentication_PAKE" | ) |
Definition at line 103 of file test_network_crypto.cpp.
TEST_CASE | ( | "Encryption handling" | ) |
Definition at line 246 of file test_network_crypto.cpp.
|
static |
Definition at line 63 of file test_network_crypto.cpp.
|
static |
Definition at line 119 of file test_network_crypto.cpp.
|
static |
Definition at line 93 of file test_network_crypto.cpp.
|
static |
Definition at line 32 of file test_network_crypto.cpp.