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
Many protocols support upgrading after initial data has been sent, for example SMTP which will upgrade after a STARTTLS command
Allow an option to upgrade an unencrypted socket to an encrypted one (and possibly vice versa).
Something like void us_socket_upgrade(us_socket_t *t) (future calls on this socket object would need to set the ssl parameter to 1). Whether a socket has been upgraded or not should be up to the user to keep track of (via the socket extension, for example)
Another possible implementation would be to add a separate handler when the TLS connection has been established, which will get fired after on_open on sockets that use tls, something like void us_socket_context_on_ssl_established(us_socket_t *t), along with a method to send raw bytes over tcp rather than to encrypt them (actually I suppose this might be possible by passing ssl=0 to us_socket_write but the way I understand it this is currently likely undefined behaviour)
The text was updated successfully, but these errors were encountered:
Many protocols support upgrading after initial data has been sent, for example SMTP which will upgrade after a
STARTTLS
commandAllow an option to upgrade an unencrypted socket to an encrypted one (and possibly vice versa).
Something like
void us_socket_upgrade(us_socket_t *t)
(future calls on this socket object would need to set the ssl parameter to 1). Whether a socket has been upgraded or not should be up to the user to keep track of (via the socket extension, for example)Another possible implementation would be to add a separate handler when the TLS connection has been established, which will get fired after on_open on sockets that use tls, something like
void us_socket_context_on_ssl_established(us_socket_t *t)
, along with a method to send raw bytes over tcp rather than to encrypt them (actually I suppose this might be possible by passing ssl=0 tous_socket_write
but the way I understand it this is currently likely undefined behaviour)The text was updated successfully, but these errors were encountered: