GithubHelp home page GithubHelp logo

eriptic / uoscore-uedhoc Goto Github PK

View Code? Open in Web Editor NEW
15.0 4.0 15.0 2.19 MB

C implementations for constrained (and non-constrained) devices of the IETF protocols OSCORE and EDHOC

License: Other

CMake 0.27% C 96.39% Makefile 0.82% Python 1.66% Shell 0.86%
authentication cryptography ecc edhoc embedded encryption ietf ietf-rfcs microcontroller oscore

uoscore-uedhoc's Introduction

uOSCORE / uEDHOC -- A Lightweight IoT Security Protocol Stack

GitHub CI

uOSCORE / uEDHOC is a lightweight C implementation of the IETF protocols OSCORE (RFC8613) and EDHOC (RFC9528), specifically designed for microcontrollers. This implementation is independent of the operating system, cryptographic engine, and, in the case of uEDHOC, the transport protocol. Notably, uOSCORE / uEDHOC operates using only stack memory, avoiding heap allocation.

The OSCORE and EDHOC protocols were developed by the IETF to provide a lightweight alternative to (D)TLS for IoT deployments. Unlike (D)TLS, OSCORE and EDHOC function at the application layer, which is typically CoAP rather than at the transport layer. This allows for end-to-end authenticated and encrypted communication through CoAP proxies—a capability that transport layer security protocols like (D)TLS cannot achieve.

For detailed background information and performance evaluations in terms of speed, RAM, and flash memory requirements, refer to our paper, The Cost of OSCORE and EDHOC for Constrained Devices and the Benchmarks.

Enterprise Support

Eriptic Technologies has co-developed uOSCORE / uEDHOC and provides enterprise support services centered around it. Our offerings encompass:

  • Integration of uOSCORE / uEDHOC to designated customer platforms.
  • Tailored threat analysis for unique customer use cases.
  • Designing security architecture for embedded systems.
  • Developing custom embedded security solutions.

For more information visit our website eriptic.com or send us an email [email protected]

How to Build and Link

  • check the configurations in makefile_config.mk and adjust them if necessary
  • run make
  • link the static library build/libuoscore-uedhoc.a in your project

Test coverage

Project (Folder) Structure

.
|---cddl_models/
|---externals/
|---inc/
|---samples/
|---scripts/
|---src/
|---test/
|---test_vectors/
  • The folder cddl_models contains CDDL models for all CBOR structures.
  • The folder externals contains the external libraries and tools as git submodules.
  • The folder inc contains all header file.
  • The folder samples contains some usage examples.
  • The folder scripts contains scripts for generatinc C code from CDDL models and converting the json formatted EDHOC test vectors to a C header
  • The folder src contains all source file.
  • The folder test contains automated tests.
  • The folder test_vectors contains tests vectors.

API and Usage Model

uOSCORE

The API of uOSCORE consists of three functions:

  • oscore_context_init(),
  • coap2oscore() and
  • oscore2coap().

coap2oscore() and oscore2coap() convert CoAP to OSCORE packets and vice versa. oscore_context_init() initializes the OSCORE security context.

First, oscore_context_init() function needs to be called on the client and server side, then coap2oscore() and oscore2coap() are called just before sending or receiving packets over the network.

drawing

uEDHOC

The API of uEDHOC consists of four functions:

  • ephemeral_dh_key_gen()
  • edhoc_initiator_run(),
  • edhoc_responder_run(),
  • edhoc_exporter(),

ephemeral_dh_key_gen() is used to generate fresh ephemeral DH keys before running the protocol. This function requires a random seed suable for cryptographic purposes. edhoc_initiator_run() and edhoc_responder_run() has to be called on the initiator and responder side respectively. They return the External Authorization data EAD_x, the derived shared secret PRK_out. PRK_out is used as input for edhoc_exporter() to derive application specific keys, e.g., OSCORE master secret and OSCORE master salt.

The EDHOC protocol requires the exchange of three messages (and an optional message 4) which is independent of the underlying message transport protocol. For example appendix-A.2 in the EDHOC specification describes how EDHOC can be transferred over CoAP, however CoAP is not mandatory. In order to be independent of the transport protocol uEDHOC uses two callback functions which need to be implemented by the user for handling the sending and receiving of messages. These functions are:

/**
 * @brief   The user should call inside this function its send function. 
 *
 * 
 * @param   sock a pointer used to identify the rx chanel, 
 *          e.g. a socket handler
 * @param   data data to be send
 */
enum err tx(void *sock, struct byte_array *data);

/**
 * @brief   The user should call inside this function its receive 
 *          function. The user should copy the received data in \p data.
 *          
 *          THE USER MUST MAKE SURE THAT HE/SHE IS NOT WRITING DATA OUTSIDE THE 
 *          RECEIVE BUFFER, I.E., THE LENGTH OF THE RECEIVED DATA IS SMALLER 
 *          THAN \p data->len. 
 * 
 *          After copying, the length of the received data should be written 
 *          in \p data->len.
 *
 * 
 * @param   sock a pointer used to identify the rx chanel, 
 *          e.g. a socket handler
 * @param   data the received message must be copied here
 */
enum err rx(void *sock, struct byte_array  *data);

Note that uEDHOC does not provide correlation of messages. Correlation may be handled on the transport layer completely or partially. In cases when the correlation cannot be handled by the transport protocol the edhoc message needs to be prepended with a connection identifier, that is used on the other side to determine to which session a given message belongs. In order to remain conform with the specification in the cases where the transport cannot handle correlation a connection identifier needs to be prepended in tx() function and removed in the rx() function.

Supported Cipher Suites

uOSCORE
Algorithms
AES-CCM-16-64-128, SHA-256
uEDHOC
Suit Algorithms
0 AES-CCM-16-64-128, SHA-256, 8, X25519, EdDSA, AES-CCM-16-64-128, SHA-256
1 AES-CCM-16-128-128, SHA-256, 16, X25519, EdDSA, AES-CCM-16-64-128, SHA-256
2 AES-CCM-16-64-128, SHA-256, 8, P-256, ES256, AES-CCM-16-64-128, SHA-256
3 AES-CCM-16-128-128, SHA-256, 16, P-256, ES256, AES-CCM-16-64-128, SHA-256

Using Different Cryptographic Libraries or Hardware Accelerators

The logic of uOSCORE and uEDHOC is independent form the cryptographic library, i.e., the cryptographic library can easily be exchanged by the user. For that the user needs to provide implementations for the functions specified in crypto_wrapper.c.

Preventing Nonce Reuse Attacks in OSCORE

AES keys should never be used more than once with a given nonce, see RFC5084. In order to avoid this situation, the user has 2 options while creating context structure:

  • setting fresh_master_secret_salt = true, when given context is new (freshly obtained e.g. with EDHOC)
  • setting fresh_master_secret_salt = false, when the same context is used between reboots/reconnections. In this case, the user must enable Non-volatile Memory support (see OSCORE_NVM_SUPPORT in makefile_config.mk) and implement two functions that require access to NVM (see below).

Note that using NVM support is independent of the parameter above. Although it is required for using the same context multiple times, it will also be utilized (if enabled) to store context obtained with EDHOC, enabling the user to reuse it after the reboot. This behaviour is useful in situations where multiple sessions need to be stored on a device, while at the same time being able to start a completely new session with EDHOC. When such feature is not needed, OSCORE_NVM_SUPPORT can be disabled so only fresh sessions are acceptable.

/**
* @brief When the same OSCORE master secret and salt are reused through
*        several reboots of the device, e.g., no fresh shared secret is
*        derived through EDHOC (or some other method) the Sender Sequence 
*        Number MUST be stored periodically in NVM. 
* @param nvm_key part of the context that is permitted to be used for identifying the right store slot in NVM.
* @param	ssn SSN to be written in NVM.
* @retval ok or error code if storing the SSN was not possible.
*/
enum err nvm_write_ssn(const struct nvm_key_t *nvm_key, uint64_t ssn);

/**
* @brief When the same OSCORE master secret and salt are reused through
*        several reboots of the device, e.g., no fresh shared secret is
*        derived through EDHOC (or some other method) the Sender Sequence 
*        Number MUST be restored from NVM at each reboot. 
* @param nvm_key part of the context that is permitted to be used for identifying the right store slot in NVM.
* @param	ssn SSN to be read out from NVM.
* @retval ok or error code if the retrieving the SSN was not possible.
*/
enum err nvm_read_ssn(const struct nvm_key_t *nvm_key, uint64_t *ssn);

Additional configuration options

The build configuration can be adjusted in the makefile_config.mk.

uoscore-uedhoc's People

Contributors

aledemaa avatar kamil-kielbasa-aa avatar kamil-lazowski avatar kmroz-assaabloy avatar mcr avatar mopsiok avatar oyvindronningstad avatar rlubos avatar stefanhri avatar stoprocent avatar tgujda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

uoscore-uedhoc's Issues

NULL Pointer dereference causing segmentation fault

Hi!

Version: v2.1.4 in samples/linux_edhoc and default configurations without any modifications only commenting out the AddressSanitizer in the makefile in responder and initiator.

# use AddressSanitizer to find memory bugs
# comment this out for better speed
#CFLAGS += -fsanitize=address -fno-omit-frame-pointer
#CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer
#LDFLAGS += -fsanitize=address -static-libasan

When i define EDHOC_MESSAGE_4_SUPPORTED in both the responder.c and initiator.c and run them then the initiator gets segmentation fault because of line 186 but the responder finishes successfully.

#define EDHOC_MESSAGE_4_SUPPORTED

image

Sincerely Sabor

EDHOC client initiator's waiting behavior

Hello,

We are developing a model learning tool for EDHOC clients and servers and we have used the implementations found in samples/linux_edhoc and samples/linux_edhoc_oscore, in order to learn their models and analyze their behavior.

Regarding the samples/linux_edhoc/initiator of the main branch's commit fbaa96c we observed the following behavior:

The client initiator sends the EDHOC Message 1, receives the EDHOC Message 2 and then sends the final EDHOC Message 3. Interestingly, the client does not wait for a response to the EDHOC Message 3 and terminates immediately.

Is it an issue or is this deliberate ? According to the RFC, shouldn't the client initiator wait for a response to the EDHOC Message 3, in case this response is an (EDHOC) error message ?

EDHOC- method type not checked

Hi!

Version: v2.1.4 in samples/linux_edhoc and default configurations without any modifications only commenting out the AddressSanitizer in the makefile in responder and initiator.

# use AddressSanitizer to find memory bugs
# comment this out for better speed
#CFLAGS += -fsanitize=address -fno-omit-frame-pointer
#CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer
#LDFLAGS += -fsanitize=address -static-libasan

According to the RFC only method types: 0, 1, 2, and 3 are valid. When i modify the method type in message 1 and send it, the responder and initiator complete the protocol even if the method type is 8.

m1._message_1_METHOD=8;
TRY_EXPECT(cbor_encode_message_1(rc->msg, rc->msg_len, &m1, &payload_len_out),
true);
rc->msg_len = (uint32_t)payload_len_out;

Initiator creating message 1:

msg1

Responder receving message 1:

image

Sincerely Sabor

linux_edhoc sample not working

Hi!

I have tried to run the linux_edhoc sample program in a linux computer. I have tried both the master branch and the tag v.1.0.8.
I cannot complete a handshake successfully.

I have followed these steps:

git clone https://github.com/eriptic/uoscore-uedhoc.git
cd uoscore-uedhoc
git submodule update --init

Then i go to /uoscore-uedhoc/samples/linux_edhoc/responder and run "make".
Then same thing with the initiator, /uoscore-uedhoc/samples/linux_edhoc/initiator.

When i run the responder inside /uoscore-uedhoc/samples/linux_edhoc/responder/build using ./responder then i get this error:

==187946==ERROR: AddressSanitizer failed to allocate 0xdfff0001000 (15392894357504) bytes at address 2008fff7000 (errno: 12)
==187946==ReserveShadowMemoryRange failed while trying to map 0xdfff0001000 bytes. Perhaps you're using ulimit -v
Aborted

Same thing happens when i try to run the initiator.

I went to the make file in initiator and responder and commented out these three lines:
#CFLAGS += -fsanitize=address -fno-omit-frame-pointer
#CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer
#LDFLAGS += -fsanitize=address -static-libasan

Then it is possible to run responder and initiator.

The responder stops at " waiting to receive message 3... "because it is waiting for the third message but the initiator gets:
"Segmentation fault" .

When i debug it, the segmentation fault occurs inside the "enum err encode_int(const int32_t *in, uint32_t in_len, uint8_t *out, uint32_t *out_len) function.

Do you know why this is happening and what i can do to fix it?
I want to use the Initiator-responder sample, but they have to successfully complete the handshake.

Sincerly Sabor

Error compilation in samples/linux-oscore

Dear all:

I am installing uoscore-uedhoc in a Ubuntu 22.04.1 just for testing in Linux platform so far.

I have been able to compile everything except the example in linux_oscore

In first place, I had a problem since the make execution did not find file zephyr/net/net_pkt.h .

I did a git clone to download the source files of zephyr, but now I got the error below.

I just wondering why this sample it is using zephyr. With the other sample linux_edhoc and linux_edhoc_oscore I did not have this issue.

How could you give some help on this?

Thanks in advance.

In file included from /usr/include/zephyr/toolchain.h:50,
from /usr/include/zephyr/kernel_includes.h:19,
from /usr/include/zephyr/kernel.h:17,
from /usr/include/zephyr/net/buf.h:16,
from /usr/include/zephyr/net/net_pkt.h:22,
from ../../common/sock.h:21,
from ../../common/sock.c:11:
/usr/include/zephyr/toolchain/gcc.h:554:2: error: #error processor architecture not supported
554 | #error processor architecture not supported
| ^~~~~
In file included from /usr/include/zephyr/kernel_includes.h:28,
from /usr/include/zephyr/kernel.h:17,
from /usr/include/zephyr/net/buf.h:16,
from /usr/include/zephyr/net/net_pkt.h:22,
from ../../common/sock.h:21,
from ../../common/sock.c:11:
/usr/include/zephyr/kernel_structs.h:159:26: error: ‘CONFIG_MP_NUM_CPUS’ undeclared here (not in a function)
159 | struct _cpu cpus[CONFIG_MP_NUM_CPUS];
| ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/zephyr/kernel_includes.h:31,
from /usr/include/zephyr/kernel.h:17,
from /usr/include/zephyr/net/buf.h:16,
from /usr/include/zephyr/net/net_pkt.h:22,
from ../../common/sock.h:21,
from ../../common/sock.c:11:
/usr/include/zephyr/syscall.h:11:10: fatal error: syscall_list.h: No such file or directory
11 | #include <syscall_list.h>
| ^~~~~~~~~~~~~~~~

Best Regards.

Changing key-management strategies and removing the CBOR encoding

I am doing research that involves configuring different key management strategies, such as Pre-shared Keys (PSK), Raw Public Keys (RPK), and dynamically generated keys. I also want to remove the CBOR encoding of the certificates and use an X.509 certificate instead of a C.509 certificate. Is there any built-in support for doing these tasks? If possible, could you please provide me with some guidance on how this can be done? Thank you in advance!

Compiling errors with samples

Dear all

I got this compiling error or "No such file or directory" messages when compiling different samples. I realized that certainly that , for example, the file sha512.c is not there but _sha512.c , hence the error.

root@h1:/uoscore-uedhoc/samples/linux_edhoc/responder# make
mv: cannot stat '../../../externals/compact25519/src/c25519/sha512.c': No such file or directory
mv: cannot stat '../../../externals/tinycrypt/lib/source/sha256.c': No such file or directory
make: 'build/responder' is up to date.

root@h1:/uoscore-uedhoc/samples/linux_oscore/client# make
mv: cannot stat '../../../externals/compact25519/src/c25519/sha512.c': No such file or directory
gcc -c -m32 -DDEBUG_PRINT -DLINUX_SOCKETS -I../../../inc/ -I../../common/ -I../../../test_vectors/ -I../../../externals/cantcoap/ -I../../../externals/zcbor/include -I../../../externals/mbedtls/library -I../../../externals/mbedtls/include -I../../../externals/mbedtls/include/mbedtls -I../../../externals/mbedtls/include/psa -I../../../externals/compact25519/src/ -I../../../externals/compact25519/src/c25519 -Og -Wall -g -gdwarf-2 -MMD -MP -MF"build/_entropy.d" -DZCBOR_CANONICAL -Wa,-a,-ad,-alms=build/_entropy.lst src/_entropy.c -o build/_entropy.o
gcc: error: unrecognized command-line option '-m32'
make: *** [Makefile:127: build/_entropy.o] Error 1

root@h1:/uoscore-uedhoc/samples/linux_oscore/server# make
mv: cannot stat '../../../externals/compact25519/src/c25519/sha512.c': No such file or directory
gcc -c -m32 -DDEBUG_PRINT -DLINUX_SOCKETS -I../../../inc/ -I../../common/ -I../../../test_vectors/ -I../../../externals/cantcoap/ -I../../../externals/zcbor/include -I../../../externals/mbedtls/library -I../../../externals/mbedtls/include -I../../../externals/mbedtls/include/mbedtls -I../../../externals/mbedtls/include/psa -I../../../externals/compact25519/src/ -I../../../externals/compact25519/src/c25519 -Og -Wall -g -gdwarf-2 -MMD -MP -MF"build/_entropy.d" -DZCBOR_CANONICAL -Wa,-a,-ad,-alms=build/_entropy.lst src/_entropy.c -o build/_entropy.o
gcc: error: unrecognized command-line option '-m32'
make: *** [Makefile:127: build/_entropy.o] Error 1

root@h1:/uoscore-uedhoc/samples/linux_edhoc_oscore/initiator_client# make
mv: cannot stat '../../../externals/compact25519/src/c25519/sha512.c': No such file or directory
make: 'build/initiator_client' is up to date.

root@h1:/uoscore-uedhoc/samples/linux_edhoc_oscore/responder_server# make
mv: cannot stat '../../../externals/compact25519/src/c25519/sha512.c': No such file or directory
mv: cannot stat '../../../externals/tinycrypt/lib/source/sha256.c': No such file or directory
make: 'build/responder_server' is up to date.

Any suggestion?

Thanks in advance.

CoAP Observe implementation in Zephyr is incompatible with uOSCORE

Issue received per email:

As I see my problems with Observe in Zephyr stems from the following lines in Zephyr coap.c and the fact “inner observe” with OSCORE is zero:
(At least the notifications sent are rejected due to below “age check”)

        age = coap_get_option_int(response, COAP_OPTION_OBSERVE);

        /* handle observed requests only if received in order */

        if (age == -ENOENT || is_newer(r->age, age)) {

            r->age = age;

            r->reply(response, r, from);

        }

I think a work around may be to add an external/outer OSCORE observe value that would pass above check?

Error code: -1 on ESP32 responder linux initatior

Hello, I am trying to replicate the steps from https://github.com/eriptic/uoscore-uedhoc/blob/a03997fc698db562527d95ea531985678d7a0954/samples/zephyr_edhoc/README.MD but after flashing onto the ESP-32 that I'm using, I don't see

uart:$ *** Booting Zephyr OS build zephyr-v3.1.0-4283-g5108c4f21d3d ***
[00:00:00.264,709] bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.264,739] bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:00.264,770] bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 3.1 Build 99
[00:00:00.265,686] bt_hci_core: Identity: D0:21:3D:B1:36:09 (random)
[00:00:00.265,716] bt_hci_core: HCI: version 5.3 (0x0c) revision 0x0000, manufacturer 0x05f1
[00:00:00.265,716] bt_hci_core: LMP: version 5.3 (0x0c) subver 0xffff
uart:
$ IPv6 server with address 2001:db8::1 started!
waiting to receive message 1...
waiting to receive in rx()

but rather, I see

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3ffbdb60,len:18224
load:0x40080000,len:121216
1162 mmu set 00010000, pos 00010000
1162 mmu set 00020000, pos 00020000
entry 0x4008f364
I (75) boot: ESP Simple boot
I (75) boot: compile time Jun 7 2024 15:10:21
W (75) boot: Unicore bootloader
I (75) spi_flash: detected chip: generic
I (78) spi_flash: flash io: dio
I (81) boot: chip revision: v1.0
I (84) boot.esp32: SPI Speed : 40MHz
I (87) boot.esp32: SPI Mode : DIO
I (91) boot.esp32: SPI Flash Size : 4MB
I (94) boot: Enabling RNG early entropy source...
[esp32] [INF] DRAM: lma 0x00001020 vma 0x3ffbdb60 len 0x4730 (18224)
[esp32] [INF] IRAM: lma 0x00005758 vma 0x40080000 len 0x1d980 (121216)
[esp32] [INF] padd: lma 0x000230e8 vma 0x00000000 len 0xcf10 (53008)
[esp32] [INF] IMAP: lma 0x00030000 vma 0x400d0000 len 0x43ef4 (278260)
[esp32] [INF] padd: lma 0x00073efc vma 0x00000000 len 0xc0fc (49404)
[esp32] [INF] DMAP: lma 0x00080000 vma 0x3f400000 len 0x13724 (79652)
[esp32] [INF] Image with 6 segments
[esp32] [INF] DROM segment: paddr=00080000h, vaddr=3f400000h, size=13724h ( 79652) map
[esp32] [INF] IROM segment: paddr=00030000h, vaddr=400d0000h, size=43EF4h (278260) map

*** Booting Zephyr OS build v3.6.0-5587-g2d44b48cec84 ***
error during socket initialization (error code: -1)waiting to receive message 1...
waiting to receive in rx()

in the serial monitor, do you have an idea what I can do to resolve this issue?

compile issue in zephyr_edhoc sample

I try to compile the zephyr_edhoc sample in zephyr v3.2.0 by following the README instruction and i get some compile issues when runs in the zephyr_edhoc/initiator

west build -b=nrf52840dk_nrf52840

The error is:

error: #error "<dirent.h> not supported"
   10 | #error "<dirent.h> not supported"
      |  ^~~~~

Could someone please guide me to compile correct the sample?

Sending large size payload

Hi,

When I'm trying to send a big size payload or response I'm getting this error :
Runtime error: coap2oscore(sendPDU->getPDUPointer(), sendPDU->getPDULength(), buf_oscore, &buf_oscore_len, &c_server) error code 1 at src/main.cpp:322

GET/POST confusion

I suspect there is a COAP_GET vs COAP_POST confusion at this line, because a message with GET code is not supposed to have payload, or not?

PS. The same issue may be present in other "similar" files - I have not checked this.

Several clients

Hi!

I guess EDHOC can be used between one server and several clients. Right now if the sender receives message one and some problem occurs when processing it then the responder will terminate and returns some error code. If i want the server to be active again i have to rerun it.
Is this an issue or is this deliberate?
I mean someone who wants to crash the server can just send an invalid message.

Sincerely Sabor

`make` in `samples` directory fails with undefined symbols

After the recent commits (most likely those of zcbor-0.80.0) make in the samples directory has ceased working.

It works alright for make -C samples/linux_edhoc/initiator, but fails with various undefined references for e.g. make -C samples/linux_edhoc/responder (and also for make -C samples/linux_edhoc_oscore/initiator_client and make -C samples/linux_edhoc_oscore/responder_server).

Can these also be updated/fixed?

PS. This happens on a Linux Debian 12.5 machine, if it makes any difference.

Problem with old Ztest API in tests

Hi,

Tests placed in test directory use Ztest test framework from Zephyr project:

uoscore-uedhoc/test/main.c

Lines 125 to 196 in 5fe2cb6

void test_main(void)
{
/* EDHOC testvector tests */
ztest_test_suite(exporter, ztest_unit_test(test_exporter));
ztest_test_suite(
initiator_responder_interaction,
ztest_unit_test(test_initiator_responder_interaction1),
ztest_unit_test(test_initiator_responder_interaction2));
/* OSCORE test-vector tests */
ztest_test_suite(
oscore_tests,
ztest_unit_test(t1_oscore_client_request_response),
ztest_unit_test(t2_oscore_server_request_response),
ztest_unit_test(t3_oscore_client_request),
ztest_unit_test(t4_oscore_server_key_derivation),
ztest_unit_test(t5_oscore_client_request),
ztest_unit_test(t6_oscore_server_key_derivation),
ztest_unit_test(t8_oscore_server_response_simple_ack),
ztest_unit_test(t9_oscore_client_server_observe),
ztest_unit_test(t10_oscore_client_server_after_reboot),
ztest_unit_test(t11_oscore_ssn_overflow_protection),
ztest_unit_test(
t100_inner_outer_option_split__no_special_options),
ztest_unit_test(
t101_inner_outer_option_split__with_observe_notification),
ztest_unit_test(
t102_inner_outer_option_split__with_observe_registration),
ztest_unit_test(
t103_oscore_pkg_generate__request_with_observe_registration),
ztest_unit_test(
t104_oscore_pkg_generate__request_with_observe_notification),
ztest_unit_test(
t105_inner_outer_option_split__too_many_options),
ztest_unit_test(t106_oscore_option_generate_no_piv),
ztest_unit_test(t200_options_serialize_deserialize),
ztest_unit_test(t201_coap_serialize_deserialize),
ztest_unit_test(t202_options_deserialize_corner_cases),
ztest_unit_test(t203_coap_get_message_type),
ztest_unit_test(t300_oscore_option_parser_no_piv),
ztest_unit_test(t301_oscore_option_parser_wrong_n),
ztest_unit_test(t302_oscore_option_parser_no_kid),
ztest_unit_test(t303_options_reorder),
ztest_unit_test(t400_is_class_e),
ztest_unit_test(t401_cache_echo_val),
ztest_unit_test(t402_echo_val_is_fresh),
ztest_unit_test(t403_uri_path_create),
ztest_unit_test(t404_get_observe_value),
ztest_unit_test(t500_oscore_context_init_corner_cases),
ztest_unit_test(t501_piv2ssn),
ztest_unit_test(t502_ssn2piv),
ztest_unit_test(t503_derive_corner_case),
ztest_unit_test(t504_context_freshness),
ztest_unit_test(t600_server_replay_init_test),
ztest_unit_test(t601_server_replay_reinit_test),
ztest_unit_test(t602_server_replay_check_at_start_test),
ztest_unit_test(t603_server_replay_check_in_progress_test),
ztest_unit_test(t604_server_replay_insert_zero_test),
ztest_unit_test(t605_server_replay_insert_test),
ztest_unit_test(t606_server_replay_standard_scenario_test),
ztest_unit_test(t700_interactions_init_test),
ztest_unit_test(t701_interactions_set_record_test),
ztest_unit_test(t702_interactions_get_record_test),
ztest_unit_test(t703_interactions_remove_record_test),
ztest_unit_test(t704_interactions_usecases_test)
);
ztest_run_test_suite(exporter);
ztest_run_test_suite(initiator_responder_interaction);
ztest_run_test_suite(oscore_tests);
}

From Zephyr 3.1 new Ztest API were introduced with no backward compatibility. From Zephyr 3.4 (with release date set as June 16, 2023), old Ztest API will be deprecated. This could make a problem during building those tests with Zephyr 3.4 or newer.

So if those tests are valuable and there is a plan to maintain them in the future, it should be considered to rewrite them to new Ztest API (or at least add information which Zephyr version should be used for those tests).

New Ztest API description:
https://docs.zephyrproject.org/latest/develop/test/ztest.html

Old (deprecated) Ztest API description:
https://docs.zephyrproject.org/latest/develop/test/ztest_deprecated.html

Example of "migration" to new Ztest API in Zephyr project:
zephyrproject-rtos/zephyr#44761

Common issue in Zephyr project which contains basic instruction and hints for migration:
zephyrproject-rtos/zephyr#47002

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.