BUG/MINOR: ssl: don't truncate the file descriptor to 16 bits in debug mode

Errors reported by ssl_sock_dump_errors() to stderr would only report the
16 lower bits of the file descriptor because it used to be casted to ushort.
This can be backported to all versions but has really no importance in
practice since this is never seen.
This commit is contained in:
Willy Tarreau 2021-03-02 19:32:39 +01:00
parent f8fb4f75f1
commit 566cebc1fc

View File

@ -646,8 +646,8 @@ static forceinline void ssl_sock_dump_errors(struct connection *conn)
ret = ERR_get_error();
if (ret == 0)
return;
fprintf(stderr, "fd[%04x] OpenSSL error[0x%lx] %s: %s\n",
(unsigned short)conn->handle.fd, ret,
fprintf(stderr, "fd[%#x] OpenSSL error[0x%lx] %s: %s\n",
conn->handle.fd, ret,
ERR_func_error_string(ret), ERR_reason_error_string(ret));
}
}