You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context: I'm writing an asynchronous TLS tunnel engine supporting libtls as a backend, with an option to omit (or force) sending a close_notify and check if the peer sent one.
When the peer closes the connection, this is reported to the user as tls_read() returning 0, which is all good, but I need to know whether the peer sent a close_notify or not. Currently, this information is only available as ctx->state & TLS_EOF_NO_CLOSE_NOTIFY; it is used by tls_close(), but I have no way of retrieving it when I'm not the one initiating the close. And I cannot access ctx->state because struct tls is private.
It would be nice to have an accessor for this. It could be as simple as:
Context: I'm writing an asynchronous TLS tunnel engine supporting libtls as a backend, with an option to omit (or force) sending a close_notify and check if the peer sent one.
When the peer closes the connection, this is reported to the user as
tls_read()
returning 0, which is all good, but I need to know whether the peer sent a close_notify or not. Currently, this information is only available asctx->state & TLS_EOF_NO_CLOSE_NOTIFY
; it is used bytls_close()
, but I have no way of retrieving it when I'm not the one initiating the close. And I cannot accessctx->state
becausestruct tls
is private.It would be nice to have an accessor for this. It could be as simple as:
Thanks in advance.
The text was updated successfully, but these errors were encountered: