SharkSSL™ Embedded SSL/TLS Stack
|
The WssProtocolHandshake structure keeps state information for the web server function MS_ebServer.
An instance of this structure must be initialized as follows:
#include <MSLib.h>
Data Fields | |
const U8 * | b64Credent |
In param: Enable HTTP basic authentication by setting 'b64Credent' to a B64 encoded string of 'username:password'. More... | |
const U8 * | realm |
In param: Set the HTTP basic authentication's 'realm' name. | |
MSFetchPage | fetchPage |
In param: set the page fetch callback function if you plan on storing the web application in the device. More... | |
void * | fetchPageHndl |
In param: The MSFetchPage handle, if any. | |
U8 * | request |
Out param: Set to the initial HTTP header request line. More... | |
U8 * | origin |
Out param: Set to the HTTP WebSocket header 'origin', if sent by the client. | |
U8 * | hKeys [MAX_HTTP_H_SIZE] |
HTTP header keys sent by the client. More... | |
U8 * | hVals [MAX_HTTP_H_SIZE] |
All HTTP header values sent by the client. More... | |
const U8* WssProtocolHandshake::b64Credent |
In param: Enable HTTP basic authentication by setting 'b64Credent' to a B64 encoded string of 'username:password'.
All browsers support HTTP authentication using standard requests, but few browsers support HTTP authentication on WebSocket connection upgrades. You may therefore consider creating your own authentication on top of a newly established WebSocket connection. You can create your server side logic such that no commands are accepted until the client authenticates. Another option is to require that clients authenticate by using SSL certificates.
MSFetchPage WssProtocolHandshake::fetchPage |
In param: set the page fetch callback function if you plan on storing the web application in the device.
Example code:
U8* WssProtocolHandshake::hKeys[MAX_HTTP_H_SIZE] |
HTTP header keys sent by the client.
NULL signals end of array.
U8* WssProtocolHandshake::hVals[MAX_HTTP_H_SIZE] |
All HTTP header values sent by the client.
NULL signals end of array.
U8* WssProtocolHandshake::request |
Out param: Set to the initial HTTP header request line.
Example: