-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSL TLS Server Secure problem #753
Comments
I am also getting this issue and cannot seem to find a solution online |
Hi @jsonpoindexter functions
in order to resolve I had to comment
and it Works It's a temporary solution but it works, look forward to @me-no-dev |
@sergioxdev thank you for this! I was able to compile now without errors. I was able to find a way that does not require as many line changes. I edited lines 4-5 in
and applied your fix in ESPAsyncTCP.cpp:
and this worked as well |
applied your fix in ESPAsyncTCP/src/async_config.h |
Is it for the 8266? Because on the ESP32 AsyncTCP lib does not have such files that you modified: |
it's about 8266 |
Thank you for the information. |
Thanks @jsonpoindexter it worked for me, This site can’t provide a secure connection10.188.191.1 didn’t accept your login certificate, or one may not have been provided. Please need a help here!! |
Hi @yashodeepk glad to hear it worked. It sounds possibly the issues are seeing has to do with your antivirus settings. This stack overflow might be relevant: https://stackoverflow.com/q/36309562 This article also indicates it could be due to the Os's date/time being out of sync as well as some other suggested fixes: https://appuals.com/fix-err_bad_ssl_client_auth_cert/ |
Thanks @jsonpoindexter I will try that |
Hi guys, congratulations for the work you have done.
I'm trying to use the library to implement secure connections, and in particular
let's go to the problem, unfortunately I have not found examples, but looking and researching I found this post
#392
I try but it doesn't work.
I'll post the code for days now that I've been trying to figure out where the problem is, but I still haven't found the solution.
`#define ASYNC_TCP_SSL_ENABLED true
#if ASYNC_TCP_SSL_ENABLED
char *cert_ = "/server.cer";
char *key_ = "/server.key";
char *password_ = NULL;
#endif
#include <ESP8266WiFi.h>
#include <ESPAsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <FS.h>
#if ASYNC_TCP_SSL_ENABLED
unsigned int port_ = 443;
#else
unsigned int port_ = 80;
#endif
AsyncWebServer server(port_);
//-----------------------------------------------
IPAddress _ap_static_ip(192,168,10,1);
IPAddress _ap_static_gw(192,168,10,1);
IPAddress _ap_static_sn(255,255,255,0);
String _apName = "AP";
String _apPassword = "";
String _ssid = "SSIDName";
String _pass = "Password";
#if ASYNC_TCP_SSL_ENABLED
int _onCertificate(void* arg, const char *filename, uint8_t *buf) {
File file = SPIFFS.open(filename, "r");
if (file) {
size_t size = file.size();
uint8_t * nbuf = (uint8_t) malloc(size);
if (nbuf) {
size = file.read(nbuf, size);
file.close();
*buf = nbuf;
Serial.print(F("[WEB] SSL File: "));
Serial.print(filename);
Serial.println(F(" OK"));
return size;
}
file.close();
}
Serial.print(F("[WEB] SSL File: "));
Serial.print(filename);
Serial.println(F(" ERROR"));
*buf = 0;
return 0;
}
#endif
void setup() {
Serial.begin(115200);
Serial.println(F("Mounting FS..."));
if (SPIFFS.begin()) {
Serial.println(F("Mounted file system"));
WiFi.begin(_ssid.c_str(),_pass.c_str());
WiFi.softAPConfig(_ap_static_ip, _ap_static_gw, ap_static_sn);
WiFi.enableSTA(true);
WiFi.softAP(apName.c_str());
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request) {
request->send(SPIFFS, "/index.html", String(), false);
});
#if ASYNC_TCP_SSL_ENABLED
server.onSslFileRequest(onCertificate, NULL);
server.beginSecure(cert, key, password);
#else
server.begin(); // Web server start
#endif
}
}
void loop() {
}`
This is the error:
...packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\tserver.ino.cpp.o:(.text.setup+0x58): undefined reference to `AsyncWebServer::onSslFileRequest(std::function<int (void*, char const*, unsigned char**)>, void*)'
...packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\tserver.ino.cpp.o:(.text.setup+0x5c): undefined reference to `AsyncWebServer::beginSecure(char const*, char const*, char const*)'
...packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\tserver.ino.cpp.o: in function `setup':
tserver.ino:64: undefined reference to `AsyncWebServer::onSslFileRequest(std::function<int (void*, char const*, unsigned char**)>, void*)'
...packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: tserver.ino:66: undefined reference to `AsyncWebServer::beginSecure(char const*, char const*, char const*)'
collect2.exe: error: ld returned 1 exit status
exit status 1
Can someone enlighten me
Thank you in advance
The text was updated successfully, but these errors were encountered: