Filip Kolev
Filip Kolev
Combining the checks for SSL_CTX_use_certificate_file() and SSL_CTX_use_PrivateKey_file() leads to the case where if the second function fails we print a message pointing to the first one, which is misleading. Check...
Handle error conditions uniformly by following these rules: - return 0 on success and 1 on failure - when an error occurs in main() use return - when an error...
The getaddrinfo() function returns 0 on success or a non-zero error code on failure. For reference: - https://man7.org/linux/man-pages/man3/getaddrinfo.3.html - https://learn.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfo On Unix systems, errno is only set in the case...
According to https://man7.org/linux/man-pages/man3/getifaddrs.3.html getifaddrs() returns -1 on error and sets errno. Use the perror() function to provide a more informative error message in such cases.