zephyr/tests/net/socket/tls_configurations/pytest/conftest.py
Valerio Setti 91fa8a2b63 tests: net: socket_tls: test different TLS configurations with sockets
This commit adds a test to showcase how to configure TLS 1.2 and 1.3
socket connections against an OpenSSL server. Only a limited number
of combinations are available for now:

- TLS 1.2
	- RSA certificate and key exchange.
	- ECDSA certificate and ECDHE key exchange.

- TLS 1.3 only supports ephemeral (ECDHE) key exchange with/without
  session tickets.

Since the goal is to test TLS connection and not low level ethernet
functionalities or similar, the only supported platform is "native_sim"
where Linux sockets are used to connect to the OpenSSL server locally.

The idea is that the Zephyr application acts a client and tries to connect
to the OpenSSL server running on the same PC. For sake of simplificity a
bash script is provided to start the OpenSSL server properly.
For completeness a bash script is also provided to re-generate
certificates and keys.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-09-12 13:31:20 -04:00

18 lines
383 B
Python

# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: Apache-2.0
import pytest
def pytest_addoption(parser):
parser.addoption('--server-type')
parser.addoption('--port')
@pytest.fixture()
def server_type(request):
return request.config.getoption('--server-type')
@pytest.fixture()
def port(request):
return request.config.getoption('--port')