mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
Deprecate axTLS, update examples (#5366)
* update examples * fix serial<->tcp example, use STASSID instead of SSID (name collision) * fix HTTPSRequest.ino * update AxTLS HTTPS examples, update AxTLS API to deprecated * fixes * fixes + fix astyle (no preproc directives) + restyling script * fix HTTPClient library * fixes * common.sh: do not reload arduino when already present (for locally CI testing) * common.sh: do not reload ArduinoJson when already present (for locally CI testing) * fix * fix * fix deprecated example * fix WiFiHTTPSServer.ino * reduce footprint * wipfix * fix led builtin * fix example * finished updating APSSID on all examples * style * restyle examples * helper to run CI test locally * local CI runner more verbose * +const * deprecation deprecation * deprecation * Update NTPClient.ino const char[] => const char * * Update interactive.ino const char[] => const char *
This commit is contained in:
committed by
Earle F. Philhower, III
parent
8f28c88f9c
commit
92373a9837
@ -33,8 +33,13 @@
|
||||
#include <ESP8266WebServer.h>
|
||||
#include <ESP8266mDNS.h>
|
||||
|
||||
const char *ssid = "YourSSIDHere";
|
||||
const char *password = "YourPSKHere";
|
||||
#ifndef STASSID
|
||||
#define STASSID "your-ssid"
|
||||
#define STAPSK "your-password"
|
||||
#endif
|
||||
|
||||
const char *ssid = STASSID;
|
||||
const char *password = STAPSK;
|
||||
|
||||
ESP8266WebServer server(80);
|
||||
|
||||
|
@ -30,8 +30,13 @@
|
||||
|
||||
#define DBG_OUTPUT_PORT Serial
|
||||
|
||||
const char* ssid = "wifi-ssid";
|
||||
const char* password = "wifi-password";
|
||||
#ifndef STASSID
|
||||
#define STASSID "your-ssid"
|
||||
#define STAPSK "your-password"
|
||||
#endif
|
||||
|
||||
const char* ssid = STASSID;
|
||||
const char* password = STAPSK;
|
||||
const char* host = "esp8266fs";
|
||||
|
||||
ESP8266WebServer server(80);
|
||||
|
@ -3,8 +3,13 @@
|
||||
#include <ESP8266WebServer.h>
|
||||
#include <ESP8266mDNS.h>
|
||||
|
||||
const char* ssid = "........";
|
||||
const char* password = "........";
|
||||
#ifndef STASSID
|
||||
#define STASSID "your-ssid"
|
||||
#define STAPSK "your-password"
|
||||
#endif
|
||||
|
||||
const char* ssid = STASSID;
|
||||
const char* password = STAPSK;
|
||||
|
||||
ESP8266WebServer server(80);
|
||||
|
||||
|
@ -14,8 +14,13 @@
|
||||
#include <ESP8266WebServerSecure.h>
|
||||
#include <ESP8266mDNS.h>
|
||||
|
||||
const char* ssid = "....";
|
||||
const char* password = "....";
|
||||
#ifndef STASSID
|
||||
#define STASSID "your-ssid"
|
||||
#define STAPSK "your-password"
|
||||
#endif
|
||||
|
||||
const char* ssid = STASSID;
|
||||
const char* password = STAPSK;
|
||||
|
||||
BearSSL::ESP8266WebServerSecure server(443);
|
||||
|
||||
|
@ -46,8 +46,13 @@
|
||||
#include <ESP8266WebServerSecure.h>
|
||||
#include <ESP8266mDNS.h>
|
||||
|
||||
const char* ssid = "........";
|
||||
const char* password = "........";
|
||||
#ifndef STASSID
|
||||
#define STASSID "your-ssid"
|
||||
#define STAPSK "your-password"
|
||||
#endif
|
||||
|
||||
const char* ssid = STASSID;
|
||||
const char* password = STAPSK;
|
||||
|
||||
ESP8266WebServerSecure server(443);
|
||||
|
||||
|
@ -9,8 +9,13 @@
|
||||
#include <ArduinoOTA.h>
|
||||
#include <ESP8266WebServer.h>
|
||||
|
||||
const char* ssid = "........";
|
||||
const char* password = "........";
|
||||
#ifndef STASSID
|
||||
#define STASSID "your-ssid"
|
||||
#define STAPSK "your-password"
|
||||
#endif
|
||||
|
||||
const char* ssid = STASSID;
|
||||
const char* password = STAPSK;
|
||||
|
||||
ESP8266WebServer server(80);
|
||||
|
||||
|
@ -3,8 +3,13 @@
|
||||
#include <ArduinoOTA.h>
|
||||
#include <ESP8266WebServer.h>
|
||||
|
||||
const char* ssid = "........";
|
||||
const char* password = "........";
|
||||
#ifndef STASSID
|
||||
#define STASSID "your-ssid"
|
||||
#define STAPSK "your-password"
|
||||
#endif
|
||||
|
||||
const char* ssid = STASSID;
|
||||
const char* password = STAPSK;
|
||||
|
||||
ESP8266WebServer server(80);
|
||||
|
||||
|
@ -36,8 +36,13 @@
|
||||
|
||||
#define DBG_OUTPUT_PORT Serial
|
||||
|
||||
const char* ssid = "**********";
|
||||
const char* password = "**********";
|
||||
#ifndef STASSID
|
||||
#define STASSID "your-ssid"
|
||||
#define STAPSK "your-password"
|
||||
#endif
|
||||
|
||||
const char* ssid = STASSID;
|
||||
const char* password = STAPSK;
|
||||
const char* host = "esp8266sd";
|
||||
|
||||
ESP8266WebServer server(80);
|
||||
|
@ -2,8 +2,13 @@
|
||||
#include <WiFiClient.h>
|
||||
#include <ESP8266WebServer.h>
|
||||
|
||||
const char* ssid = "........";
|
||||
const char* password = "........";
|
||||
#ifndef STASSID
|
||||
#define STASSID "your-ssid"
|
||||
#define STAPSK "your-password"
|
||||
#endif
|
||||
|
||||
const char* ssid = STASSID;
|
||||
const char* password = STAPSK;
|
||||
|
||||
ESP8266WebServer server(80);
|
||||
|
||||
|
@ -7,9 +7,14 @@
|
||||
#include <ESP8266WebServer.h>
|
||||
#include <ESP8266mDNS.h>
|
||||
|
||||
#ifndef STASSID
|
||||
#define STASSID "your-ssid"
|
||||
#define STAPSK "your-password"
|
||||
#endif
|
||||
|
||||
const char* host = "esp8266-webupdate";
|
||||
const char* ssid = "........";
|
||||
const char* password = "........";
|
||||
const char* ssid = STASSID;
|
||||
const char* password = STAPSK;
|
||||
|
||||
ESP8266WebServer server(80);
|
||||
const char* serverIndex = "<form method='POST' action='/update' enctype='multipart/form-data'><input type='file' name='update'><input type='submit' value='Update'></form>";
|
||||
|
@ -19,5 +19,7 @@
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "ESP8266WebServerSecureAxTLS.h"
|
||||
#include <WiFiClientSecure.h>
|
||||
|
||||
//#include "ESP8266WebServerSecureAxTLS.h"
|
||||
#include "ESP8266WebServerSecureBearSSL.h"
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <libb64/cencode.h>
|
||||
#include "WiFiServer.h"
|
||||
#include "WiFiClient.h"
|
||||
#include "ESP8266WebServerSecure.h"
|
||||
#include "ESP8266WebServerSecureAxTLS.h"
|
||||
|
||||
//#define DEBUG_ESP_HTTP_SERVER
|
||||
#ifdef DEBUG_ESP_PORT
|
||||
@ -36,6 +36,9 @@
|
||||
|
||||
namespace axTLS {
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
ESP8266WebServerSecure::ESP8266WebServerSecure(IPAddress addr, int port)
|
||||
: _serverSecure(addr, port)
|
||||
{
|
||||
@ -46,6 +49,8 @@ ESP8266WebServerSecure::ESP8266WebServerSecure(int port)
|
||||
{
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
void ESP8266WebServerSecure::setServerKeyAndCert_P(const uint8_t *key, int keyLen, const uint8_t *cert, int certLen)
|
||||
{
|
||||
_serverSecure.setServerKeyAndCert_P(key, keyLen, cert, certLen);
|
||||
@ -131,7 +136,10 @@ void ESP8266WebServerSecure::handleClient() {
|
||||
}
|
||||
|
||||
if (!keepCurrentClient) {
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
_currentClientSecure = WiFiClientSecure();
|
||||
#pragma GCC diagnostic pop
|
||||
_currentStatus = HC_NONE;
|
||||
_currentUpload.reset();
|
||||
}
|
||||
|
@ -24,7 +24,8 @@
|
||||
#define ESP8266WEBSERVERSECURE_H
|
||||
|
||||
#include <ESP8266WebServer.h>
|
||||
#include <WiFiServerSecure.h>
|
||||
#include <WiFiServerSecureAxTLS.h>
|
||||
#include <WiFiClientSecureAxTLS.h>
|
||||
|
||||
namespace axTLS {
|
||||
|
||||
|
Reference in New Issue
Block a user