MINOR: cli: Ensure the CLI always outputs an error when it should
When using the CLI_ST_PRINT_FREE state, always output something back
if the faulty function did not fill the 'err' variable.
The map/acl code could lead to a crash whereas the SSL code was silently
failing.
Signed-off-by: Aurélien Nephtali <aurelien.nephtali@corp.ovh.com>
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index 8151cb3..23ad35b 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -8588,6 +8588,11 @@
appctx->ctx.cli.err = err;
appctx->st0 = CLI_ST_PRINT_FREE;
}
+ else {
+ appctx->ctx.cli.severity = LOG_ERR;
+ appctx->ctx.cli.msg = "Failed to update OCSP response.\n";
+ appctx->st0 = CLI_ST_PRINT;
+ }
return 1;
}
appctx->ctx.cli.severity = LOG_INFO;