net: lwm2m: Way to pass a destination hostname to socket

net: lwm2m: When mbedtls CONFIG_MBEDTLS_SERVER_NAME_INDICATION is
enabled, a destination hostname must be passed to socket to properly
connect do lwm2m server.

Passing lwm2m context to lwm2m_parse_peerinfo

Signed-off-by: Jair Jack <jack@icatorze.com.br>
This commit is contained in:
Jair Jack 2021-11-04 16:07:54 -03:00 committed by Anas Nashif
commit 5b5417a1dd
4 changed files with 51 additions and 21 deletions

View file

@ -94,6 +94,12 @@ struct lwm2m_ctx {
*/
int tls_tag;
/** When MBEDTLS SNI is enabled socket must be set with destination
* hostname server.
*/
char *desthostname;
uint16_t desthostnamelen;
/** Client can set load_credentials function as a way of overriding
* the default behavior of load_tls_credential() in lwm2m_engine.c
*/