]> granicus.if.org Git - esp-idf/commitdiff
examples: Copy ca_cert.pem into both example project dirs
authorAngus Gratton <angus@espressif.com>
Wed, 19 Sep 2018 01:25:24 +0000 (11:25 +1000)
committerAngus Gratton <gus@projectgus.com>
Wed, 19 Sep 2018 04:38:19 +0000 (14:38 +1000)
Keeps projects all-in-one under a single directory.

examples/system/ota/README.md
examples/system/ota/native_ota_example/main/CMakeLists.txt
examples/system/ota/native_ota_example/main/component.mk
examples/system/ota/native_ota_example/server_certs/ca_cert.pem [moved from examples/system/ota/server_certs/ca_cert.pem with 100% similarity]
examples/system/ota/simple_ota_example/main/CMakeLists.txt
examples/system/ota/simple_ota_example/main/component.mk
examples/system/ota/simple_ota_example/server_certs/ca_cert.pem [new file with mode: 0644]

index 2d1f42d4b46518cdd519f7a3a7c856107055cc89..2641419380f67a777c36a78cbe95782c984bc668 100644 (file)
@@ -55,10 +55,10 @@ openssl req -x509 -newkey rsa:2048 -keyout ca_key.pem -out ca_cert.pem -days 365
 
 ```
 
-Copy the certificate to OTA example directory:
+Copy the certificate to `server_certs` directory inside OTA example directory:
 
 ```
-cp ca_cert.pem $IDF_PATH/examples/system/ota/server_certs/ca_cert.pem
+cp ca_cert.pem /path/to/ota/example/server_certs/
 ```
 
 
index 0c4aeba941c3a1e7492730a8afac3db9d0e22bd9..a700e0b3b4edb6f455101e07d98b3c027546589c 100644 (file)
@@ -2,8 +2,6 @@ set(COMPONENT_SRCS "native_ota_example.c")
 set(COMPONENT_ADD_INCLUDEDIRS ".")
 
 # Embed the server root certificate into the final binary
-#
-# (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.)
-set(COMPONENT_EMBED_TXTFILES ${IDF_PATH}/examples/system/ota/server_certs/ca_cert.pem)
+set(COMPONENT_EMBED_TXTFILES ${PROJECT_PATH}/server_certs/ca_cert.pem)
 
 register_component()
index 93a42f552fbed2ed2829c9595777a8049ceac081..3a1333340d80e34a9ef4c3e3e7ab37d481d5a1bb 100644 (file)
@@ -3,4 +3,4 @@
 #
 # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
 
-COMPONENT_EMBED_TXTFILES :=  ${IDF_PATH}/examples/system/ota/server_certs/ca_cert.pem
+COMPONENT_EMBED_TXTFILES :=  ${PROJECT_PATH}/server_certs/ca_cert.pem
index e54d8b2ce40d9d899c35571b52e93e675ac9f5e5..8adb69a8f7f137fc59cf9120f704d76fcdd5b1bf 100644 (file)
@@ -3,8 +3,6 @@ set(COMPONENT_ADD_INCLUDEDIRS ".")
 
 
 # Embed the server root certificate into the final binary
-#
-# (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.)
-set(COMPONENT_EMBED_TXTFILES ${IDF_PATH}/examples/system/ota/server_certs/ca_cert.pem)
+set(COMPONENT_EMBED_TXTFILES ${PROJECT_PATH}/server_certs/ca_cert.pem)
 
 register_component()
index 93a42f552fbed2ed2829c9595777a8049ceac081..3a1333340d80e34a9ef4c3e3e7ab37d481d5a1bb 100644 (file)
@@ -3,4 +3,4 @@
 #
 # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
 
-COMPONENT_EMBED_TXTFILES :=  ${IDF_PATH}/examples/system/ota/server_certs/ca_cert.pem
+COMPONENT_EMBED_TXTFILES :=  ${PROJECT_PATH}/server_certs/ca_cert.pem
diff --git a/examples/system/ota/simple_ota_example/server_certs/ca_cert.pem b/examples/system/ota/simple_ota_example/server_certs/ca_cert.pem
new file mode 100644 (file)
index 0000000..e69de29