Hi,
the certs.c file in the example code provided for the AWS IOT plugin looks like the following :
/* * ======== certs.c ======== */ /* * USER STEP: Copy the lines in the root CA certificate file * * Paste the lines in string format for the following array: */ unsigned char root_ca_pem[] = ""; unsigned int root_ca_pem_len = sizeof(root_ca_pem); /* * USER STEP: Copy the lines in the cert.pem certificate file * * Paste the lines in string format for the following array: */ unsigned char client_cert_pem[] = ""; unsigned int client_cert_pem_len = sizeof(client_cert_pem); /* * USER STEP: Copy the lines in the privateKey.pem certificate file * * Paste the lines in string format for the following array: */ unsigned char client_private_key_pem[] = ""; unsigned int client_private_key_pem_len = sizeof(client_private_key_pem);
I have tried pasting the certs into the code from AWS IoT core and I am unable to connect. Error is : "getaddrinfo returned -3126"
I was wondering, how do I past these certificates, I am currently pasting them like the following :
unsigned char root_ca_pem[] = "-----BEGIN CERTIFICATE-----" "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" "-----END CERTIFICATE-----"; unsigned char client_cert_pem[] = "-----BEGIN CERTIFICATE-----" "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" "-----END CERTIFICATE-----"; unsigned char client_private_key_pem[] = "-----BEGIN RSA PRIVATE KEY-----" "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" "-----END RSA PRIVATE KEY-----";
Any help with this would be appreciated. This is the SDK I am using : www.ti.com/.../SIMPLELINK-SDK-PLUGIN-FOR-AWSIOT