benzino77/tasmocompiler

Compile tasmota, add "option -DUSE_4K_RSA" problem

wei1980okb opened this issue · 2 comments

Hi, I have a problem and need help with compiling tasmota.
I added "MQTT over TLS" firmware support through "TasmoCompiler v11.0.0", and the compilation was successful.
But now through tasmota web setting and testing, it is found that the TLS certificate used by the server is RSA 4096, and tasmota connects to mosquito.
The console reports the following error "08:09:07.056 MQT: TLS connection error: 56
08:09:07.060 MQT: Connection failed: 192.168.1.2:2884, rc -2. Retry countdown: 120 seconds"
mosquito reported the following error:
1690010243: New connection from 192.168.1.18:55734 on port 1884.
1690010246: Client disconnected: Protocol error.

Find out through the official link below:

https://tasmota.github.io/docs/TLS/#limitations

The server certificate must have an RSA private key (max 2048 bits) and the certificate must be signed with RSA and SHA256 hash. This is the case with default LetsEncrypt certificates. ESP32 supports by default RSA private keys up to 4096 bits, ESP8266 must be compiled with option -DUSE_4K_RSA to support 4096 private keys.

==========================

I don't know how this "option -DUSE_4K_RSA" is added in "TasmoCompiler".

Hi,

In the "Custom parameters" step, put that in the text field:

#ifdef USE_4K_RSA
  #undef USE_4K_RSA
#endif
#define USE_4K_RSA

Thank You