From 7eccef410178585d751a695363c8867b46476f60 Mon Sep 17 00:00:00 2001 From: Volodymyr Shymanskyy Date: Tue, 1 May 2018 13:23:43 +0300 Subject: [PATCH] Add SSL example --- examples/WebClient/WebClient.ino | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/examples/WebClient/WebClient.ino b/examples/WebClient/WebClient.ino index e764242..5fa5111 100644 --- a/examples/WebClient/WebClient.ino +++ b/examples/WebClient/WebClient.ino @@ -25,6 +25,9 @@ // Uncomment this if you want to see all AT commands //#define DUMP_AT_COMMANDS +// Uncomment this if you want to use SSL +//#define USE_SSL + // Set serial for debug console (to the Serial Monitor, default speed 115200) #define SerialMon Serial @@ -45,7 +48,6 @@ const char pass[] = ""; // Server details const char server[] = "vsh.pp.ua"; const char resource[] = "/TinyGSM/logo.txt"; -const int port = 80; #ifdef DUMP_AT_COMMANDS #include @@ -55,7 +57,13 @@ const int port = 80; TinyGsm modem(SerialAT); #endif -TinyGsmClient client(modem); +#ifdef USE_SSL + TinyGsmClientSecure client(modem); + const int port = 443; +#else + TinyGsmClient client(modem); + const int port = 80; +#endif void setup() { // Set console baud rate