]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ocsp: prototype inconsistency
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 11 Sep 2025 13:05:25 +0000 (15:05 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 11 Sep 2025 13:18:10 +0000 (15:18 +0200)
Inconsistencies between the .h and the .c can't be catched because the
.h is not included in the .c.

ocsp_update_init() does not have the right prototype and lacks a const
attribute.

Must be backported in all previous stable versions.

src/ssl_ocsp.c

index e650a3ce3dfe5e014568442673d7b04d06ba160f..64947bf0597595682096c52b07e69d29e5138bcf 100644 (file)
@@ -57,6 +57,7 @@
 #include <haproxy/shctx.h>
 #include <haproxy/ssl_ckch.h>
 #include <haproxy/ssl_ocsp-t.h>
+#include <haproxy/ssl_ocsp.h>
 #include <haproxy/ssl_sock.h>
 #include <haproxy/ssl_utils.h>
 #include <haproxy/task.h>
@@ -2075,7 +2076,7 @@ static int ocsp_update_parse_global_http_proxy(char **args, int section_type, st
        return 0;
 }
 
-int ocsp_update_init(void *value, char *buf, struct ckch_data *d, int cli, char *filename, int linenum, char **err)
+int ocsp_update_init(void *value, char *buf, struct ckch_data *d, int cli, const char *filename, int linenum, char **err)
 {
        int ocsp_update_mode = *(int *)value;
        int ret = 0;