Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into ci-fix
  • Loading branch information
xiazhvera committed Dec 18, 2024
2 parents 9f804d2 + 602121d commit 2db3eb1
Show file tree
Hide file tree
Showing 57 changed files with 218 additions and 103 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.9)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(AwsGetVersion)
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ __Jump To:__
* [Supported Architectures](#supported-architectures)
* [Installation](#installation)
* [Samples](./samples)
* [Mac-Only TLS Behavior](#mac-only-tls-behavior)
* [Getting Help](#getting-help)
* [FAQ](./documents/FAQ.md)
* [API Docs](https://aws.github.io/aws-iot-device-sdk-cpp-v2/)
Expand Down Expand Up @@ -42,7 +43,7 @@ __Jump To:__
### Minimum Requirements
* C++ 11 or higher
* Clang 3.9+ or GCC 4.8+ or MSVC 2015+
* CMake 3.1+
* CMake 3.9+

[Step-by-step instructions](./documents/PREREQUISITES.md)

Expand Down Expand Up @@ -108,6 +109,14 @@ existing `libcrypto`, instead of building its own copy.

[Samples README](./samples)

### Mac-Only TLS Behavior

Please note that on Mac, once a private key is used with a certificate, that certificate-key pair is imported into the Mac Keychain. All subsequent uses of that certificate will use the stored private key and ignore anything passed in programmatically. Beginning in v1.7.3, when a stored private key from the Keychain is used, the following will be logged at the "info" log level:

```
static: certificate has an existing certificate-key pair that was previously imported into the Keychain. Using key from Keychain instead of the one provided.
```

## Getting Help

The best way to interact with our team is through GitHub. You can open a [discussion](https://github.com/aws/aws-iot-device-sdk-cpp-v2/discussions) for guidance questions or an [issue](https://github.com/aws/aws-iot-device-sdk-cpp-v2/issues/new/choose) for bug reports, or feature requests. You may also find help on community resources such as [StackOverFlow](https://stackoverflow.com/questions/tagged/aws-iot) with the tag [#aws-iot](https://stackoverflow.com/questions/tagged/aws-iot) or if you have a support plan with [AWS Support](https://aws.amazon.com/premiumsupport/), you can also create a new support case.
Expand All @@ -131,4 +140,4 @@ is provided by code that been generated from a model of the service.

This library is licensed under the [Apache 2.0 License](./documents/LICENSE).

Latest released version: v1.33.0
Latest released version: v1.34.0
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.33.0
1.34.0
2 changes: 1 addition & 1 deletion deviceadvisor/tests/mqtt_connect/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.9)
# note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12
project(mqtt_connect CXX)

Expand Down
2 changes: 1 addition & 1 deletion deviceadvisor/tests/mqtt_publish/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.9)
# note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12
project(mqtt_publish CXX)

Expand Down
2 changes: 1 addition & 1 deletion deviceadvisor/tests/mqtt_subscribe/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.9)
# note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12
project(mqtt_subscribe CXX)

Expand Down
2 changes: 1 addition & 1 deletion deviceadvisor/tests/shadow_update/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.9)
# note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12
project(shadow_update CXX)

Expand Down
15 changes: 8 additions & 7 deletions devicedefender/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.9)

project(IotDeviceDefender-cpp
LANGUAGES CXX)
if (DEFINED SIMPLE_VERSION)
message("Device Defender version is ${SIMPLE_VERSION}")
set(PROJECT_VERSION ${SIMPLE_VERSION})
endif()
project(IotDeviceDefender-cpp LANGUAGES CXX VERSION ${SIMPLE_VERSION})

set(RUNTIME_DIRECTORY bin)

Expand All @@ -19,6 +14,11 @@ elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
endif()
endif()

set(GENERATED_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated")
set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include")
set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/iotdevicedefender/Config.h")
configure_file(include/aws/iotdevicedefender/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake")

if (NOT CMAKE_CXX_STANDARD)
Expand All @@ -27,6 +27,7 @@ endif()

file(GLOB AWS_IOTDEVICEDEFENDER_HEADERS
"include/aws/iotdevicedefender/*.h"
${GENERATED_CONFIG_HEADER}
)

file(GLOB AWS_IOTDEVICEDEFENDER_SRC
Expand Down
11 changes: 11 additions & 0 deletions devicedefender/include/aws/iotdevicedefender/Config.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICEDEFENDER_VERSION "@FULL_VERSION@"
#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICEDEFENDER_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICEDEFENDER_VERSION_MINOR @PROJECT_VERSION_MINOR@
#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICEDEFENDER_VERSION_PATCH @PROJECT_VERSION_PATCH@
#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICEDEFENDER_GIT_HASH "@GIT_HASH@"
14 changes: 8 additions & 6 deletions discovery/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.9)

project(Discovery-cpp LANGUAGES CXX)
if (DEFINED SIMPLE_VERSION)
message("Discovery version is ${SIMPLE_VERSION}")
set(PROJECT_VERSION ${SIMPLE_VERSION})
endif()
project(Discovery-cpp LANGUAGES CXX VERSION ${SIMPLE_VERSION})

set(RUNTIME_DIRECTORY bin)

Expand All @@ -18,6 +14,11 @@ elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
endif()
endif()

set(GENERATED_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated")
set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include")
set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/discovery/Config.h")
configure_file(include/aws/discovery/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake")

if (NOT CMAKE_CXX_STANDARD)
Expand All @@ -26,6 +27,7 @@ endif()

file(GLOB AWS_DISCOVERY_HEADERS
"include/aws/discovery/*.h"
${GENERATED_CONFIG_HEADER}
)

file(GLOB AWS_DISCOVERY_SRC
Expand Down
11 changes: 11 additions & 0 deletions discovery/include/aws/discovery/Config.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#define AWS_IOT_DEVICE_SDK_CPP_V2_DISCOVERY_VERSION "@FULL_VERSION@"
#define AWS_IOT_DEVICE_SDK_CPP_V2_DISCOVERY_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define AWS_IOT_DEVICE_SDK_CPP_V2_DISCOVERY_VERSION_MINOR @PROJECT_VERSION_MINOR@
#define AWS_IOT_DEVICE_SDK_CPP_V2_DISCOVERY_VERSION_PATCH @PROJECT_VERSION_PATCH@
#define AWS_IOT_DEVICE_SDK_CPP_V2_DISCOVERY_GIT_HASH "@GIT_HASH@"
9 changes: 0 additions & 9 deletions documents/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* [Detecting connection loss (tldr use keepAliveTimeSecs and pingTimeoutMs)](#connection-loss)
* [How to use a Pre-Built aws-crt-cpp (Most useful for development of this package)](#prebuilt-aws-crt-cpp)
* [I am experiencing deadlocks](#i-am-experiencing-deadlocks)
* [Mac-Only TLS Behavior](#mac-only-tls-behavior)
* [How do debug in VSCode?](#how-do-debug-in-vscode)
* [What certificates do I need?](#what-certificates-do-i-need)
* [I still have more questions about this sdk?](#i-still-have-more-questions-about-this-sdk)
Expand Down Expand Up @@ -82,14 +81,6 @@ cmake --build . --target install

You MUST NOT perform blocking operations on any callback, or you will cause a deadlock. For example: in the on_publish_received callback, do not send a publish, and then wait for the future to complete within the callback. The Client cannot do work until your callback returns, so the thread will be stuck.

### Mac-Only TLS Behavior

Please note that on Mac, once a private key is used with a certificate, that certificate-key pair is imported into the Mac Keychain. All subsequent uses of that certificate will use the stored private key and ignore anything passed in programmatically. Beginning in v1.7.3, when a stored private key from the Keychain is used, the following will be logged at the "info" log level:

```
static: certificate has an existing certificate-key pair that was previously imported into the Keychain. Using key from Keychain instead of the one provided.
```

### How do debug in VSCode?

Here is an example launch.json file to run the pubsub sample
Expand Down
14 changes: 8 additions & 6 deletions eventstream_rpc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.9)

project(EventstreamRpc-cpp LANGUAGES CXX)
if (DEFINED SIMPLE_VERSION)
message("EventStreamRPC version is ${SIMPLE_VERSION}")
set(PROJECT_VERSION ${SIMPLE_VERSION})
endif()
project(EventstreamRpc-cpp LANGUAGES CXX VERSION ${SIMPLE_VERSION})

set(RUNTIME_DIRECTORY bin)

Expand All @@ -18,6 +14,11 @@ elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
endif()
endif()

set(GENERATED_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated")
set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include")
set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/eventstreamrpc/Config.h")
configure_file(include/aws/eventstreamrpc/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake")

if (NOT CMAKE_CXX_STANDARD)
Expand All @@ -26,6 +27,7 @@ endif()

file(GLOB AWS_EVENTSTREAMRPC_HEADERS
"include/aws/eventstreamrpc/*.h"
${GENERATED_CONFIG_HEADER}
)

file(GLOB AWS_EVENTSTREAMRPC_SRC
Expand Down
11 changes: 11 additions & 0 deletions eventstream_rpc/include/aws/eventstreamrpc/Config.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#define AWS_IOT_DEVICE_SDK_CPP_V2_EVENTSTREAMRPC_VERSION "@FULL_VERSION@"
#define AWS_IOT_DEVICE_SDK_CPP_V2_EVENTSTREAMRPC_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define AWS_IOT_DEVICE_SDK_CPP_V2_EVENTSTREAMRPC_VERSION_MINOR @PROJECT_VERSION_MINOR@
#define AWS_IOT_DEVICE_SDK_CPP_V2_EVENTSTREAMRPC_VERSION_PATCH @PROJECT_VERSION_PATCH@
#define AWS_IOT_DEVICE_SDK_CPP_V2_EVENTSTREAMRPC_GIT_HASH "@GIT_HASH@"
14 changes: 8 additions & 6 deletions greengrass_ipc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.9)

project(GreengrassIpc-cpp LANGUAGES CXX)
if (DEFINED SIMPLE_VERSION)
message("GreengrassIpc version is ${SIMPLE_VERSION}")
set(PROJECT_VERSION ${SIMPLE_VERSION})
endif()
project(GreengrassIpc-cpp LANGUAGES CXX VERSION ${SIMPLE_VERSION})

set(RUNTIME_DIRECTORY bin)

Expand All @@ -18,6 +14,11 @@ elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
endif()
endif()

set(GENERATED_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated")
set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include")
set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/greengrass/Config.h")
configure_file(include/aws/greengrass/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake")

if (NOT CMAKE_CXX_STANDARD)
Expand All @@ -26,6 +27,7 @@ endif()

file(GLOB AWS_GREENGRASSIPC_HEADERS
"include/aws/greengrass/*.h"
${GENERATED_CONFIG_HEADER}
)

file(GLOB AWS_GREENGRASSIPC_SRC
Expand Down
11 changes: 11 additions & 0 deletions greengrass_ipc/include/aws/greengrass/Config.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#define AWS_IOT_DEVICE_SDK_CPP_V2_GREENGRASS_VERSION "@FULL_VERSION@"
#define AWS_IOT_DEVICE_SDK_CPP_V2_GREENGRASS_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define AWS_IOT_DEVICE_SDK_CPP_V2_GREENGRASS_VERSION_MINOR @PROJECT_VERSION_MINOR@
#define AWS_IOT_DEVICE_SDK_CPP_V2_GREENGRASS_VERSION_PATCH @PROJECT_VERSION_PATCH@
#define AWS_IOT_DEVICE_SDK_CPP_V2_GREENGRASS_GIT_HASH "@GIT_HASH@"
14 changes: 8 additions & 6 deletions identity/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# This file is generated

cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.9)

project(IotIdentity-cpp LANGUAGES CXX)
if (DEFINED SIMPLE_VERSION)
message("IotIdentity version is ${SIMPLE_VERSION}")
set(PROJECT_VERSION ${SIMPLE_VERSION})
endif()
project(IotIdentity-cpp LANGUAGES CXX VERSION ${SIMPLE_VERSION})

set(RUNTIME_DIRECTORY bin)

Expand All @@ -20,6 +16,11 @@ elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
endif()
endif()

set(GENERATED_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated")
set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include")
set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/iotidentity/Config.h")
configure_file(include/aws/iotidentity/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake")

if (NOT CMAKE_CXX_STANDARD)
Expand All @@ -28,6 +29,7 @@ endif()

file(GLOB AWS_IOTIDENTITY_HEADERS
"include/aws/iotidentity/*.h"
${GENERATED_CONFIG_HEADER}
)

file(GLOB AWS_IOTIDENTITY_SRC
Expand Down
11 changes: 11 additions & 0 deletions identity/include/aws/iotidentity/Config.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTIDENTITY_VERSION "@FULL_VERSION@"
#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTIDENTITY_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTIDENTITY_VERSION_MINOR @PROJECT_VERSION_MINOR@
#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTIDENTITY_VERSION_PATCH @PROJECT_VERSION_PATCH@
#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTIDENTITY_GIT_HASH "@GIT_HASH@"
14 changes: 8 additions & 6 deletions iotdevicecommon/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.9)

project(IotDeviceCommon-cpp LANGUAGES CXX)
if (DEFINED SIMPLE_VERSION)
message("IoT Device Common version is ${SIMPLE_VERSION}")
set(PROJECT_VERSION ${SIMPLE_VERSION})
endif()
project(IotDeviceCommon-cpp LANGUAGES CXX VERSION ${SIMPLE_VERSION})

set(RUNTIME_DIRECTORY bin)

Expand All @@ -18,6 +14,11 @@ elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
endif()
endif()

set(GENERATED_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated")
set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include")
set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/iotdevicecommon/Config.h")
configure_file(include/aws/iotdevicecommon/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake")

if (NOT CMAKE_CXX_STANDARD)
Expand All @@ -26,6 +27,7 @@ endif()

file(GLOB AWS_IOTDEVICECOMMON_HEADERS
"include/aws/iotdevicecommon/*.h"
${GENERATED_CONFIG_HEADER}
)

file(GLOB AWS_IOTDEVICECOMMON_SRC
Expand Down
11 changes: 11 additions & 0 deletions iotdevicecommon/include/aws/iotdevicecommon/Config.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICECOMMON_VERSION "@FULL_VERSION@"
#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICECOMMON_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICECOMMON_VERSION_MINOR @PROJECT_VERSION_MINOR@
#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICECOMMON_VERSION_PATCH @PROJECT_VERSION_PATCH@
#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICECOMMON_GIT_HASH "@GIT_HASH@"
Loading

0 comments on commit 2db3eb1

Please sign in to comment.