0 Replies Latest reply on Mar 14, 2016 6:10 AM by bdide_1722426

    HTTPS with SNI extension

    bdide_1722426

      Hi,

       

      I developp an application with the WICED SDK for a hub wifi. The hub connect to a REST server in Microsoft Azure. However the server reject the connection (TCP reset) when I send the client Hello. Obviously, the major difference with other system accepting the connection is the SNI extension. In fact, the HTTPS client example, doesn't add the SNI extension in the client Hello message. So I try to add the SNI extension, I adding in the code, before the wiced_tcp_connect :

      memcpy(context.context.extensions[context.context.extension_count].data,SNI_data,26);

      context.context.extensions[context.context.extension_count].used = 1;

      context.context.extensions[context.context.extension_count].sz = 26;

      context.context.extensions[context.context.extension_count].id = 0;

      context.context.extension_count++;

      But I don't unterstand the fields because when I watch the ID in frame extension by wireshark (the id egals the field sz+9). After serveral test, I remarks that this field sz influence on the id and the size of the data ?. So I cant add the SNI by this way.

       

      How add the SNI extension ?

       

      Thank you for your help .

       

      Best regards

      Baptiste