Skip to content

Commit

Permalink
Anjay 3.7.0
Browse files Browse the repository at this point in the history
Features
- Added support for LwM2M 1.2 server object requirement for infinite lifetime
  (lifetime == 0).
- Introduced @experimental and @deprecated Doxygen tags.
- Added experimental IPSO objects v2 API.
- Added experimental Software Management object API.

Improvements
- Improved integration tests compability and framework stability
- Added support for wget2 for validating links in documentation (for HTTP/2
  support)

Bugfixes
- Refactored generation of blockwise Confirmable notifications to avoid a
  possible assertion failure; requests for subsequent blocks of such
  notifications are now sent as Piggybacked responses
- Fixed a bug in the documentation of an object definition struct
- (commercial version only) Fixed problems with running some tests on systems
  with Mbed TLS 3.x
- Fixed a few assertion and pointer punning issues regarding calls to IPSO
  objects APIs in erroneous cases
- Prevent from trying to store empty cert/keys on HSM
  • Loading branch information
JZimnol committed Feb 16, 2024
1 parent 4f451c7 commit fc26744
Show file tree
Hide file tree
Showing 701 changed files with 10,707 additions and 1,593 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/anjay-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017-2023 AVSystem <[email protected]>
# Copyright 2017-2024 AVSystem <[email protected]>
# AVSystem Anjay LwM2M SDK
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017-2023 AVSystem <[email protected]>
# Copyright 2017-2024 AVSystem <[email protected]>
# AVSystem Anjay LwM2M SDK
# All rights reserved.
#
Expand Down
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## 3.7.0 (February 16th, 2024)

### Features

- Added support for LwM2M 1.2 server object requirement for infinite lifetime
(lifetime == 0).
- Introduced @experimental and @deprecated Doxygen tags.
- Added experimental IPSO objects v2 API.
- Added experimental Software Management object API.

### Improvements

- Improved integration tests compability and framework stability
- Added support for wget2 for validating links in documentation (for HTTP/2
support)

### Bugfixes

- Refactored generation of blockwise Confirmable notifications to avoid a
possible assertion failure; requests for subsequent blocks of such
notifications are now sent as Piggybacked responses
- Fixed a bug in the documentation of an object definition struct
- (commercial version only) Fixed problems with running some tests on systems
with Mbed TLS 3.x
- Fixed a few assertion and pointer punning issues regarding calls to IPSO
objects APIs in erroneous cases
- Prevent from trying to store empty cert/keys on HSM

## 3.6.1 (November 21st, 2023)

### Improvements
Expand All @@ -9,6 +37,8 @@
contents depend on the Access Control object state
- Added a public define for MSISDN string size
- Optimized "Out of memory" logs in favor of a smaller flash memory footprint
- (commercial feature only) Added API for querying Anjay for SSID associated
with given MSISDN and SMS Trigger resource value

### Bugfixes

Expand Down
21 changes: 19 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017-2023 AVSystem <[email protected]>
# Copyright 2017-2024 AVSystem <[email protected]>
# AVSystem Anjay LwM2M SDK
# All rights reserved.
#
Expand All @@ -8,7 +8,7 @@
cmake_minimum_required(VERSION 3.6.0)

project(anjay C)
set(ANJAY_VERSION "3.6.1" CACHE STRING "Anjay library version")
set(ANJAY_VERSION "3.7.0" CACHE STRING "Anjay library version")
set(ANJAY_BINARY_VERSION 1.0.0)

set(ANJAY_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
Expand Down Expand Up @@ -325,6 +325,7 @@ endif()

cmake_dependent_option(WITH_MODULE_access_control "Access control object implementation module" ON WITH_ACCESS_CONTROL OFF)
option(WITH_MODULE_ipso_objects "Generic implementation of certain kinds of IPSO objects" ON)
option(WITH_MODULE_ipso_objects_v2 "Experimental generic implementation of certain kinds of IPSO objects" ON)
option(WITH_MODULE_security "Security object module" ON)
option(WITH_MODULE_server "Server object module" ON)
option(WITH_MODULE_fw_update "Firmware Update object module" ON)
Expand All @@ -333,6 +334,7 @@ cmake_dependent_option(WITHOUT_MODULE_fw_update_PUSH_MODE
OFF "WITH_MODULE_fw_update;WITH_DOWNLOADER" OFF)
cmake_dependent_option(WITH_MODULE_factory_provisioning "Factory provisioning module" ON "WITH_BOOTSTRAP;WITH_CBOR" OFF)
option(WITH_MODULE_advanced_fw_update "Advanced Firmware Update object module" OFF)
option(WITH_MODULE_sw_mgmt "Software Management object module" OFF)

################# CODE #########################################################

Expand All @@ -348,10 +350,12 @@ add_library(anjay
include_public/anjay/fw_update.h
include_public/anjay/io.h
include_public/anjay/ipso_objects.h
include_public/anjay/ipso_objects_v2.h
include_public/anjay/lwm2m_send.h
include_public/anjay/security.h
include_public/anjay/server.h
include_public/anjay/stats.h
include_public/anjay/sw_mgmt.h
src/anjay_config_log.h
src/anjay_init.h
src/anjay_modules/anjay_access_utils.h
Expand Down Expand Up @@ -483,6 +487,8 @@ add_library(anjay
src/modules/ipso/anjay_ipso_3d_sensor.c
src/modules/ipso/anjay_ipso_basic_sensor.c
src/modules/ipso/anjay_ipso_button.c
src/modules/ipso_v2/anjay_ipso_v2_3d_sensor.c
src/modules/ipso_v2/anjay_ipso_v2_basic_sensor.c
src/modules/security/anjay_mod_security.c
src/modules/security/anjay_mod_security.h
src/modules/security/anjay_security_persistence.c
Expand All @@ -497,6 +503,7 @@ add_library(anjay
src/modules/server/anjay_server_transaction.h
src/modules/server/anjay_server_utils.c
src/modules/server/anjay_server_utils.h
src/modules/sw_mgmt/anjay_sw_mgmt.c
)

target_include_directories(anjay PUBLIC
Expand Down Expand Up @@ -528,11 +535,13 @@ set(ANJAY_WITHOUT_IP_STICKINESS "${WITHOUT_IP_STICKINESS}")
set(ANJAY_WITHOUT_COMPOSITE_OPERATIONS "${WITHOUT_COMPOSITE_OPERATIONS}")
set(ANJAY_WITH_MODULE_ACCESS_CONTROL "${WITH_MODULE_access_control}")
set(ANJAY_WITH_MODULE_IPSO_OBJECTS "${WITH_MODULE_ipso_objects}")
set(ANJAY_WITH_MODULE_IPSO_OBJECTS_V2 "${WITH_MODULE_ipso_objects_v2}")
set(ANJAY_WITH_MODULE_FW_UPDATE "${WITH_MODULE_fw_update}")
set(ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE "${WITH_MODULE_advanced_fw_update}")
set(ANJAY_WITHOUT_MODULE_FW_UPDATE_PUSH_MODE "${WITHOUT_MODULE_fw_update_PUSH_MODE}")
set(ANJAY_WITH_MODULE_SECURITY "${WITH_MODULE_security}")
set(ANJAY_WITH_MODULE_SERVER "${WITH_MODULE_server}")
set(ANJAY_WITH_MODULE_SW_MGMT "${WITH_MODULE_sw_mgmt}")
set(ANJAY_WITH_NET_STATS "${WITH_NET_STATS}")
set(ANJAY_WITH_COMMUNICATION_TIMESTAMP_API "${WITH_COMMUNICATION_TIMESTAMP_API}")
set(ANJAY_WITH_EVENT_LOOP "${WITH_EVENT_LOOP}")
Expand Down Expand Up @@ -865,6 +874,10 @@ if(WITH_MODULE_ipso_objects)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/include_public/anjay/ipso_objects.h"
DESTINATION include/anjay)
endif()
if(WITH_MODULE_ipso_objects_v2)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/include_public/anjay/ipso_objects_v2.h"
DESTINATION include/anjay)
endif()
if(WITH_MODULE_fw_update)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/include_public/anjay/fw_update.h"
DESTINATION include/anjay)
Expand All @@ -885,6 +898,10 @@ if(WITH_MODULE_factory_provisioning)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/include_public/anjay/factory_provisioning.h"
DESTINATION include/anjay)
endif()
if(WITH_MODULE_sw_mgmt)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/include_public/anjay/sw_mgmt.h"
DESTINATION include/anjay)
endif()

# install CMake package
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/anjay-config.cmake.in
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
..
Copyright 2017-2023 AVSystem <[email protected]>
Copyright 2017-2024 AVSystem <[email protected]>
AVSystem Anjay LwM2M SDK
All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017-2023 AVSystem <[email protected]>
# Copyright 2017-2024 AVSystem <[email protected]>
# AVSystem Anjay LwM2M SDK
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ TAB_SIZE = 8
# will result in a user-defined paragraph with heading "Side Effects:".
# You can put \n's in the value part of an alias to insert newlines.

ALIASES =
ALIASES += "experimental=\xrefitem experimentals \"Experimental\" \"Experimental List\""

# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Anjay
Copyright 2017-2023 AVSystem
Copyright 2017-2024 AVSystem

This product includes software developed at AVSystem (www.avsystem.com).

Expand Down
2 changes: 1 addition & 1 deletion cmake/anjay-config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017-2023 AVSystem <[email protected]>
# Copyright 2017-2024 AVSystem <[email protected]>
# AVSystem Anjay LwM2M SDK
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion cmake/anjay-version.cmake.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017-2023 AVSystem <[email protected]>
# Copyright 2017-2024 AVSystem <[email protected]>
# AVSystem Anjay LwM2M SDK
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion cmake/sphinx.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017-2023 AVSystem <[email protected]>
# Copyright 2017-2024 AVSystem <[email protected]>
# AVSystem Anjay LwM2M SDK
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion cmake/toolchain/afl-gcc.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017-2023 AVSystem <[email protected]>
# Copyright 2017-2024 AVSystem <[email protected]>
# AVSystem Anjay LwM2M SDK
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion covconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright 2017-2023 AVSystem <[email protected]>
# Copyright 2017-2024 AVSystem <[email protected]>
# AVSystem Anjay LwM2M SDK
# All rights reserved.
#
Expand Down
10 changes: 9 additions & 1 deletion demo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017-2023 AVSystem <[email protected]>
# Copyright 2017-2024 AVSystem <[email protected]>
# AVSystem Anjay LwM2M SDK
# All rights reserved.
#
Expand Down Expand Up @@ -48,6 +48,10 @@ if (${ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE})

endif()

if (${ANJAY_WITH_MODULE_SW_MGMT})
set(SOURCES ${SOURCES} software_mgmt.c)
endif()

if(NOT WIN32)
set(SOURCES ${SOURCES} objects/ip_ping.c)
endif()
Expand All @@ -72,6 +76,10 @@ if (${ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE})
set(HEADERS ${HEADERS} advanced_firmware_update.h)
endif()

if (${ANJAY_WITH_MODULE_SW_MGMT})
set(HEADERS ${HEADERS} software_mgmt.h)
endif()

set(ALL_SOURCES ${SOURCES} ${HEADERS})

if(NOT TARGET anjay)
Expand Down
22 changes: 11 additions & 11 deletions demo/advanced_firmware_update.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2023 AVSystem <[email protected]>
* Copyright 2017-2024 AVSystem <[email protected]>
* AVSystem Anjay LwM2M SDK
* All rights reserved.
*
Expand Down Expand Up @@ -1021,18 +1021,18 @@ int fw_update_common_perform_upgrade(

int fw_update_common_maybe_create_firmware_file(
advanced_fw_update_logic_t *fw) {
if (fw->next_target_path) {
return 0;
}
if (fw->administratively_set_target_path) {
fw->next_target_path = avs_strdup(fw->administratively_set_target_path);
} else {
fw->next_target_path = generate_random_target_filepath();
}
if (!fw->next_target_path) {
if (fw->administratively_set_target_path) {
fw->next_target_path =
avs_strdup(fw->administratively_set_target_path);
} else {
fw->next_target_path = generate_random_target_filepath();
}
if (!fw->next_target_path) {
return -1;
}
demo_log(INFO, "Created %s", fw->next_target_path);
return -1;
}
demo_log(INFO, "Created %s", fw->next_target_path);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion demo/advanced_firmware_update.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2023 AVSystem <[email protected]>
* Copyright 2017-2024 AVSystem <[email protected]>
* AVSystem Anjay LwM2M SDK
* All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion demo/advanced_firmware_update_addimg.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2023 AVSystem <[email protected]>
* Copyright 2017-2024 AVSystem <[email protected]>
* AVSystem Anjay LwM2M SDK
* All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion demo/advanced_firmware_update_app.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2023 AVSystem <[email protected]>
* Copyright 2017-2024 AVSystem <[email protected]>
* AVSystem Anjay LwM2M SDK
* All rights reserved.
*
Expand Down
35 changes: 34 additions & 1 deletion demo/demo.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2023 AVSystem <[email protected]>
* Copyright 2017-2024 AVSystem <[email protected]>
* AVSystem Anjay LwM2M SDK
* All rights reserved.
*
Expand Down Expand Up @@ -292,6 +292,9 @@ static void demo_delete(anjay_demo_t *demo) {
#ifdef ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE
advanced_firmware_update_uninstall(demo->advanced_fw_update_logic_table);
#endif // ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE
#ifdef ANJAY_WITH_MODULE_SW_MGMT
sw_mgmt_update_destroy(demo->sw_mgmt_table);
#endif // ANJAY_WITH_MODULE_SW_MGMT
#ifdef WITH_DEMO_USE_STANDALONE_OBJECTS
standalone_server_object_cleanup(demo->server_obj_ptr);
standalone_security_object_cleanup(demo->security_obj_ptr);
Expand Down Expand Up @@ -585,6 +588,14 @@ static int demo_init(anjay_demo_t *demo, cmdline_args_t *cmdline_args) {
}
#endif // ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE

#if defined(ANJAY_WITH_MODULE_SW_MGMT) && defined(ANJAY_WITH_DOWNLOADER)
avs_net_security_info_t *sw_mgmt_security_info_ptr = NULL;
if (cmdline_args->sw_mgmt_security_info.mode
!= (avs_net_security_mode_t) -1) {
sw_mgmt_security_info_ptr = &cmdline_args->sw_mgmt_security_info;
}
#endif // defined(ANJAY_WITH_MODULE_SW_MGMT) && defined(ANJAY_WITH_DOWNLOADER)

demo->connection_args = &cmdline_args->connection_args;
#ifdef AVS_COMMONS_STREAM_WITH_FILE
# ifdef ANJAY_WITH_ATTR_STORAGE
Expand Down Expand Up @@ -777,6 +788,28 @@ static int demo_init(anjay_demo_t *demo, cmdline_args_t *cmdline_args) {
}
#endif // ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE

#ifdef ANJAY_WITH_MODULE_SW_MGMT
if (sw_mgmt_install(
demo->anjay, &demo->sw_mgmt_common, demo->sw_mgmt_table,
cmdline_args->sw_mgmt_persistence_file,
cmdline_args->prefer_same_socket_downloads,
cmdline_args->sw_mgmt_delayed_first_instance_install_result,
cmdline_args->sw_mgmt_terminate_after_downloading,
cmdline_args->sw_mgmt_disable_repeated_activation_deactivation
# ifdef ANJAY_WITH_DOWNLOADER
,
sw_mgmt_security_info_ptr,
cmdline_args->sw_mgmt_tx_params_modified
? &cmdline_args->sw_mgmt_tx_params
: NULL,
&cmdline_args->sw_mgmt_tcp_request_timeout,
cmdline_args->sw_mgmt_auto_suspend
# endif // ANJAY_WITH_DOWNLOADER
)) {
return -1;
}
#endif // ANJAY_WITH_MODULE_SW_MGMT

#ifdef ANJAY_WITH_MODULE_ACCESS_CONTROL
if (!dm_persistence_restored
&& (add_default_access_entries(demo)
Expand Down
10 changes: 9 additions & 1 deletion demo/demo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2023 AVSystem <[email protected]>
* Copyright 2017-2024 AVSystem <[email protected]>
* AVSystem Anjay LwM2M SDK
* All rights reserved.
*
Expand Down Expand Up @@ -27,6 +27,10 @@
#ifdef ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE
# include "advanced_firmware_update.h"
#endif // ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE

#ifdef ANJAY_WITH_MODULE_SW_MGMT
# include "software_mgmt.h"
#endif // ANJAY_WITH_MODULE_SW_MGMT
#include "objects.h"

typedef int anjay_demo_object_get_instances_t(const anjay_dm_object_def_t **,
Expand Down Expand Up @@ -66,6 +70,10 @@ struct anjay_demo_struct {
advanced_fw_update_logic_t
advanced_fw_update_logic_table[FW_UPDATE_IID_IMAGE_SLOTS];
#endif // ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE
#ifdef ANJAY_WITH_MODULE_SW_MGMT
sw_mgmt_common_logic_t sw_mgmt_common;
sw_mgmt_logic_t sw_mgmt_table[SW_MGMT_PACKAGE_COUNT];
#endif // ANJAY_WITH_MODULE_SW_MGMT

#ifdef WITH_DEMO_USE_STANDALONE_OBJECTS
const anjay_dm_object_def_t **security_obj_ptr;
Expand Down
Loading

0 comments on commit fc26744

Please sign in to comment.