ESP HTTP decryption
Posted: 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
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