Is it safe to write to a TLS socket before 'secureConnect' event? It's not entirely clear from the docs unless I've missed something.
@ronag If it isn’t, then I’m pretty sure it should be… at the very least, it seems like it works in practice? As in, writing data to the socket synchronously in the same tick as tls.connect() seems to work.
As in, writing data to the socket synchronously in the same tick as tls.connect() seems to work.
It does work... but is it safe? I'm not familiar enough with TLS but is it in theory possible to send data on the wire before the connection is fully authenticated?
Might be worth to clarify in the docs.
I think this is probably fine, write goes through SSL_write which I assume would error if the write would be insecure.
Most helpful comment
It does work... but is it safe? I'm not familiar enough with TLS but is it in theory possible to send data on the wire before the connection is fully authenticated?
Might be worth to clarify in the docs.