This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3220MODA: SLNETSOCK_SEC_ATTRIB_DOMAIN_NAME unexpected behavior

Part Number: CC3220MODA
Other Parts Discussed in Thread: SYSCONFIG

Hello all,

my project tools/ versions are:

- TI RTOS - based
- CCS 10.2.0; Compiler TI V20.2.5.LTS
- SDK cc32xx_sdk_4_40_00_07
- SysConfig 1.8.0
- XDCtools 3.62.0.08

I would like to connect to different servers using the http client function (httpclient.c, ...).
I have to be able to differentiate between different server/ certificate combinations.
TLS has to be used in every case.

I wanz to use HTTPClient_connect2 with configured security attributes for my different use cases:

- Internet server with a certificate matching the domain using a TI known CA
  SLNETSOCK_SEC_ATTRIB_DOMAIN_NAME

- Internet server with a self-signed certificate, matching the domain (of course non TI known CA)
  SLNETSOCK_SEC_ATTRIB_DOMAIN_NAME + SLNETSOCK_SEC_ATTRIB_DISABLE_CERT_STORE

- Server with self-signed certificate, does not match the domain (of course non TI known CA)
  nothing  (? - SLNETSOCK_SEC_ATTRIB_DISABLE_CERT_STORE)

I am right until now?

For the first step I used the SDK function HTTPClient_connect that parses and splits the given hostname, sets the security attribute for the domain to SLNETSOCK_SEC_ATTRIB_DOMAIN_NAME and then calls HTTPClient_connect2.
That calls SlNetSock_connect and starts the security using SlNetSock_startSec.

If I connect to the hostname https://google.com:443, the security attribut SLNETSOCK_SEC_ATTRIB_DOMAIN_NAME is set, the connection is established but SlNetSock_startSec returns with:
#define SLNETERR_ESEC_SNO_VERIFY   (-453L)  /**< Connected without server verification */

Why - I expected 0 because the certificate matched the URL?
Any help is welcome.

Best regards,
Roman