revocation: Enforce a (configurable) timeout when fetching OCSP/CRL

Malicious servers could otherwise block the fetching thread indefinitely
after the initial TCP handshake (which has a default timeout of 10s
in the curl and winhttp plugins, the soup plugin actually has a default
overall timeout of 10s).
This commit is contained in:
Tobias Brunner
2022-10-03 10:48:46 +02:00
parent b1e926148a
commit 1968615590
4 changed files with 56 additions and 23 deletions
@@ -82,6 +82,9 @@ METHOD(fetcher_t, set_option, bool,
this->cb = va_arg(args, fetcher_callback_t);
break;
}
case FETCH_TIMEOUT:
/* irrelevant, but fine if requested */
break;
default:
supported = FALSE;
break;