0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 07:23:53 +01:00

ircd::net: Bail from handle_verify() on socket fini.

This commit is contained in:
Jason Volk 2019-04-16 19:20:39 -07:00
parent 3b832db9a4
commit ff25a486a0

View file

@ -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)