diff options
author | Michael Forney <mforney@mforney.org> | 2019-12-20 19:20:18 -0800 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2019-12-31 02:43:47 -0500 |
commit | 9024b01387ea9601badfc442642b66b269d33a8d (patch) | |
tree | 59f19ba9592fafc0d64cb800638f5ea805e0d527 /docs/examples/imap-copy.c | |
parent | 9434864770406cc9663437063ecab91820fdd4fe (diff) |
bearssl: Improve I/O handling
Factor out common I/O loop as bearssl_run_until, which reads/writes TLS
records until the desired engine state is reached. This is now used for
the handshake, read, write, and close.
Match OpenSSL SSL_write behavior, and don't return the number of bytes
written until the corresponding records have been completely flushed
across the socket. This involves keeping track of the length of data
buffered into the TLS engine, and assumes that when CURLE_AGAIN is
returned, the write function will be called again with the same data
and length arguments. This is the same requirement of SSL_write.
Handle TLS close notify as EOF when reading by returning 0.
Closes https://github.com/curl/curl/pull/4748
Diffstat (limited to 'docs/examples/imap-copy.c')
0 files changed, 0 insertions, 0 deletions