]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: xprt-quic: replace ERR_func_error_string() with ERR_peek_error_func()
authorWilly Tarreau <w@1wt.eu>
Mon, 11 Apr 2022 16:47:38 +0000 (18:47 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 Apr 2022 16:54:46 +0000 (18:54 +0200)
OpenSSL 3.0 warns that ERR_func_error_string() is deprecated. Using
ERR_peek_error_func() solves it instead, and this function was added to
the compat layer by commit 1effd9aa0 ("MINOR: ssl: Remove call to
ERR_func_error_string with OpenSSLv3").

src/xprt_quic.c

index 63cfc7fe7e0a31952e74d351bf95f5c51b2cedd4..d675d16d8094fc4f68fd08f9a0209797dc38225c 100644 (file)
@@ -2004,14 +2004,16 @@ static forceinline void qc_ssl_dump_errors(struct connection *conn)
 {
        if (unlikely(global.mode & MODE_DEBUG)) {
                while (1) {
+                       const char *func = NULL;
                        unsigned long ret;
 
+                       ERR_peek_error_func(&func);
                        ret = ERR_get_error();
                        if (!ret)
                                return;
 
                        fprintf(stderr, "conn. @%p OpenSSL error[0x%lx] %s: %s\n", conn, ret,
-                               ERR_func_error_string(ret), ERR_reason_error_string(ret));
+                               func, ERR_reason_error_string(ret));
                }
        }
 }