Hi,
I'm trying to replace my own HTTP server in a Apple Homekit implementation with the one of esp idf. This is partly working, but now a problem arose: As the message sent by the client are encrypted I have overwritten the recv function with httpd_sess_set_recv_override to decrypt them. This works quite fine, if the message size is less than 128 bytes (PARSER_BLOCK_SIZE). If it is bigger, the parser requests only a part of the message, which I cant decrypt in the overridden receive function because the message is not complete.
In order to workaround the problem, I set PARSER_BLOCK_SIZE in esp_httpd_priv.h to a bigger value. It works, but is limited to a specific message size and needs changes in the esp idf source.
Is there another way to handle that problem? How does the SSL server deal with it (I could not figure out)?
Best regards,
Torsten
ESP HTTP decryption
-
- Posts: 190
- Joined: Wed Jan 24, 2018 6:51 am
Re: ESP HTTP decryption
Putting some pointers from `esp-homekit-sdk` offering that may help you in this regard:
https://github.com/espressif/esp-homeki ... ices.c#L86
https://github.com/espressif/esp-homeki ... ttpd.c#L71
https://github.com/espressif/esp-homeki ... _io.c#L180
https://github.com/espressif/esp-homeki ... ices.c#L86
https://github.com/espressif/esp-homeki ... ttpd.c#L71
https://github.com/espressif/esp-homeki ... _io.c#L180
Mahavir
https://github.com/mahavirj/
https://github.com/mahavirj/
Re: ESP HTTP decryption
I'm now receiving the whole message, decrypting and caching it. Then I can provide it block by block to the server.
Who is online
Users browsing this forum: Google [Bot] and 117 guests