Skip to content
This repository was archived by the owner on Jul 22, 2023. It is now read-only.

Commit 5d17e99

Browse files
authored
Merge pull request #34 Release Version 1.0 from GoogleCloudPlatform/development
# Google Cloud IoT Core Device SDK for Embedded C version 1.0 #### February 222018 - Added FreeRTOS example. See `examples/freertos_linux/Linux_gcc_gcp_iot/README.md` for more information. - Added Zephyr example. See `examples/zephyr_native_posix/README.md` for more information. - Added ATECC608 Secure Element reference implementation for generating JWT signatures with private keys. See `src/bsp/crypto/cryptoauthlib/iotc_bsp_crypto_cryptoauthlib.c` for more information. - Connection API Changes: - JWT creation and formation was added to a new header file `include/iotc_jwt.h`. - `iotc_connect` and `iotc_connect_to` now take the standard MQTT connect credentials of username, password, and client_id. A JWT, formatted according to [Cloud IoT Core specifications](https://cloud.google.com/iot/docs/how-tos/credentials/keys), should be passed as the MQTT password when connecting to Cloud IoT Core. - For more information, see the Doxygen reference in the `include/` directory source files or the `doc/doxygen/api` directory (for the HTML formatted documentation).
2 parents b8929d6 + e0bd912 commit 5d17e99

File tree

406 files changed

+7111
-13322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

406 files changed

+7111
-13322
lines changed

.gitignore

-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
bin/
22
obj/
3-
res/trusted_RootCA_certs/roots.pem
43
test_coverage/
54
.vscode/
6-
third_party/tls/mbedtls
7-
third_party/tls/wolfssl
8-
third_party/protobuf-c/library/*.o

.gitmodules

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "third_party/googletest"]
2+
path = third_party/googletest
3+
url = https://github.com/google/googletest
4+
[submodule "third_party/cryptoauthlib"]
5+
path = third_party/cryptoauthlib
6+
url = https://github.com/MicrochipTech/cryptoauthlib.git

.travis.yml

+32-6
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,34 @@ env:
2121
- PRESET=POSIX_REL
2222
- PRESET=POSIX_REL_MIN
2323

24-
# WOLFSSL Tests
24+
- PRESET=FREERTOS_POSIX_DEV
25+
BEFORE_SCRIPT_ACTION="make PRESET=FREERTOS_POSIX_REL prereqs"
26+
27+
- PRESET=FREERTOS_POSIX_REL
28+
BEFORE_SCRIPT_ACTION="make PRESET=FREERTOS_POSIX_REL prereqs"
29+
30+
# WOLFSSL Tests
2531
- PRESET=POSIX_DEV
2632
IOTC_BSP_TLS=wolfssl
33+
IOTC_BSP_CRYPTO=wolfssl
2734

2835
- PRESET=POSIX_REL
2936
IOTC_BSP_TLS=wolfssl
37+
IOTC_BSP_CRYPTO=wolfssl
3038

3139
- PRESET=POSIX_THREADING_REL
32-
#- PRESET=POSIX_UNSECURE_REL
33-
# IOTC_BSP_TLS=""
40+
# - PRESET=POSIX_UNSECURE_REL
41+
# IOTC_BSP_TLS=""
3442

3543
- TESTS=fuzztests
3644
PRESET=FUZZ_TESTS
3745
IOTC_BSP_TLS=""
3846
IOTC_MAKETARGET="fuzz_tests"
3947
CXX=clang++
4048

49+
# - PRESET=ZEPHYR
50+
# IOTC_MAKETARGET=""
51+
4152
cache:
4253
apt
4354
addons:
@@ -49,7 +60,15 @@ addons:
4960
- clang-3.8
5061
- qemu-system
5162
- libc6:i386
63+
- libc6-dev-i386
64+
- gcc-multilib
65+
- linux-libc-dev:i386
5266
- expect
67+
- device-tree-compiler
68+
- gperf
69+
- dfu-util
70+
- xz-utils
71+
- python3-pip
5372
matrix:
5473
exclude:
5574
- compiler: clang
@@ -70,16 +89,23 @@ before_script:
7089
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope;
7190
fi"
7291
- "if [[ $IOTC_BSP_TLS == 'wolfssl' ]]; then
73-
git clone -b v3.15.3-stable https://github.com/wolfSSL/wolfssl $HOME/build/GoogleCloudPlatform/iot-edge-sdk-embedded-c/third_party/tls/wolfssl;
92+
git clone -b v3.15.3-stable https://github.com/wolfSSL/wolfssl $HOME/build/GoogleCloudPlatform/iot-device-sdk-embedded-c/third_party/tls/wolfssl;
7493
fi;"
94+
- "$BEFORE_SCRIPT_ACTION"
7595
script:
7696
- "set -e"
77-
- "cd $HOME/build/GoogleCloudPlatform/iot-edge-sdk-embedded-c"
97+
- "cd $HOME/build/GoogleCloudPlatform/iot-device-sdk-embedded-c"
7898
- "if [[ $IOTC_BSP_TLS == 'wolfssl' ]]; then
7999
expect res/travis/travis_build_wolfssl.expect make PRESET=$PRESET IOTC_DEBUG_OUTPUT=0 $IOTC_MAKETARGET;
80100
else
81101
expect res/travis/travis_build_mbedtls.expect make PRESET=$PRESET IOTC_DEBUG_OUTPUT=0 $IOTC_MAKETARGET;
82102
fi;"
83103
- "if [[ ! $CC == 'gcc' && ! $TESTS == 'fuzztests' ]]; then
84-
make -C examples/mqtt_logic_producer IOTC_CLIENT_LIB_PATH=../../bin/linux IOTC_BSP_TLS=$IOTC_BSP_TLS;
104+
if [[ $PRESET == 'FREERTOS_POSIX_REL' || $PRESET == 'FREERTOS_POSIX_DEV' ]]; then
105+
make -C examples/freertos_linux/Linux_gcc_gcp_iot IOTC_CLIENT_LIB_PATH=../../../bin/freertos-linux IOTC_BSP_TLS=$IOTC_BSP_TLS;
106+
elif [[ $PRESET == 'ZEPHYR' ]]; then
107+
make -C examples/zephyr_native_posix/build VERBOSE=1;
108+
else
109+
make -C examples/iot_core_mqtt_client IOTC_CLIENT_LIB_PATH=../../bin/linux IOTC_BSP_TLS=$IOTC_BSP_TLS;
110+
fi;
85111
fi;"

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Google LLC
1+
# Copyright 2018-2019 Google LLC
22

33
### This library is licensed under the BSD 3-Clause license.
44
### All rights reserved.

Makefile

+73-46
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Copyright 2018 Google LLC
1+
# Copyright 2018-2019 Google LLC
22
#
3-
# This is part of the Google Cloud IoT Edge Embedded C Client,
3+
# This is part of the Google Cloud IoT Device SDK for Embedded C,
44
# it is licensed under the BSD 3-Clause license; you may not use this file
55
# except in compliance with the License.
66
#
@@ -32,6 +32,9 @@ MD ?= @
3232
# TLS related configuration
3333
IOTC_BSP_TLS ?= mbedtls
3434

35+
# Cryptographic BSP implementation
36+
IOTC_BSP_CRYPTO ?= mbedtls
37+
3538
#detect if the build happen on Travis
3639
ifdef TRAVIS_OS_NAME
3740
IOTC_TRAVIS_BUILD=1
@@ -43,6 +46,7 @@ include make/mt-config/mt-config.mk
4346
include make/mt-os/mt-os.mk
4447
include make/mt-os/mt-$(IOTC_CONST_PLATFORM_CURRENT).mk
4548
include make/mt-config/mt-examples.mk
49+
include make/mt-config/tests/mt-gtest.mk
4650
include make/mt-config/tests/mt-tests-tools.mk
4751
include make/mt-config/tests/mt-tests-unit.mk
4852
include make/mt-config/tests/mt-tests-integration.mk
@@ -87,20 +91,10 @@ build_output: header preset_output
8791
$(info . COMPILER: [$(CC)] )
8892
$(info )
8993

90-
.PHONY: roots_pem
91-
roots_pem: res/trusted_RootCA_certs/roots.pem
92-
93-
all: build_output roots_pem $(XI) $(IOTC_POST_BUILD_ACTION)
94-
95-
res/trusted_RootCA_certs/roots.pem:
96-
$(info Attempting to download IoT Core Server Authentication)
97-
$(info Ceritificate List. If this fails, then please download the list)
98-
$(info from https://pki.google.com/roots.pem , and place it in the directory)
99-
$(info res/trusted_RootCA_certs/)
100-
wget https://pki.google.com/roots.pem -P res/trusted_RootCA_certs
94+
all: build_output $(XI)
10195

10296
.PHONY: tests
103-
tests: build_output roots_pem utests itests
97+
tests: build_output utests gtests itests
10498

10599
.PHONY: utests
106100
utests: $(IOTC_UTESTS) $(IOTC_TEST_TOOLS_OBJS) $(IOTC_TEST_TOOLS)
@@ -110,6 +104,10 @@ utests: $(IOTC_UTESTS) $(IOTC_TEST_TOOLS_OBJS) $(IOTC_TEST_TOOLS)
110104
itests: $(IOTC_ITESTS) $(IOTC_TEST_TOOLS_OBJS) $(IOTC_TEST_TOOLS)
111105
$(IOTC_RUN_ITESTS)
112106

107+
.PHONY: gtests
108+
gtests: $(IOTC_GTESTS)
109+
$(IOTC_RUN_GTESTS)
110+
113111
.PHONY: test_coverage
114112
test_coverage:
115113
./tools/test_coverage.sh
@@ -138,7 +136,7 @@ clean_all: clean
138136

139137
libiotc: $(XI)
140138

141-
$(XI): $(IOTC_TLS_LIB_DEP) $(IOTC_PROTOFILES_C) $(IOTC_OBJS) | $(IOTC_BIN_DIRS)
139+
$(XI): $(IOTC_TLS_LIB_DEP) $(IOTC_CRYPTO_LIB_DEP) $(IOTC_PROTOFILES_C) $(IOTC_OBJS) $(IOTC_BUILD_PRECONDITIONS) | $(IOTC_BIN_DIRS)
142140
$(info [$(AR)] $@ )
143141
$(MD) $(AR) $(IOTC_ARFLAGS) $(IOTC_OBJS) $(IOTC_EXTRA_ARFLAGS)
144142

@@ -158,29 +156,66 @@ $(IOTC_UTEST_OBJDIR)/%.o : $(IOTC_UTEST_SOURCE_DIR)/%.c $(IOTC_BUILD_PRECONDITIO
158156
$(MD) $(CC) $(IOTC_UTEST_CONFIG_FLAGS) $(IOTC_UTEST_INCLUDE_FLAGS) -c $< $(IOTC_COMPILER_OUTPUT)
159157
$(MD) $(CC) $(IOTC_UTEST_CONFIG_FLAGS) $(IOTC_UTEST_INCLUDE_FLAGS) -MM $< -MT $@ -MF $(@:.o=.d)
160158

159+
# specific compiler flags for gtest objects
160+
$(IOTC_GTEST_OBJDIR)/%.o : $(LIBIOTC_SRC)/%.cc $(IOTC_BUILD_PRECONDITIONS)
161+
@-mkdir -p $(dir $@)
162+
$(info [$(CXX)] $@)
163+
$(MD) $(CXX) $(IOTC_GTEST_CONFIG_FLAGS) $(IOTC_GTEST_CXX_FLAGS) -c $< $(IOTC_COMPILER_OUTPUT)
164+
$(MD) $(CXX) $(IOTC_GTEST_CONFIG_FLAGS) $(IOTC_GTEST_CXX_FLAGS) -MM $< -MT $@ -MF $(@:.o=.d)
165+
161166
# specific compiler flags for libiotc_driver
162167
$(IOTC_OBJDIR)/tests/tools/iotc_libiotc_driver/%.o : $(LIBIOTC)/src/tests/tools/iotc_libiotc_driver/%.c $(IOTC_BUILD_PRECONDITIONS)
163168
@-mkdir -p $(dir $@)
164169
$(info [$(CC)] $@)
165-
$(MD) $(CC) $(IOTC_CONFIG_FLAGS) $(IOTC_COMPILER_FLAGS) $(IOTC_INCLUDE_FLAGS) $(IOTC_TEST_TOOLS_INCLUDE_FLAGS) -c $< $(IOTC_COMPILER_OUTPUT)
166-
$(MD) $(CC) $(IOTC_CONFIG_FLAGS) $(IOTC_COMPILER_FLAGS) $(IOTC_INCLUDE_FLAGS) $(IOTC_TEST_TOOLS_INCLUDE_FLAGS) -MM $< -MT $@ -MF $(@:.o=.d)
170+
$(MD) $(CC) $(IOTC_CONFIG_FLAGS) $(IOTC_COMMON_COMPILER_FLAGS) $(IOTC_C_FLAGS) $(IOTC_INCLUDE_FLAGS) $(IOTC_TEST_TOOLS_INCLUDE_FLAGS) -c $< $(IOTC_COMPILER_OUTPUT)
171+
$(MD) $(CC) $(IOTC_CONFIG_FLAGS) $(IOTC_COMMON_COMPILER_FLAGS) $(IOTC_C_FLAGS) $(IOTC_INCLUDE_FLAGS) $(IOTC_TEST_TOOLS_INCLUDE_FLAGS) -MM $< -MT $@ -MF $(@:.o=.d)
167172

168173
-include $(IOTC_OBJS:.o=.d)
169174

175+
# C source files
170176
$(IOTC_OBJDIR)/%.o : $(LIBIOTC)/src/%.c $(IOTC_BUILD_PRECONDITIONS)
171177
@-mkdir -p $(dir $@)
172178
$(info [$(CC)] $@)
173-
$(MD) $(CC) $(IOTC_CONFIG_FLAGS) $(IOTC_COMPILER_FLAGS) $(IOTC_INCLUDE_FLAGS) -c $< $(IOTC_COMPILER_OUTPUT)
174-
$(IOTC_POST_COMPILE_ACTION)
179+
$(MD) $(CC) $(IOTC_CONFIG_FLAGS) $(IOTC_COMMON_COMPILER_FLAGS) $(IOTC_C_FLAGS) $(IOTC_INCLUDE_FLAGS) -c $< $(IOTC_COMPILER_OUTPUT)
180+
$(IOTC_POST_COMPILE_ACTION_CC)
175181

176-
$(IOTC_OBJDIR)/third_party/mqtt-protocol-c/%.o : $(LIBIOTC)/third_party/mqtt-protocol-c/%.c $(IOTC_BUILD_PRECONDITIONS)
182+
$(IOTC_OBJDIR)/third_party/%.o : $(LIBIOTC)/third_party/%.c $(IOTC_BUILD_PRECONDITIONS)
177183
@-mkdir -p $(dir $@)
178184
$(info [$(CC)] $@)
179-
$(MD) $(CC) $(IOTC_CONFIG_FLAGS) $(IOTC_COMPILER_FLAGS) $(IOTC_INCLUDE_FLAGS) -c $< $(IOTC_COMPILER_OUTPUT)
180-
$(IOTC_POST_COMPILE_ACTION)
185+
$(MD) $(CC) $(IOTC_CONFIG_FLAGS) $(IOTC_COMMON_COMPILER_FLAGS) $(IOTC_C_FLAGS) $(IOTC_INCLUDE_FLAGS) -c $< $(IOTC_COMPILER_OUTPUT)
186+
$(IOTC_POST_COMPILE_ACTION_CC)
187+
188+
# C++ source files
189+
$(IOTC_OBJDIR)/%.o : $(LIBIOTC)/src/%.cc $(IOTC_BUILD_PRECONDITIONS)
190+
@-mkdir -p $(dir $@)
191+
$(info [$(CXX)] $@)
192+
$(MD) $(CXX) $(IOTC_CONFIG_FLAGS) $(IOTC_COMMON_COMPILER_FLAGS) $(IOTC_CXX_FLAGS) $(IOTC_INCLUDE_FLAGS) -c $< $(IOTC_COMPILER_OUTPUT)
193+
$(IOTC_POST_COMPILE_ACTION_CXX)
194+
195+
###
196+
#### Builtin root CA certificates
197+
###
198+
IOTC_BUILTIN_ROOTCA_CERTS := $(LIBIOTC)/res/trusted_RootCA_certs/roots.pem
199+
200+
$(IOTC_BUILTIN_ROOTCA_CERTS):
201+
curl -s "https://pki.goog/gtsltsr/gtsltsr.crt" \
202+
| openssl x509 -inform der -outform pem \
203+
> $@
204+
205+
curl -s "https://pki.goog/gsr4/GSR4.crt" \
206+
| openssl x509 -inform der -outform pem \
207+
>> $@
208+
209+
.PHONY: update_builtin_cert_buffer
210+
update_builtin_cert_buffer: $(IOTC_BUILTIN_ROOTCA_CERTS)
211+
./tools/create_buffer.py \
212+
--file_name $< \
213+
--array_name iotc_RootCA_list \
214+
--out_path ./src/libiotc/tls/certs \
215+
--no-pretend
181216

182217
# gather all of the binary directories
183-
IOTC_RESOURCE_FILES := $(LIBIOTC)/res/trusted_RootCA_certs/roots.pem
218+
IOTC_RESOURCE_FILES := $(IOTC_BUILTIN_ROOTCA_CERTS)
184219

185220
ifneq (,$(findstring posix_fs,$(CONFIG)))
186221
IOTC_PROVIDE_RESOURCE_FILES = ON
@@ -194,8 +229,8 @@ endif
194229
$(IOTC_EXAMPLE_BINDIR)/internal/%: $(XI)
195230
$(info [$(CC)] $@)
196231
@-mkdir -p $(IOTC_EXAMPLE_OBJDIR)/$(subst $(IOTC_EXAMPLE_BINDIR)/,,$(dir $@))
197-
$(MD) $(CC) $(IOTC_COMPILER_FLAGS) $(IOTC_INCLUDE_FLAGS) -L$(IOTC_BINDIR) $(XI) $(LIBIOTC)/examples/common/src/commandline.c $(IOTC_EXAMPLE_DIR)/$(subst $(IOTC_EXAMPLE_BINDIR),,$@).c $(IOTC_LIB_FLAGS) $(IOTC_COMPILER_OUTPUT)
198-
$(MD) $(CC) $(IOTC_COMPILER_FLAGS) $(IOTC_INCLUDE_FLAGS) -MM $(IOTC_EXAMPLE_DIR)/$(subst $(IOTC_EXAMPLE_BINDIR),,$@).c -MT $@ -MF $(IOTC_EXAMPLE_OBJDIR)/$(subst $(IOTC_EXAMPLE_BINDIR)/,,$@).d
232+
$(MD) $(CC) $(IOTC_COMMON_COMPILER_FLAGS) $(IOTC_C_FLAGS)$(IOTC_INCLUDE_FLAGS) -L$(IOTC_BINDIR) $(XI) $(LIBIOTC)/examples/common/src/commandline.c $(IOTC_EXAMPLE_DIR)/$(subst $(IOTC_EXAMPLE_BINDIR),,$@).c $(IOTC_LIB_FLAGS) $(IOTC_COMPILER_OUTPUT)
233+
$(MD) $(CC) $(IOTC_COMMON_COMPILER_FLAGS) $(IOTC_C_FLAGS) $(IOTC_INCLUDE_FLAGS) -MM $(IOTC_EXAMPLE_DIR)/$(subst $(IOTC_EXAMPLE_BINDIR),,$@).c -MT $@ -MF $(IOTC_EXAMPLE_OBJDIR)/$(subst $(IOTC_EXAMPLE_BINDIR)/,,$@).d
199234

200235
###
201236
#### TEST TOOLS
@@ -204,9 +239,9 @@ $(IOTC_EXAMPLE_BINDIR)/internal/%: $(XI)
204239

205240
$(IOTC_TEST_TOOLS_BINDIR)/%: $(XI) $(IOTC_TEST_TOOLS_OBJS)
206241
$(info [$(CC)] $@)
207-
$(MD) $(CC) $(IOTC_CONFIG_FLAGS) $(IOTC_COMPILER_FLAGS) $(IOTC_INCLUDE_FLAGS) -L$(IOTC_BINDIR) $(IOTC_TEST_TOOLS_OBJS) $(IOTC_TEST_TOOLS_SRCDIR)/$(notdir $@)/$(notdir $@).c $(IOTC_LIB_FLAGS) $(IOTC_COMPILER_OUTPUT)
242+
$(MD) $(CC) $(IOTC_CONFIG_FLAGS) $(IOTC_COMMON_COMPILER_FLAGS) $(IOTC_C_FLAGS) $(IOTC_INCLUDE_FLAGS) -L$(IOTC_BINDIR) $(IOTC_TEST_TOOLS_OBJS) $(IOTC_TEST_TOOLS_SRCDIR)/$(notdir $@)/$(notdir $@).c $(IOTC_LIB_FLAGS) $(IOTC_COMPILER_OUTPUT)
208243
@-mkdir -p $(IOTC_TEST_TOOLS_OBJDIR)
209-
$(MD) $(CC) $(IOTC_CONFIG_FLAGS) $(IOTC_COMPILER_FLAGS) $(IOTC_INCLUDE_FLAGS) -MM $(IOTC_TEST_TOOLS_SRCDIR)/$(notdir $@)/$(notdir $@).c -MT $@ -MF $(IOTC_TEST_TOOLS_OBJDIR)/$(notdir $@).d
244+
$(MD) $(CC) $(IOTC_CONFIG_FLAGS) $(IOTC_COMMON_COMPILER_FLAGS) $(IOTC_C_FLAGS) $(IOTC_INCLUDE_FLAGS) -MM $(IOTC_TEST_TOOLS_SRCDIR)/$(notdir $@)/$(notdir $@).c -MT $@ -MF $(IOTC_TEST_TOOLS_OBJDIR)/$(notdir $@).d
210245
@#$@
211246

212247
###
@@ -216,12 +251,20 @@ $(IOTC_TEST_TOOLS_BINDIR)/%: $(XI) $(IOTC_TEST_TOOLS_OBJS)
216251
IOTC_UTESTS_DEPENDENCIES_FILE = $(IOTC_UTEST_OBJDIR)/$(notdir $(IOTC_UTESTS)).d
217252
-include $(IOTC_UTESTS_DEPENDENCIES_FILE)
218253

254+
IOTC_GTESTS_DEPENDENCIES_FILE = $(IOTC_GTEST_OBJDIR)/$(notdir $(IOTC_GTESTS)).d
255+
-include $(IOTC_GTESTS_DEPENDENCIES_FILE)
256+
219257
$(IOTC_UTESTS): $(XI) $(IOTC_UTEST_OBJS) $(TINY_TEST_OBJ)
220258
$(info [$(CC)] $@)
221259
@-mkdir -p $(IOTC_UTEST_OBJDIR)
222-
$(MD) $(CC) $(IOTC_UTEST_CONFIG_FLAGS) $(IOTC_UTEST_INCLUDE_FLAGS) -L$(IOTC_BINDIR) $(IOTC_UTEST_SUITE_SOURCE) $(IOTC_UTEST_OBJS) $(TINY_TEST_OBJ) $(IOTC_LIB_FLAGS) $(IOTC_COMPILER_OUTPUT)
260+
$(MD) $(CC) $(IOTC_UTEST_CONFIG_FLAGS) $(IOTC_UTEST_INCLUDE_FLAGS) -L$(IOTC_BINDIR) $(IOTC_UTEST_SUITE_SOURCE) $(IOTC_UTEST_OBJS) $(TINY_TEST_OBJ) $(IOTC_LIB_FLAGS) $(IOTC_COMPILER_OUTPUT)
223261
$(MD) $(CC) $(IOTC_UTEST_CONFIG_FLAGS) $(IOTC_UTEST_INCLUDE_FLAGS) -MM $(IOTC_UTEST_SUITE_SOURCE) -MT $@ -MF $(IOTC_UTESTS_DEPENDENCIES_FILE)
224262

263+
$(IOTC_GTESTS): $(XI) $(IOTC_GTEST_OBJS) $(IOTC_UTEST_UTIL_OBJS) $(GTEST_OBJS) $(GMOCK_OBJS)
264+
$(info [$(CXX)] $@)
265+
@-mkdir -p $(IOTC_GTEST_OBJDIR)
266+
$(MD) $(CXX) $(IOTC_GTEST_CONFIG_FLAGS) $(IOTC_GTEST_CXX_FLAGS) -L$(IOTC_BINDIR) $(IOTC_GTEST_OBJS) $(GTEST_OBJS) $(GMOCK_OBJS) $(IOTC_UTEST_UTIL_OBJS) $(IOTC_LIB_FLAGS) $(IOTC_COMPILER_OUTPUT)
267+
225268
# dependencies for integration test binary
226269
ifneq ($(IOTC_CONST_PLATFORM_CURRENT),$(IOTC_CONST_PLATFORM_ARM))
227270

@@ -240,7 +283,7 @@ $(IOTC_FUZZ_TESTS_BINDIR)/%: $(IOTC_FUZZ_TESTS_SOURCE_DIR)/%.cpp
240283
$(IOTC_FUZZ_TESTS): $(XI)
241284

242285
.PHONY: fuzz_tests
243-
fuzz_tests: build_output roots_pem $(IOTC_LIBFUZZER) $(IOTC_FUZZ_TESTS) $(IOTC_FUZZ_TESTS_CORPUS_DIRS)
286+
fuzz_tests: build_output $(IOTC_LIBFUZZER) $(IOTC_FUZZ_TESTS) $(IOTC_FUZZ_TESTS_CORPUS_DIRS)
244287
$(foreach fuzztest, $(IOTC_FUZZ_TESTS), $(call IOTC_RUN_FUZZ_TEST,$(fuzztest)))
245288

246289
.PHONY: static_analysis
@@ -250,7 +293,7 @@ NOW:=$(shell date +"%F-%T")
250293

251294
$(LIBIOTC)/src/%.sa:
252295
$(info [clang-tidy] $(@:.sa=.c))
253-
@clang-tidy --checks='clang-analyzer-*,-clang-analyzer-cplusplus*,-clang-analyzer-osx*' $(@:.sa=.c) >> static_analysis_$(NOW).log -- $(IOTC_CONFIG_FLAGS) $(IOTC_COMPILER_FLAGS) $(IOTC_INCLUDE_FLAGS)
296+
@clang-tidy --checks='clang-analyzer-*,-clang-analyzer-cplusplus*,-clang-analyzer-osx*' $(@:.sa=.c) >> static_analysis_$(NOW).log -- $(IOTC_CONFIG_FLAGS) $(IOTC_COMMON_COMPILER_FLAGS) $(IOTC_C_FLAGS) $(IOTC_INCLUDE_FLAGS)
254297

255298
$(IOTC_BIN_DIRS):
256299
@mkdir -p $@
@@ -268,19 +311,3 @@ update_docs_branch:
268311
&& git add . \
269312
&& git commit -m "[docs] Regenerated documentation for $(REV)" \
270313
&& git push github master:gh-pages -f
271-
272-
CRT_URL := https://secure.globalsign.net/cacert/Root-R1.crt
273-
274-
ca.pem:
275-
curl -s $(CRT_URL) \
276-
| openssl x509 \
277-
-out $@ \
278-
-outform pem
279-
280-
update_builtin_cert: ca.pem
281-
./tools/create_buffer.py \
282-
--file_name ./ca.pem \
283-
--array_name iotc_ca \
284-
--out_path ./src/libiotc/tls/ \
285-
--no-pretend
286-
-rm -rf ./ca.pem

0 commit comments

Comments
 (0)