Skip to content

Commit

Permalink
tls-eio: add bug note about close_notify behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
bikallem committed Dec 15, 2022
1 parent d4db677 commit 5580b36
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion eio/tls_eio.ml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,18 @@ module Raw = struct
as `Response resp when it encounters `close_notify` in data. *)
if not t.close_notify_sent then begin
Option.iter (write_t t) resp ;
t.close_notify_sent <- true
t.close_notify_sent <- true ;

(* XXX shouldn't we now close 'Send' side of flow since we are sending
'close_notify' message ? lwt doesn't so we don't too and the fuzz
test fails if we do, so we don't too. But we really, really should shutdown
'Send' side of the connection here.
TLS 1.3 [https://www.rfc-editor.org/rfc/rfc8446#section-6.1] is very specific
aboutt this behaviour.
XXX uncomment below line after discussing with @talex, @hannes. *)
(* Eio.Flow.shutdown t.flow `Send ; *)
end
| `Alert a -> raise (Tls_alert a)
end ;
Expand Down

0 comments on commit 5580b36

Please sign in to comment.