mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 08:12:37 +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;
|
||||
assert(bool(sock));
|
||||
|
||||
#ifdef RB_DEBUG
|
||||
const auto ¤t_cipher
|
||||
{
|
||||
openssl::current_cipher(*sock)
|
||||
};
|
||||
|
||||
log::debug
|
||||
{
|
||||
log, "%s handshook(%zu) %s",
|
||||
log, "%s handshook(%zu) cipher:%s %s",
|
||||
loghead(*sock),
|
||||
handshaking,
|
||||
current_cipher?
|
||||
openssl::name(*current_cipher):
|
||||
"<NO CIPHER>"_sv,
|
||||
string(ec)
|
||||
};
|
||||
#endif
|
||||
|
||||
check_handshake_error(ec, *sock);
|
||||
sock->cancel_timeout();
|
||||
|
@ -2581,12 +2592,22 @@ noexcept try
|
|||
if(timedout && ec == errc::operation_canceled)
|
||||
ec = make_error_code(errc::timed_out);
|
||||
|
||||
#ifdef RB_DEBUG
|
||||
const auto ¤t_cipher
|
||||
{
|
||||
openssl::current_cipher(*this)
|
||||
};
|
||||
|
||||
log::debug
|
||||
{
|
||||
log, "%s handshake %s",
|
||||
log, "%s handshake cipher:%s %s",
|
||||
loghead(*this),
|
||||
current_cipher?
|
||||
openssl::name(*current_cipher):
|
||||
"<NO CIPHER>"_sv,
|
||||
string(ec)
|
||||
};
|
||||
#endif
|
||||
|
||||
// This is the end of the asynchronous call chain; the user is called
|
||||
// back with or without error here.
|
||||
|
|
Loading…
Reference in a new issue