Other Parts Discussed in Thread: SYSCONFIG
Hello Again,
I'm seeking guidance for my AWS Provisioning project. I have several tickets that are resolved, but the largest and most comprehensive is here. I was initially having this exact same issue from the HTTP Client side. I found a workaround that you can read about in the last posts on the linked thread.
This time around, I cannot seem to work any magic. I am getting -464 and -688 SL Socket errors which usually just translate to a generic Connection Error.
The Private Key Attribute is suspect to me, especially given my experience with problem inside the linked thread.
When attempting to connect to AWS MQTT using
rc = aws_iot_mqtt_connect(&client, &connectParams); ,
I am experiencing these errors at the TLS handshake.
I did a deep dive, and have observed that when tlsDataParams->secAttrib = SlNetSock_secAttribCreate(); is called (line 190 network_sl.c), the object created looks odd. The private key object is very large, length 65,305. I saw that when I was having HTTP issues, and it was because the Private key attribute wasn't created properly.
When I go a few lines down further, the attribute is "set" using
/* Set this device's private key */
status |= SlNetSock_secAttribSet(tlsDataParams->secAttrib,
SLNETSOCK_SEC_ATTRIB_PRIVATE_KEY,
tlsParams->pDevicePrivateKeyLocation,
strlen(tlsParams->pDevicePrivateKeyLocation) + 1);
The object looks okay, when the object is set. The path to the private key is correct and the length is correct. This private key is confirmed good, because the HTTP connections succeed.
I finally get my failure with a status code of -464 from
/* Start the TLS handshake */
status = SlNetSock_startSec(clientSd, NULL,
SLNETSOCK_SEC_START_SECURITY_SESSION_ONLY);
Would someone mind lending a hand? I have had nothing but problems with this project since day 0, but I'm very close to fixing all the issues. At some point, I will document the errors, and contribute towards fixing them for others.
Things I've Tried:
Confirming AWS Permissions are open and relaxed
Changing between several Root CA Certs
Confirming correct Endpoint + confirmed endpoint on aws.cfg file.
Using latest SDK 5.30 and Service Pack 4.12
Thank you.