Skip to content

Commit

Permalink
Remove unnecessary root ca cert
Browse files Browse the repository at this point in the history
  • Loading branch information
amalabey committed Dec 5, 2020
1 parent 6086929 commit 2972aae
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions examples/SecureMqtt/SecureMqtt.ino
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,16 @@ char *username = "........"; // fixed credentials can be registered in the Ad
char *c8yPassword = "........"; // create a user in usermanagement with the "device"role and fill the credentials here
char *tenant = "........"; //tenant ID can be found by clicking on your name in the top right corner of Cumulocity
char *clientId = "........."; //Should be a unique identifier for this device, e.g. IMEI, MAC address or SerialNumber
const char *root_ca =
"-----BEGIN CERTIFICATE-----\n"
".....CERT CONTENT............\n"
"-----END CERTIFICATE-----\n";

WiFiClientSecure wifiClient;
CumulocityClient c8yClient(wifiClient, clientId);

void setup()
{
Serial.begin(115200);
Serial.print("Connecting to WiFi");

wifiClient.setCACert(root_ca);
WiFi.begin(ssid, wifiPassword);

Serial.print("Connecting to WiFi");
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Expand Down

0 comments on commit 2972aae

Please sign in to comment.