mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 08:12:37 +01:00
ircd::net: Bail from handle_verify() on socket fini.
This commit is contained in:
parent
3b832db9a4
commit
ff25a486a0
1 changed files with 6 additions and 7 deletions
13
ircd/net.cc
13
ircd/net.cc
|
@ -3288,13 +3288,12 @@ noexcept try
|
|||
// `valid` indicates whether or not there's an anomaly with the
|
||||
// certificate; if so, it is usually enumerated by the `switch()`
|
||||
// statement below. If `valid` is false, this function can return
|
||||
// true to continue but it appears this function will be called a
|
||||
// second time with `valid=true`.
|
||||
//
|
||||
// TODO: XXX: This behavior must be confirmed since we return true
|
||||
// TODO: XXX: early on recoverable errors and skip other checks
|
||||
// TODO: XXX: expecting a second call..
|
||||
//
|
||||
// true to still continue.
|
||||
|
||||
// Socket ordered to shut down. We abort the verification here
|
||||
// to allow the open_opts out of scope with the user.
|
||||
if(fini || !sd.is_open())
|
||||
return false;
|
||||
|
||||
// The user can set this option to bypass verification.
|
||||
if(!opts.verify_certificate)
|
||||
|
|
Loading…
Reference in a new issue