mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-29 22:48:37 -04:00
Add the Labs projects provided in the V10.2.1_191129 zip file.
This commit is contained in:
parent
46e5937529
commit
e5708b38e9
801 changed files with 356576 additions and 0 deletions
|
@ -0,0 +1,133 @@
|
|||
/*
|
||||
* FreeRTOS Kernel V10.2.1
|
||||
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://www.FreeRTOS.org
|
||||
* http://aws.amazon.com/freertos
|
||||
*
|
||||
* 1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*
|
||||
* IMPORTANT, CONFIGURATION REQUIRED: This is a configuration file containing AWS
|
||||
* IoT profile for the demos, will need additional setup:
|
||||
* https://www.freertos.org/mqtt/preconfiguredexamplesMA.html
|
||||
*
|
||||
* Each profile corresponds to a different service. The demos that use the same
|
||||
* profile share the same service. It is important to understand the
|
||||
* correspondence between the preconfigured profiles and demos, since each
|
||||
* service have different connection configuration and credential validation.
|
||||
*
|
||||
* - mqtt_demo_profile.h is preconfigured to test.mosquitto.org MQTT broker.
|
||||
* The file is used with mqtt_plain_text demo and mqtt_basic_tls_server_auth
|
||||
* demo. Feel free to try out other broker with the demos.
|
||||
*
|
||||
* - https_demo_profile.h is preconfigured to httpbin.org server. The file is
|
||||
* used with http_plain_text demo and https_basic_tls_server_auth demo.
|
||||
*
|
||||
* - aws_iot_demo_profile.h (current) contains information to connect to AWS
|
||||
* IoT. The file is used with mqtt_tls_mutual_auth demo, https_tls_mutual_auth
|
||||
* demo, and other AWS IoT related demo.
|
||||
*/
|
||||
|
||||
#ifndef AWS_IOT_DEMO_PROFILE_H
|
||||
#define AWS_IOT_DEMO_PROFILE_H
|
||||
|
||||
/**
|
||||
* @brief Details of the MQTT broker to connect to.
|
||||
*
|
||||
* This is the Thing's Rest API Endpoint for AWS IoT.
|
||||
*
|
||||
* #define awsiotdemoprofileAWS_ENDPOINT "...insert here..."
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief The port to use for the MQTT demo.
|
||||
*
|
||||
* Use 8883 if connecting to AWS IoT services.
|
||||
*/
|
||||
#define awsiotdemoprofileAWS_MQTT_PORT 8883
|
||||
|
||||
/**
|
||||
* @brief The port to use for the HTTPS demo.
|
||||
*
|
||||
* Use 8443 if connecting to AWS IoT services.
|
||||
*/
|
||||
#define awsiotdemoprofileAWS_HTTPS_PORT 8443
|
||||
|
||||
/**
|
||||
* @brief The AWS IoT server certificate.
|
||||
*
|
||||
* This certificate is used to identify the AWS IoT server and is publicly
|
||||
* available.
|
||||
*/
|
||||
#define awsiotdemoprofileAWS_CERTIFICATE_PEM \
|
||||
"-----BEGIN CERTIFICATE-----\n" \
|
||||
"MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF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8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU\n" \
|
||||
"5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2xJNDd2ZhwLnoQdeXeGADbkpy\n" \
|
||||
"rqXRfboQnoZsG4q5WTP468SQvvG5\n" \
|
||||
"-----END CERTIFICATE-----\n"
|
||||
|
||||
/**
|
||||
* @brief The MQTT client identifier.
|
||||
*
|
||||
* This is the "Thing Name" in AWS IoT.
|
||||
*
|
||||
* #define awsiotdemoprofileCLIENT_IDENTIFIER "...insert here..."
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief PEM-encoded client certificate
|
||||
*
|
||||
* Must include the PEM header and footer:
|
||||
* "-----BEGIN CERTIFICATE-----\n"\
|
||||
* "...base64 data...\n"\
|
||||
* "-----END CERTIFICATE-----\n"
|
||||
*
|
||||
* #define awsiotdemoprofileCLIENT_CERTIFICATE_PEM "...insert here..."
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief PEM-encoded client private key.
|
||||
*
|
||||
* Must include the PEM header and footer:
|
||||
* "-----BEGIN RSA PRIVATE KEY-----\n"\
|
||||
* "...base64 data...\n"\
|
||||
* "-----END RSA PRIVATE KEY-----\n"
|
||||
*
|
||||
* #define awsiotdemoprofileCLIENT_PRIVATE_KEY_PEM "...insert here..."
|
||||
*/
|
||||
|
||||
#endif /* AWS_IOT_DEMO_PROFILE_H */
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* FreeRTOS Kernel V10.2.1
|
||||
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://www.FreeRTOS.org
|
||||
* http://aws.amazon.com/freertos
|
||||
*
|
||||
* 1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file performs the configuration check at preprocessor time to make sure
|
||||
* the credentials are defined. If credentials are not set, users will
|
||||
* immediately be guided to the getting started documentation for proper setup.
|
||||
*
|
||||
* This is meant to be included after the credential define.
|
||||
* e.g., a .c file that establishes a MQTT connection:
|
||||
* #include "aws_iot_demo_profile.h" // This file includes the credential for user to define
|
||||
* #include "aws_iot_setup_check.h" // This file make sure credentials are defined
|
||||
*/
|
||||
|
||||
#ifndef IOT_CONFIGCHECK_H
|
||||
#define IOT_CONFIGCHECK_H
|
||||
|
||||
/*
|
||||
* TLS is enabled by default. This is config to zero for *_plain_text demo.
|
||||
*/
|
||||
#ifndef democonfigENABLE_TLS
|
||||
#define democonfigENABLE_TLS 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Mutual authentication is enabled by default. This is config to zero for
|
||||
* *_plain_text and *_basic_tls_server demo.
|
||||
*/
|
||||
#ifndef democonfigENABLE_MUTUAL_AUTH
|
||||
#define democonfigENABLE_MUTUAL_AUTH 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Credential setup check.
|
||||
*/
|
||||
#if defined( AWS_IOT_DEMO_PROFILE_H )
|
||||
#ifndef awsiotdemoprofileAWS_ENDPOINT
|
||||
#error ACTION REQUIRED: Please ensure you have awsiotdemoprofileAWS_ENDPOINT (in aws_iot_demo_profile.h) configured. Refer to https://www.freertos.org/mqtt/preconfiguredexamplesMA.html for proper setup.
|
||||
#endif
|
||||
#ifndef awsiotdemoprofileCLIENT_IDENTIFIER
|
||||
#error ACTION REQUIRED: Please ensure you have awsiotdemoprofileCLIENT_IDENTIFIER (in aws_iot_demo_profile.h) configured. Refer to https://www.freertos.org/mqtt/preconfiguredexamplesMA.html for proper setup.
|
||||
#endif
|
||||
#if ( democonfigENABLE_TLS )
|
||||
#if ( democonfigENABLE_MUTUAL_AUTH )
|
||||
#ifndef awsiotdemoprofileCLIENT_CERTIFICATE_PEM
|
||||
#error ACTION REQUIRED: Please ensure you have awsiotdemoprofileCLIENT_CERTIFICATE_PEM (in aws_iot_demo_profile.h) configured as required for mutual authentication. https://www.freertos.org/mqtt/preconfiguredexamplesMA.html for proper setup.
|
||||
#endif
|
||||
#ifndef awsiotdemoprofileCLIENT_PRIVATE_KEY_PEM
|
||||
#error ACTION REQUIRED: Please ensure you have awsiotdemoprofileCLIENT_PRIVATE_KEY_PEM (in aws_iot_demo_profile.h) configured as required for mutual authentication. https://www.freertos.org/mqtt/preconfiguredexamplesMA.html for proper setup.
|
||||
#endif
|
||||
#endif
|
||||
#endif /* if ( democonfigENABLE_TLS ) */
|
||||
#endif /* if defined( AWS_IOT_DEMO_PROFILE_H ) */
|
||||
|
||||
#endif /* IOT_CONFIGCHECK_H */
|
|
@ -0,0 +1,103 @@
|
|||
/*
|
||||
* FreeRTOS Kernel V10.2.1
|
||||
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://www.FreeRTOS.org
|
||||
* http://aws.amazon.com/freertos
|
||||
*
|
||||
* 1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*
|
||||
* Each profile corresponds to a different service. The demos that use the same
|
||||
* profile share the same service. It is important to understand the
|
||||
* correspondence between the preconfigured profiles and demos, since each
|
||||
* service have different connection configuration and credential validation.
|
||||
*
|
||||
* - mqtt_demo_profile.h is preconfigured to test.mosquitto.org MQTT broker.
|
||||
* The file is used with mqtt_plain_text demo and mqtt_basic_tls_server_auth
|
||||
* demo. Feel free to try out other broker with the demos.
|
||||
*
|
||||
* - https_demo_profile.h (current) is preconfigured to httpbin.org server.
|
||||
* The file is used with http_plain_text demo and https_basic_tls_server_auth
|
||||
* demo.
|
||||
*
|
||||
* - aws_iot_demo_profile.h contains information to connect to AWS
|
||||
* IoT. The file is used with mqtt_tls_mutual_auth demo, https_tls_mutual_auth
|
||||
* demo, and other AWS IoT related demo.
|
||||
*/
|
||||
|
||||
#ifndef HTTPS_DEMO_PROFILE_H
|
||||
#define HTTPS_DEMO_PROFILE_H
|
||||
|
||||
#include "demo_config.h"
|
||||
|
||||
/**
|
||||
* @brief Details of the HTTPS server to connect to.
|
||||
*
|
||||
* Please note that many web servers will close the connection immediately after
|
||||
* sending the response in order to save resources. This demo is compatible only
|
||||
* with a server that persists the connection after sending a response.
|
||||
*
|
||||
* Port 443 is the standard port designated for encrypted HTTPS traffic.
|
||||
*/
|
||||
#define httpsdemoprofileSERVER_ADDRESS "httpbin.org"
|
||||
|
||||
|
||||
#if ( democonfigENABLE_TLS )
|
||||
#define httpsdemoprofileSERVER_PORT 443
|
||||
#else
|
||||
#define httpsdemoprofileSERVER_PORT 80
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief The server certificate for httpbin.org:443.
|
||||
*
|
||||
* This certificate is obtained from https://httpbin.org/ and is used to
|
||||
* authenticate the HTTPS server. This demo only authenticates the server and
|
||||
* does not authenticate the client.
|
||||
*
|
||||
* If you want to connect to any other HTTPS server other than httpbin.org,
|
||||
* replace it with the certificate of the HTTPS server.
|
||||
*/
|
||||
#define httpsdemoprofileSERVER_CERTIFICATE_PEM \
|
||||
"-----BEGIN CERTIFICATE-----\n" \
|
||||
"MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF\n" \
|
||||
"ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6\n" \
|
||||
"b24gUm9vdCBDQSAxMB4XDTE1MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTEL\n" \
|
||||
"MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv\n" \
|
||||
"b3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4gHHKeNXj\n" \
|
||||
"ca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgHFzZM\n" \
|
||||
"9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qw\n" \
|
||||
"IFAGbHrQgLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6\n" \
|
||||
"VOujw5H5SNz/0egwLX0tdHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L\n" \
|
||||
"93FcXmn/6pUCyziKrlA4b9v7LWIbxcceVOF34GfID5yHI9Y/QCB/IIDEgEw+OyQm\n" \
|
||||
"jgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC\n" \
|
||||
"AYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3DQEBCwUA\n" \
|
||||
"A4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDI\n" \
|
||||
"U5PMCCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUs\n" \
|
||||
"N+gDS63pYaACbvXy8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vv\n" \
|
||||
"o/ufQJVtMVT8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU\n" \
|
||||
"5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2xJNDd2ZhwLnoQdeXeGADbkpy\n" \
|
||||
"rqXRfboQnoZsG4q5WTP468SQvvG5\n" \
|
||||
"-----END CERTIFICATE-----\n"
|
||||
|
||||
|
||||
#endif /* ifndef HTTPS_DEMO_PROFILE_H */
|
|
@ -0,0 +1,114 @@
|
|||
/*
|
||||
* FreeRTOS Kernel V10.2.1
|
||||
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://www.FreeRTOS.org
|
||||
* http://aws.amazon.com/freertos
|
||||
*
|
||||
* 1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*
|
||||
* Each profile corresponds to a different service. The demos that use the same
|
||||
* profile share the same service. It is important to understand the
|
||||
* correspondence between the preconfigured profiles and demos, since each
|
||||
* service have different connection configuration and credential validation.
|
||||
*
|
||||
* - mqtt_demo_profile.h (current) is preconfigured to test.mosquitto.org MQTT
|
||||
* broker. The file is used with mqtt_plain_text demo and
|
||||
* mqtt_basic_tls_server_auth demo. Feel free to try out other broker with the
|
||||
* demos.
|
||||
*
|
||||
* - https_demo_profile.h is preconfigured to httpbin.org server. The file is
|
||||
* used with http_plain_text demo and https_basic_tls_server_auth demo.
|
||||
*
|
||||
* - aws_iot_demo_profile.h contains information to connect to AWS
|
||||
* IoT. The file is used with mqtt_tls_mutual_auth demo, https_tls_mutual_auth
|
||||
* demo, and other AWS IoT related demo.
|
||||
*/
|
||||
|
||||
#ifndef MQTT_DEMO_PROFILE_H
|
||||
#define MQTT_DEMO_PROFILE_H
|
||||
|
||||
#include "demo_config.h"
|
||||
|
||||
/**
|
||||
* @brief Details of the MQTT broker to connect to.
|
||||
*
|
||||
* The Mosquitto test server provides a freely available MQTT server that can
|
||||
* be used to test MQTT clients.
|
||||
*/
|
||||
#define mqttdemoprofileBROKER_ENDPOINT "test.mosquitto.org"
|
||||
|
||||
/**
|
||||
* @brief The port to use for the demo.
|
||||
*
|
||||
* If trying to connect to Mosquitto test broker (the default broker), use
|
||||
* port 1883 for unencrypted MQTT traffic and port 8883 for encrypted MQTT
|
||||
* traffic. These are also standard MQTT ports, but consult broker
|
||||
* setting for the actual port.
|
||||
*/
|
||||
#if ( democonfigENABLE_TLS == 1 )
|
||||
#define mqttdemoprofileBROKER_PORT 8883
|
||||
#else
|
||||
#define mqttdemoprofileBROKER_PORT 1883
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief The topic to subscribe and publish to in the example.
|
||||
*
|
||||
* The topic starts with the client identifier to ensure that each demo interacts
|
||||
* with a unique topic.
|
||||
*/
|
||||
#define mqttdemoprofileCLIENT_IDENTIFIER "mqttexampleclient"
|
||||
|
||||
/**
|
||||
* @brief The server certificate for test.mosquitto.org:8883.
|
||||
*
|
||||
* This certificate is obtained from https://test.mosquitto.org/ and is used
|
||||
* to authenticate the Mosquitto MQTT broker. This demo only authenticates
|
||||
* the server and does not authenticate the client. This is a RSA SHA-1
|
||||
* certificate which is not considered secure for production use cases as
|
||||
* per the industry standards.
|
||||
*
|
||||
* If you want to connect to any other MQTT broker other than
|
||||
* test.mosquitto.org, replace it with the certificate of the MQTT broker.
|
||||
*/
|
||||
#define mqttdemoprofileBROKER_CERTIFICATE_PEM \
|
||||
"-----BEGIN CERTIFICATE-----\n" \
|
||||
"MIIC8DCCAlmgAwIBAgIJA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1FNRy0MDr6xr+D2ZOwxs63dG1nnAnWZg7qwoLgpZ4fESPD3PkA\n" \
|
||||
"1ZgKJc2zbSQ9fCPxt2W3mdVav66c6fsb7els2W2Iz7gERJSX\n" \
|
||||
"-----END CERTIFICATE-----\n"
|
||||
|
||||
#endif /* ifndef MQTT_DEMO_PROFILE_H */
|
Loading…
Add table
Add a link
Reference in a new issue