]> git.kaiwu.me - haproxy.git/commitdiff
BUILD: ssl: fix build without USE_OPENSSL + clear_ocsp_clt_check_ctx
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 2 Oct 2026 11:15:46 +0000 (13:15 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 2 Oct 2026 11:15:46 +0000 (13:15 +0200)
src/stream.c: In function ‘stream_free’:
src/stream.c:722:9: error: implicit declaration of function ‘clear_ocsp_clt_check_ctx’ [-Werror=implicit-function-declaration]
  722 |         clear_ocsp_clt_check_ctx(&s->ocsp_clt_check_ctx);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~

Add HAVE_SSL_OCSP to ensure we have the feature.

src/stream.c

index fba7a2591572bb48f601f3122999f0b3bf03ecfa..c04571df03c6a61dfc3aecfbbc7a624139923ad7 100644 (file)
@@ -719,8 +719,10 @@ void stream_free(struct stream *s)
                s->resolv_ctx.requester = NULL;
        }
 
+#ifdef HAVE_SSL_OCSP
        clear_ocsp_clt_check_ctx(&s->ocsp_clt_check_ctx);
        ha_free(&s->ocsp_clt_check_ctx);
+#endif
 
        if (fe) {
                if (s->req_cap) {