The tcSslDefaultHelper class is derived from the tcDspNetSslHelper pure virtual base class, and is used to provide a Secure Socket Layer interface for tcDspNetClientHttp using the XySSL library.
Most applications should be able to use this default helper as-is, but others will need to derive their own customized version if different SSL options are required (e.g., check certificate validity with a CA chain, change encryption schemes offered, cheange timeouts, etc.).
This is a simple example of how to use tcSslDefaultHelper with tcDspNetClientHttp:
#include <net/clients/DSPNetClientHttp.h> #include <XySSL_port/SslDefaultHelper.h> // GET a secure web page... { tcDspNetClientHttp::teHttpReturn rv; const char *url = "https://www.fortify.net/sslcheck.html"; static char buffer[8192], mime[tcDspNetClientHttp::gnMimeLength]; tcDspNetClientHttp *mpHttp = new tcDspNetClientHttp; tcSslDefaultHelper *mpSslHelper = new tcSslDefaultHelper; // assign helper to HTTP client, to allow HTTPS connections mpHttp->ssl_helper(mpSslHelper); int len = sizeof(buffer); rv = mpHttp->get(url, (void *)buffer, len, mime); printf("HTTP returned: %1d\r\n", (int)rv); printf("MIME-type: %s\r\n", (strlen(mime) > 0) ? mime : "unknown"); : }