[openssl-dev] Questions about ASYNC API for engines and moving read buffer.
Emeric Brun
ebrun at haproxy.com
Fri Jun 2 10:00:27 UTC 2017
Hi,
I'm working on an ASYNC engine designed to offload crypto on multiple thread for monoproc applications.
No issue on asymetric crypto part but i'm facing a problem concerning ciphers:
When an SSL_read operation perform a do_cipher decrypt:
My engine defer the do_cipher to be processed by an other thread using the output buffer provided by to the do_cipher method.
After that it performs an ASYNC_pause_job(). On the application side it results on a WANT_ASYNC error.
The application consider that nothing was written on its output, and the buffer read buffer is reused for something else.
SSL_read is called a second time after receiving the event on the async fd. But this time the app used a different buffer.
On the engine side, i don't see any change on the do_cipher output buffer which would allow to manage the issue with a memcopy.
So my question is:
Is there a way to perform ciphering with an ASYNC engine when the app don't reuse the same buffer.
R,
Emeric Brun
More information about the openssl-dev
mailing list