mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd::net: Show current cipher in handshake debug log msgs.
This commit is contained in:
parent
025313b6fe
commit
a9969bfb4b
1 changed files with 23 additions and 2 deletions
25
ircd/net.cc
25
ircd/net.cc
|
@ -1399,13 +1399,24 @@ noexcept try
|
||||||
|
|
||||||
--handshaking;
|
--handshaking;
|
||||||
assert(bool(sock));
|
assert(bool(sock));
|
||||||
|
|
||||||
|
#ifdef RB_DEBUG
|
||||||
|
const auto ¤t_cipher
|
||||||
|
{
|
||||||
|
openssl::current_cipher(*sock)
|
||||||
|
};
|
||||||
|
|
||||||
log::debug
|
log::debug
|
||||||
{
|
{
|
||||||
log, "%s handshook(%zu) %s",
|
log, "%s handshook(%zu) cipher:%s %s",
|
||||||
loghead(*sock),
|
loghead(*sock),
|
||||||
handshaking,
|
handshaking,
|
||||||
|
current_cipher?
|
||||||
|
openssl::name(*current_cipher):
|
||||||
|
"<NO CIPHER>"_sv,
|
||||||
string(ec)
|
string(ec)
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
check_handshake_error(ec, *sock);
|
check_handshake_error(ec, *sock);
|
||||||
sock->cancel_timeout();
|
sock->cancel_timeout();
|
||||||
|
@ -2581,12 +2592,22 @@ noexcept try
|
||||||
if(timedout && ec == errc::operation_canceled)
|
if(timedout && ec == errc::operation_canceled)
|
||||||
ec = make_error_code(errc::timed_out);
|
ec = make_error_code(errc::timed_out);
|
||||||
|
|
||||||
|
#ifdef RB_DEBUG
|
||||||
|
const auto ¤t_cipher
|
||||||
|
{
|
||||||
|
openssl::current_cipher(*this)
|
||||||
|
};
|
||||||
|
|
||||||
log::debug
|
log::debug
|
||||||
{
|
{
|
||||||
log, "%s handshake %s",
|
log, "%s handshake cipher:%s %s",
|
||||||
loghead(*this),
|
loghead(*this),
|
||||||
|
current_cipher?
|
||||||
|
openssl::name(*current_cipher):
|
||||||
|
"<NO CIPHER>"_sv,
|
||||||
string(ec)
|
string(ec)
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
// This is the end of the asynchronous call chain; the user is called
|
// This is the end of the asynchronous call chain; the user is called
|
||||||
// back with or without error here.
|
// back with or without error here.
|
||||||
|
|
Loading…
Reference in a new issue