]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_offline/js/aws_iot_demo_profile_template.js
Add the Labs projects provided in the V10.2.1_191129 zip file.
[freertos] / FreeRTOS-Labs / Demo / FreeRTOS_IoT_Libraries / tools / aws_config_offline / js / aws_iot_demo_profile_template.js
diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_offline/js/aws_iot_demo_profile_template.js b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_offline/js/aws_iot_demo_profile_template.js
new file mode 100644 (file)
index 0000000..d30abd5
--- /dev/null
@@ -0,0 +1,141 @@
+var awsIotProfileTemplate =\r
+`/*\r
+ * FreeRTOS Kernel V10.2.1\r
+ * Copyright (C) 2019 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
+ *\r
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
+ * this software and associated documentation files (the "Software"), to deal in\r
+ * the Software without restriction, including without limitation the rights to\r
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\r
+ * the Software, and to permit persons to whom the Software is furnished to do so,\r
+ * subject to the following conditions:\r
+ *\r
+ * The above copyright notice and this permission notice shall be included in all\r
+ * copies or substantial portions of the Software.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+ *\r
+ * http://www.FreeRTOS.org\r
+ * http://aws.amazon.com/freertos\r
+ *\r
+ * 1 tab == 4 spaces!\r
+ */\r
+\r
+/*\r
+ * IMPORTANT, CONFIGURATION REQUIRED: This is a configuration file containing AWS\r
+ * IoT profile for the demos, will need additional setup:\r
+ * https://www.freertos.org/mqtt/preconfiguredexamplesMA.html\r
+ *\r
+ * Each profile corresponds to a different service. The demos that use the same\r
+ * profile share the same service. It is important to understand the\r
+ * correspondence between the preconfigured profiles and demos, since each\r
+ * service have different connection configuration and credential validation.\r
+ *\r
+ *  - mqtt_demo_profile.h is preconfigured to test.mosquitto.org MQTT broker.\r
+ * The file is used with mqtt_plain_text demo and mqtt_basic_tls_server_auth\r
+ * demo. Feel free to try out other broker with the demos.\r
+ *\r
+ *  - https_demo_profile.h is preconfigured to httpbin.org server. The file is\r
+ * used with http_plain_text demo and https_basic_tls_server_auth demo.\r
+ *\r
+ *  - aws_iot_demo_profile.h (current) contains information to connect to AWS\r
+ * IoT. The file is used with mqtt_tls_mutual_auth demo, https_tls_mutual_auth\r
+ * demo, and other AWS IoT related demo.\r
+ */\r
+\r
+#ifndef AWS_IOT_DEMO_PROFILE_H\r
+#define AWS_IOT_DEMO_PROFILE_H\r
+\r
+/**\r
+ * @brief Details of the MQTT broker to connect to.\r
+ *\r
+ * This is the Thing's Rest API Endpoint for AWS IoT.\r
+ *\r
+ * #define awsiotdemoprofileAWS_ENDPOINT          "...insert here..."\r
+ */\r
+#define awsiotdemoprofileAWS_ENDPOINT     <IOTEndpoint>\r
+\r
+/**\r
+ * @brief The port to use for the MQTT demo.\r
+ *\r
+ * Use 8883 if connecting to AWS IoT services.\r
+ */\r
+#define awsiotdemoprofileAWS_MQTT_PORT    8883\r
+\r
+/**\r
+ * @brief The port to use for the HTTPS demo.\r
+ *\r
+ * Use 8443 if connecting to AWS IoT services.\r
+ */\r
+#define awsiotdemoprofileAWS_HTTPS_PORT           8443\r
+\r
+/**\r
+ * @brief The AWS IoT server certificate.\r
+ *\r
+ * This certificate is used to identify the AWS IoT server and is publicly\r
+ * available.\r
+ */\r
+#define awsiotdemoprofileAWS_CERTIFICATE_PEM                             \\\r
+    "-----BEGIN CERTIFICATE-----\\n"                                      \\\r
+    "MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF\\n" \\\r
+    "ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6\\n" \\\r
+    "b24gUm9vdCBDQSAxMB4XDTE1MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTEL\\n" \\\r
+    "MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv\\n" \\\r
+    "b3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4gHHKeNXj\\n" \\\r
+    "ca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgHFzZM\\n" \\\r
+    "9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qw\\n" \\\r
+    "IFAGbHrQgLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6\\n" \\\r
+    "VOujw5H5SNz/0egwLX0tdHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L\\n" \\\r
+    "93FcXmn/6pUCyziKrlA4b9v7LWIbxcceVOF34GfID5yHI9Y/QCB/IIDEgEw+OyQm\\n" \\\r
+    "jgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC\\n" \\\r
+    "AYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3DQEBCwUA\\n" \\\r
+    "A4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDI\\n" \\\r
+    "U5PMCCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUs\\n" \\\r
+    "N+gDS63pYaACbvXy8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vv\\n" \\\r
+    "o/ufQJVtMVT8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU\\n" \\\r
+    "5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2xJNDd2ZhwLnoQdeXeGADbkpy\\n" \\\r
+    "rqXRfboQnoZsG4q5WTP468SQvvG5\\n"                                     \\\r
+    "-----END CERTIFICATE-----\\n"\r
+\r
+/**\r
+ * @brief The MQTT client identifier.\r
+ *\r
+ * This is the "Thing Name" in AWS IoT.\r
+ *\r
+ * #define awsiotdemoprofileCLIENT_IDENTIFIER    "...insert here..."\r
+ */\r
+#define awsiotdemoprofileCLIENT_IDENTIFIER    <IOTThingName>\r
+\r
+/**\r
+ * @brief PEM-encoded client certificate\r
+ *\r
+ * Must include the PEM header and footer:\r
+ * "-----BEGIN CERTIFICATE-----\\n"\\\r
+ * "...base64 data...\\n"\\\r
+ * "-----END CERTIFICATE-----\\n"\r
+ *\r
+ * #define awsiotdemoprofileCLIENT_CERTIFICATE_PEM    "...insert here..."\r
+ */\r
+#define awsiotdemoprofileCLIENT_CERTIFICATE_PEM                          \\\r
+<ClientCertificatePEM>\r
+\r
+/**\r
+ * @brief PEM-encoded client private key.\r
+ *\r
+ * Must include the PEM header and footer:\r
+ * "-----BEGIN RSA PRIVATE KEY-----\\n"\\\r
+ * "...base64 data...\\n"\\\r
+ * "-----END RSA PRIVATE KEY-----\\n"\r
+ *\r
+ * #define awsiotdemoprofileCLIENT_PRIVATE_KEY_PEM    "...insert here..."\r
+ */\r
+#define awsiotdemoprofileCLIENT_PRIVATE_KEY_PEM                          \\\r
+<ClientPrivateKeyPEM>\r
+\r
+#endif /* AWS_IOT_DEMO_PROFILE_H */\r
+`\r