Skip to content
Permalink
Browse files

Anjay 2.2.3

Bugfixes:
- Fixed error in CoAP message ID assignment when a CoAP request was being sent
  from a response handler

Features:
- Added anjay_resource_observation_status() API to the open source version
- Added --server-public-key-file to the demo application
  • Loading branch information
Mateusz Kwiatkowski
Mateusz Kwiatkowski committed Jan 17, 2020
1 parent 4823696 commit 5a7b6bff5ec30e6f352bb08cce583df67574ad9d
Showing 460 changed files with 867 additions and 512 deletions.
@@ -1,4 +1,4 @@
# Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
# Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
# Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
# Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
cmake_minimum_required(VERSION 3.4.0)

project(anjay C)
set(ANJAY_VERSION "2.2.2" CACHE STRING "Anjay library version")
set(ANJAY_VERSION "2.2.3" CACHE STRING "Anjay library version")
set(ANJAY_BINARY_VERSION 1.0.0)

set(ANJAY_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
@@ -248,6 +248,7 @@ option(WITH_LEGACY_CONTENT_FORMAT_SUPPORT
"Enable support for pre-LwM2M 1.0 CoAP Content-Format values (1541-1543)" OFF)
option(WITH_LWM2M_JSON "Enable support for LwM2M 1.0 JSON (output only)" ON)

cmake_dependent_option(WITH_OBSERVATION_STATUS "Enable support for anjay_resource_observation_status() API" ON "WITH_OBSERVE" OFF)
cmake_dependent_option(WITH_COAP_DOWNLOAD "Enable support for CoAP(S) downloads" ON WITH_DOWNLOADER OFF)

cmake_dependent_option(WITH_ANJAY_LOGS "Enable logging support" ON WITH_AVS_LOG OFF)
@@ -1,5 +1,5 @@
..
Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
2 NOTICE
@@ -1,5 +1,5 @@
Anjay
Copyright 2017-2019 AVSystem
Copyright 2017-2020 AVSystem

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

@@ -1,4 +1,4 @@
# Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
# Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
# Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
# Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
# Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
# Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
# Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
# Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -52,6 +52,7 @@
#cmakedefine WITH_LEGACY_CONTENT_FORMAT_SUPPORT
#cmakedefine WITH_NET_STATS
#cmakedefine WITH_AVS_PERSISTENCE
#cmakedefine WITH_OBSERVATION_STATUS

#cmakedefine WITH_SSL

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
# Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
# Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
# Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -166,6 +166,9 @@ static void print_option_help(const struct option *opt) {
{ 'K', "PRIVATE_KEY_FILE", "$(dirname $0)/../certs/client.key.der",
"DER-formatted PKCS#8 private key complementary to the certificate "
"specified with -C. Mutually exclusive with -k" },
{ 'P', "SERVER_PUBLIC_KEY_FILE",
"$(dirname $0)/../certs/server.crt.der",
"DER-formatted server public key file to load." },
{ 'q', "BINDING_MODE=UQ", "U",
"set the Binding Mode to use for the currently configured server." },
{ 's', "MODE", NULL, "set security mode, one of: psk rpk cert nosec." },
@@ -481,6 +484,7 @@ int demo_parse_argv(cmdline_args_t *parsed_args, int argc, char *argv[]) {
{ "client-cert-file", required_argument, 0, 'C' },
{ "key", required_argument, 0, 'k' },
{ "key-file", required_argument, 0, 'K' },
{ "server-public-key-file", required_argument, 0, 'P' },
{ "binding", required_argument, 0, 'q' },
{ "security-iid", required_argument, 0, 'D' },
{ "security-mode", required_argument, 0, 's' },
@@ -522,6 +526,7 @@ int demo_parse_argv(cmdline_args_t *parsed_args, int argc, char *argv[]) {
(char *) avs_malloc(arg0_prefix_length + sizeof(DEFAULT_KEY_FILE));
const char *cert_path = default_cert_path;
const char *key_path = default_key_path;
const char *server_public_key_path = NULL;

if (!default_cert_path || !default_key_path) {
demo_log(ERROR, "Out of memory");
@@ -676,6 +681,9 @@ int demo_parse_argv(cmdline_args_t *parsed_args, int argc, char *argv[]) {
case 'K':
key_path = optarg;
break;
case 'P':
server_public_key_path = optarg;
break;
case 'q': {
int idx = num_servers == 0 ? 0 : num_servers - 1;
parsed_args->connection_args.servers[idx].binding_mode = optarg;
@@ -1021,6 +1029,15 @@ int demo_parse_argv(cmdline_args_t *parsed_args, int argc, char *argv[]) {
goto finish;
}
}
if (server_public_key_path
&& load_buffer_from_file(
&parsed_args->connection_args.server_public_key,
&parsed_args->connection_args.server_public_key_size,
server_public_key_path)) {
demo_log(ERROR, "Could not load server public key from %s",
server_public_key_path);
goto finish;
}
}
if (parsed_args->fw_security_info.mode == AVS_NET_SECURITY_PSK
&& (!parsed_args->fw_security_info.data.psk.identity
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
# Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
# Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
# Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
# Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
# Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
# Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
# Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
# Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@ string(TIMESTAMP current_year "%Y")
foreach(file IN LISTS CMAKE_INSTALL_MANIFEST_FILES)
if(file MATCHES ".(h|hpp|c|cpp|cmake|py|sh)$")
file(READ ${file} file_contents)
string(REPLACE "2017-2019" "${current_year}" file_contents_replaced "${file_contents}")
string(REPLACE "2017-2020" "${current_year}" file_contents_replaced "${file_contents}")
file(WRITE ${file} "${file_contents_replaced}")
endif()
endforeach()
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
# Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 AVSystem <avsystem@avsystem.com>
* Copyright 2017-2020 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

0 comments on commit 5a7b6bf

Please sign in to comment.
You can’t perform that action at this time.