ESP HTTP decryption

slompf
Posts: 15
Joined: Tue Mar 12, 2019 6:55 pm

ESP HTTP decryption

Postby slompf » Mon Dec 21, 2020 10:23 am

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_Mahavir
Posts: 190
Joined: Wed Jan 24, 2018 6:51 am

Re: ESP HTTP decryption

Postby ESP_Mahavir » Mon Dec 21, 2020 12:55 pm


slompf
Posts: 15
Joined: Tue Mar 12, 2019 6:55 pm

Re: ESP HTTP decryption

Postby slompf » Mon Dec 21, 2020 1:31 pm

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: No registered users and 240 guests