eduardsui / tlse

Single C file TLS 1.2/1.3 implementation, using tomcrypt as crypto library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Socket descriptor can be zero

vbickov opened this issue · comments

The common check for invalid descriptor in the code is (ssl_data->fd <= 0), which is wrong. Zero is a valid descriptor.

.... with a proper check (ssl_data->fd < 0) the SSLUserData constructor should be changed accordingly.