SSL_accept doesn't retry BIO_write

Detlef Vollmann dv at vollmann.ch
Mon May 6 19:54:54 UTC 2024


On 5/6/24 11:48, Michael Richardson wrote:
> 
>      > Now I treat the flush as 'OpenSSL isn't interested in the result
>      > of the last write anymore'.  I'm not sure this assumption is correct,
>      > but it seems to work... (Well, it could cause duplicate messages
> 
> It does not sound correct.

I agree, that's why I asked.

> Might be true for a read.
> But, for a write, I'd think it would mean fflush().

The man page says:
"BIO_flush() normally writes out any internally buffered data,
in some cases it is used to signal EOF and that no more data
will be written."

The problem is that the protocol between OpenSSL and the BIO
is not very well documented.
As I understand it, a call to BIO_write will be repeated with
the same arguments if the first call returns <= 0.
But this doesn't seem to be the case for the last packet of
the session ticket...

> What do your BIO functions do for UDP that the existing set of UDP BIO don't
> do?  I have outstanding patches here.

I use ASIO <think-async.com> as the non-blocking framework.
And I can't use a pipe BIO as then I loose the info where
the boundaries of the packets are.

   Detlef



More information about the openssl-users mailing list