Skip to content

Commit

Permalink
Increase BearSSL buffer for ESP8266 for token generation process whic…
Browse files Browse the repository at this point in the history
…h prevent crash in some ESP8266 device.
  • Loading branch information
mobizt committed Jul 4, 2021
1 parent 84a3f43 commit 1a71ef6
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Firebase Arduino Client Library for ESP8266 and ESP32


Google's Firebase Arduino Client Library for ESP8266 and ESP32 v2.3.6
Google's Firebase Arduino Client Library for ESP8266 and ESP32 v2.3.7


This library supports ESP8266 and ESP32 MCU from Espressif. The following are platforms in which the libraries are also available (RTDB only).
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Firebase Arduino Client Library for ESP8266 and ESP32",
"version": "2.3.6",
"version": "2.3.7",
"keywords": "communication, REST, esp32, esp8266, arduino",
"description": "This client library provides the functions to work with Firebase Realtime database, Cloud Firestore, Firebase Storage, Google Cloud Storage, Cloud Functions for Firebase and Cloud Messaging.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name=Firebase Arduino Client Library for ESP8266 and ESP32

version=2.3.6
version=2.3.7

author=Mobizt

Expand Down
2 changes: 1 addition & 1 deletion src/Firebase_ESP_Client.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Google's Firebase ESP Client Main class, Firebase_ESP_Client.cpp v2.3.6
* Google's Firebase ESP Client Main class, Firebase_ESP_Client.cpp v2.3.7
*
* This library supports Espressif ESP8266 and ESP32
*
Expand Down
4 changes: 2 additions & 2 deletions src/Firebase_ESP_Client.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef FIREBASE_CLIENT_VERSION
#define FIREBASE_CLIENT_VERSION "2.3.6"
#define FIREBASE_CLIENT_VERSION "2.3.7"
#endif

/**
* Google's Firebase ESP Client Main class, Firebase_ESP_Client.h v2.3.6
* Google's Firebase ESP Client Main class, Firebase_ESP_Client.h v2.3.7
*
* This library supports Espressif ESP8266 and ESP32
*
Expand Down
2 changes: 1 addition & 1 deletion src/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Firebase Arduino Client Library for ESP8266 and ESP32


Google's Firebase Arduino Client Library for ESP8266 and ESP32 v2.3.6
Google's Firebase Arduino Client Library for ESP8266 and ESP32 v2.3.7


The default filessystem used in the library is flash and SD.
Expand Down
10 changes: 5 additions & 5 deletions src/signer/Signer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Google's Firebase Token Generation class, Signer.cpp version 1.1.1
* Google's Firebase Token Generation class, Signer.cpp version 1.1.2
*
* This library supports Espressif ESP8266 and ESP32
*
Expand Down Expand Up @@ -504,7 +504,7 @@ bool Firebase_Signer::refreshToken()
#elif defined(ESP8266)
config->signer.wcs = new WiFiClientSecure();
config->signer.wcs->setInsecure();
config->signer.wcs->setBufferSizes(1024, 512);
config->signer.wcs->setBufferSizes(1024, 1024);
#endif
config->signer.json = new FirebaseJson();
config->signer.data = new FirebaseJsonData();
Expand Down Expand Up @@ -1274,7 +1274,7 @@ bool Firebase_Signer::getIdToken(bool createUser, const char *email, const char
#elif defined(ESP8266)
config->signer.wcs = new WiFiClientSecure();
config->signer.wcs->setInsecure();
config->signer.wcs->setBufferSizes(512, 512);
config->signer.wcs->setBufferSizes(1024, 1024);
#endif
config->signer.json = new FirebaseJson();
config->signer.data = new FirebaseJsonData();
Expand Down Expand Up @@ -1473,7 +1473,7 @@ bool Firebase_Signer::requestTokens()
#elif defined(ESP8266)
config->signer.wcs = new WiFiClientSecure();
config->signer.wcs->setInsecure();
config->signer.wcs->setBufferSizes(512, 512);
config->signer.wcs->setBufferSizes(1024, 1024);
#endif
config->signer.json = new FirebaseJson();
config->signer.data = new FirebaseJsonData();
Expand Down Expand Up @@ -1669,7 +1669,7 @@ bool Firebase_Signer::handleEmailSending(const char *payload, fb_esp_user_email_
#elif defined(ESP8266)
config->signer.wcs = new WiFiClientSecure();
config->signer.wcs->setInsecure();
config->signer.wcs->setBufferSizes(512, 512);
config->signer.wcs->setBufferSizes(1024, 1024);
#endif
config->signer.json = new FirebaseJson();
config->signer.data = new FirebaseJsonData();
Expand Down
9 changes: 5 additions & 4 deletions src/signer/Signer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Google's Firebase Token Generation class, Signer.h version 1.1.1
* Google's Firebase Token Generation class, Signer.h version 1.1.2
*
* This library supports Espressif ESP8266 and ESP32
*
Expand Down Expand Up @@ -65,7 +65,7 @@ class Firebase_Signer
friend class FB_RTDB;
friend class FirebaseData;
friend class QueryFilter;

public:
Firebase_Signer();
~Firebase_Signer();
Expand Down Expand Up @@ -102,7 +102,7 @@ class Firebase_Signer
void errorToString(int httpCode, std::string &buff);
bool tokenReady();
void sendTokenStatusCB();
const char* getToken(fb_esp_auth_token_type type);
const char *getToken(fb_esp_auth_token_type type);
fb_esp_auth_token_type getTokenType();
std::string getCAFile();
int getCAFileStorage();
Expand All @@ -112,7 +112,8 @@ class Firebase_Signer
#if defined(ESP8266)
void set_scheduled_callback(callback_function_t callback)
{
_cb = std::move([callback]() { schedule_function(callback); });
_cb = std::move([callback]()
{ schedule_function(callback); });
_cb();
}
#endif
Expand Down

0 comments on commit 1a71ef6

Please sign in to comment.