[openssl-dev] Adding async support

Matt Caswell matt at openssl.org
Wed Oct 7 16:04:54 UTC 2015



On 07/10/15 16:57, Devchandra L Meetei wrote:
> 
> 
> On Wed, Oct 7, 2015 at 3:16 PM, Matt Caswell <matt at openssl.org
> <mailto:matt at openssl.org>>
> wrote:<https://github.com/openssl/openssl/pull/433>
> 
> 
> 
>     libssl has been made async aware through the introduction of a new mode
>     "SSL_MODE_ASYNC". The mode is set using a call to one of the existing
>     functions SSL_CTX_set_mode() or SSL_set_mode(). Having set that mode
>     calls to functions such as SSL_read/SSL_write etc, may now start
>     returning an SSL_ERROR_WANT_ASYNC response (if an async capable engine
>     is present). To resume you simply recall SSL_read/SSL_write in the same
>     way as you would if you got an SSL_ERROR_WANT_READ or
>     SSL_ERROR_WANT_WRITE. Similarly to above you must do this from the same
>     thread as the original call.
> 
>  
> Does this also mean that there will not be any libssl API change?

There are no changes to the fundamental way the libssl API works. This
is about integrating a new source of async events i.e. the capability to
asynchronously process crypto operations by pushing the work off into
some async capable engine. It's not about changing the way async events
are presented to applications in libssl.

> 
> I have been developing async calls of TLS I/O using bio pair, for instance
> for SSL_read, it is something like
> 
>> int evt_tls_read( evt_tls_t *tls, void (*cb)(evt_tls_t* t, char *buf,
> int sz))
> 
> The cb will be called asynchronously whenever there is application data.
> 
> Will there be any such change? Such API's will make integrating OpenSSL
> with other
> async lib like libevent, libev and libuv etc.

There are no such changes planned.

Matt



More information about the openssl-dev mailing list