SWRU368C May 2018 – January 2021 CC3100 , CC3100MOD , CC3200 , CC3200MOD
Set the domain name to verify the desired domain during the SSL handshake. The domain verification is used to help against "man in the middle" attacks, where a third party could buy a fake certificate from the same root CA that signed the certificate of the server, and redirect the traffic to their server. In addition to the full chain verification, TI recommends checking the domain name. This option is only available for client mode. This option should be called before sl_Connect or sl_Listen. Setting a domain name also enables the SNI extension of the client hello message, according to RFC 6066.
Example:
_i16 status;
status = sl_SetSockOpt(SockID, SL_SOL_SOCKET, SO_SECURE_DOMAIN_NAME_VERIFICATION, "www.google.com", strlen("www.google.com"));