Skip to content

Commit

Permalink
MINOR: mworker/ocsp: skip ocsp-update proxy init in master
Browse files Browse the repository at this point in the history
The proxy must be created in mworker mode, but only in the worker, not in
the master. The current code creates the proxy in both processes.

The patch only checks that we are not in the master to start the
ocsp-update pre-check.

No backport needed.
  • Loading branch information
wlallemand committed Oct 17, 2024
1 parent 5184f3f commit 043f11e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ssl_ocsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,11 @@ static struct task *ssl_ocsp_update_responses(struct task *task, void *context,
*/
static int ssl_ocsp_update_precheck()
{

/* the ocsp-update is not usable in the master process */
if (master)
return ERR_NONE;

/* initialize the OCSP update dedicated httpclient */
httpclient_ocsp_update_px = httpclient_create_proxy("<OCSP-UPDATE>");
if (!httpclient_ocsp_update_px)
Expand Down

0 comments on commit 043f11e

Please sign in to comment.