Hello all,
running the TI sample tcpechotls fails with the error output "tcpHandler: failed to load objects".
My versions are:
- CCS 9.3
- SimpleLink SDK 3_30_01_02
- Windows 10 host
The function tcpHandler, file tcpEchoTLS.c, contains the following code lines:
status = SlNetIf_loadSecObj(SLNETIF_SEC_OBJ_TYPE_CERTIFICATE,
ROOT_CA_CERT_FILE, strlen(ROOT_CA_CERT_FILE), srvCAPem,
srvCAPemLen, SLNETIF_ID_1);
status |= SlNetIf_loadSecObj(SLNETIF_SEC_OBJ_TYPE_CERTIFICATE,
TRUSTED_CERT_FILE, strlen(TRUSTED_CERT_FILE), srvCertPem,
srvCertPemLen, SLNETIF_ID_1);
status |= SlNetIf_loadSecObj(SLNETIF_SEC_OBJ_TYPE_RSA_PRIVATE_KEY,
PRIVATE_KEY_FILE, strlen(PRIVATE_KEY_FILE)-1, srvKeyPem,
srvKeyPemLen, SLNETIF_ID_1);
The parameter strlen(PRIVATE_KEY_FILE)-1 leads to this error output. Removing the -1 makes the project runnable.
Because all the SDK samples use the line containing -1 I am not sure about my solution.
Is it a problem on my side or a mistake in the SDK?
Best regards,
Roman