processone / fast_tls

TLS / SSL OpenSSL-based native driver for Erlang / Elixir
https://www.ejabberd.im
Other
83 stars 37 forks source link

Send alert messages on handshake failures #62

Closed zinid closed 8 months ago

zinid commented 8 months ago

When SSL_do_handshake() fails we should send data even when SSL_ERROR_WANT_WRITE is not reported (because a final error such as "unsupported protocol" is reported).

If we don't do it, we don't send handshake alerts toward the peer and as a consequence:

This commit fixes it.

coveralls commented 8 months ago

Coverage Status

coverage: 57.285% (+0.3%) from 56.971% when pulling f83322cdaa87b99bc8252c0e388dc3f553346f22 on zinid:send-handshake-failure into 4ae9adf3420f173ed201fc93bdf0123b618d3a50 on processone:master.