jbuszkie / HTTPSRedirect

Clone of https://github.com/electronicsguy/ESP8266.git - just the HTTPSRedirect
7 stars 8 forks source link

SSL - A buffer is too small to receive or write a message #3

Closed SheetLightning closed 1 year ago

SheetLightning commented 2 years ago

I recently used this HTTPSredirect library in one of my projects to access my Google calendar. I have it working on an ESP8266, but want to port it to an ESP32 because the project will need the extra GPIO pins. Unfortunately I ran into this (captured with ESP32 debug mode set to verbose):

Connected to Google
[ 43293][V][ssl_client.cpp:369] send_ssl_data(): Writing HTTP request with 150 bytes...
[ 43293][V][ssl_client.cpp:374] send_ssl_data(): Handling error -27136
[ 43299][E][ssl_client.cpp:37] _handle_error(): [send_ssl_data():375]: (-27136) SSL - A buffer is too small to receive or write a message
[ 43313][V][ssl_client.cpp:324] stop_ssl_socket(): Cleaning SSL connection.
gclient->GET(url, googleHost);
Performed GET

The GET request then fails to return any data. I presume that this library somehow calls the Esspressif ssl_client module but can't see how? The GET method in this library seems to only create the GET request in an appropriate format? I also can't see any buffer size being set in this library as it uses a String type for the data buffer. So where do I set the size of the SSL buffer please?

The code is quite straightforward and based on a project by Andreas Spiess. I have attached a minimal example.

The error occurs when running the gclient->GET(url, googleHost); statement.

Google-Minimal.zip

SheetLightning commented 2 years ago

Sorry, I just realised that your repository is a copy of the original project by electronicsguy. This repostory seems to come up in Google searches though. I have logged an issue on electronicsguy's Github repository instead.