]> git.sur5r.net Git - freertos/blob - FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/mqtt_demo_profile.h
Add the Labs projects provided in the V10.2.1_191129 zip file.
[freertos] / FreeRTOS-Labs / Demo / FreeRTOS_IoT_Libraries / include / mqtt_demo_profile.h
1 /*\r
2  * FreeRTOS Kernel V10.2.1\r
3  * Copyright (C) 2019 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
4  *\r
5  * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
6  * this software and associated documentation files (the "Software"), to deal in\r
7  * the Software without restriction, including without limitation the rights to\r
8  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\r
9  * the Software, and to permit persons to whom the Software is furnished to do so,\r
10  * subject to the following conditions:\r
11  *\r
12  * The above copyright notice and this permission notice shall be included in all\r
13  * copies or substantial portions of the Software.\r
14  *\r
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
17  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
19  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
20  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
21  *\r
22  * http://www.FreeRTOS.org\r
23  * http://aws.amazon.com/freertos\r
24  *\r
25  * 1 tab == 4 spaces!\r
26  */\r
27 \r
28 /*\r
29  * Each profile corresponds to a different service. The demos that use the same\r
30  * profile share the same service. It is important to understand the\r
31  * correspondence between the preconfigured profiles and demos, since each\r
32  * service have different connection configuration and credential validation.\r
33  *\r
34  *  - mqtt_demo_profile.h (current) is preconfigured to test.mosquitto.org MQTT\r
35  * broker. The file is used with mqtt_plain_text demo and\r
36  * mqtt_basic_tls_server_auth demo. Feel free to try out other broker with the\r
37  * demos.\r
38  *\r
39  *  - https_demo_profile.h is preconfigured to httpbin.org server. The file is\r
40  * used with http_plain_text demo and https_basic_tls_server_auth demo.\r
41  *\r
42  *  - aws_iot_demo_profile.h contains information to connect to AWS\r
43  * IoT. The file is used with mqtt_tls_mutual_auth demo, https_tls_mutual_auth\r
44  * demo, and other AWS IoT related demo.\r
45  */\r
46 \r
47 #ifndef MQTT_DEMO_PROFILE_H\r
48 #define MQTT_DEMO_PROFILE_H\r
49 \r
50 #include "demo_config.h"\r
51 \r
52 /**\r
53  * @brief Details of the MQTT broker to connect to.\r
54  *\r
55  * The Mosquitto test server provides a freely available MQTT server that can\r
56  * be used to test MQTT clients.\r
57  */\r
58 #define mqttdemoprofileBROKER_ENDPOINT    "test.mosquitto.org"\r
59 \r
60 /**\r
61  * @brief The port to use for the demo.\r
62  *\r
63  * If trying to connect to Mosquitto test broker (the default broker), use\r
64  * port 1883 for unencrypted MQTT traffic and port 8883 for encrypted MQTT\r
65  * traffic. These are also standard MQTT ports, but consult broker\r
66  * setting for the actual port.\r
67  */\r
68 #if ( democonfigENABLE_TLS == 1 )\r
69     #define mqttdemoprofileBROKER_PORT    8883\r
70 #else\r
71     #define mqttdemoprofileBROKER_PORT    1883\r
72 #endif\r
73 \r
74 /**\r
75  * @brief The topic to subscribe and publish to in the example.\r
76  *\r
77  * The topic starts with the client identifier to ensure that each demo interacts\r
78  * with a unique topic.\r
79  */\r
80 #define mqttdemoprofileCLIENT_IDENTIFIER    "mqttexampleclient"\r
81 \r
82 /**\r
83  * @brief The server certificate for test.mosquitto.org:8883.\r
84  *\r
85  * This certificate is obtained from https://test.mosquitto.org/ and is used\r
86  * to authenticate the Mosquitto MQTT broker. This demo only authenticates\r
87  * the server and does not authenticate the client. This is a RSA SHA-1\r
88  * certificate which is not considered secure for production use cases as\r
89  * per the industry standards.\r
90  *\r
91  * If you want to connect to any other MQTT broker other than\r
92  * test.mosquitto.org, replace it with the certificate of the MQTT broker.\r
93  */\r
94 #define mqttdemoprofileBROKER_CERTIFICATE_PEM                            \\r
95     "-----BEGIN CERTIFICATE-----\n"                                      \\r
96     "MIIC8DCCAlmgAwIBAgIJAOD63PlXjJi8MA0GCSqGSIb3DQEBBQUAMIGQMQswCQYD\n" \\r
97     "VQQGEwJHQjEXMBUGA1UECAwOVW5pdGVkIEtpbmdkb20xDjAMBgNVBAcMBURlcmJ5\n" \\r
98     "MRIwEAYDVQQKDAlNb3NxdWl0dG8xCzAJBgNVBAsMAkNBMRYwFAYDVQQDDA1tb3Nx\n" \\r
99     "dWl0dG8ub3JnMR8wHQYJKoZIhvcNAQkBFhByb2dlckBhdGNob28ub3JnMB4XDTEy\n" \\r
100     "MDYyOTIyMTE1OVoXDTIyMDYyNzIyMTE1OVowgZAxCzAJBgNVBAYTAkdCMRcwFQYD\n" \\r
101     "VQQIDA5Vbml0ZWQgS2luZ2RvbTEOMAwGA1UEBwwFRGVyYnkxEjAQBgNVBAoMCU1v\n" \\r
102     "c3F1aXR0bzELMAkGA1UECwwCQ0ExFjAUBgNVBAMMDW1vc3F1aXR0by5vcmcxHzAd\n" \\r
103     "BgkqhkiG9w0BCQEWEHJvZ2VyQGF0Y2hvby5vcmcwgZ8wDQYJKoZIhvcNAQEBBQAD\n" \\r
104     "gY0AMIGJAoGBAMYkLmX7SqOT/jJCZoQ1NWdCrr/pq47m3xxyXcI+FLEmwbE3R9vM\n" \\r
105     "rE6sRbP2S89pfrCt7iuITXPKycpUcIU0mtcT1OqxGBV2lb6RaOT2gC5pxyGaFJ+h\n" \\r
106     "A+GIbdYKO3JprPxSBoRponZJvDGEZuM3N7p3S/lRoi7G5wG5mvUmaE5RAgMBAAGj\n" \\r
107     "UDBOMB0GA1UdDgQWBBTad2QneVztIPQzRRGj6ZHKqJTv5jAfBgNVHSMEGDAWgBTa\n" \\r
108     "d2QneVztIPQzRRGj6ZHKqJTv5jAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUA\n" \\r
109     "A4GBAAqw1rK4NlRUCUBLhEFUQasjP7xfFqlVbE2cRy0Rs4o3KS0JwzQVBwG85xge\n" \\r
110     "REyPOFdGdhBY2P1FNRy0MDr6xr+D2ZOwxs63dG1nnAnWZg7qwoLgpZ4fESPD3PkA\n" \\r
111     "1ZgKJc2zbSQ9fCPxt2W3mdVav66c6fsb7els2W2Iz7gERJSX\n"                 \\r
112     "-----END CERTIFICATE-----\n"\r
113 \r
114 #endif /* ifndef MQTT_DEMO_PROFILE_H */\r