]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: init: load OpenSSL error strings
authorWilliam Lallemand <wlallemand@haproxy.org>
Tue, 19 Jul 2022 16:13:29 +0000 (18:13 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Tue, 19 Jul 2022 17:13:08 +0000 (19:13 +0200)
Load OpenSSL Error strings in order to be able to output reason strings.

This is mandatory to be able to use ERR_reason_error_string().

src/haproxy.c

index a2a7376730a6bd7771983836a30188a9c9f56e74..1d0fa3368250843d4041d8022149fb7dd9b7bf2a 100644 (file)
@@ -2222,8 +2222,10 @@ static void init(int argc, char **argv)
                cfg_run_diagnostics();
        }
 
-       /* Initialize the random generators */
 #ifdef USE_OPENSSL
+       /* Initialize the error strings of OpenSSL */
+       SSL_load_error_strings();
+
        /* Initialize SSL random generator. Must be called before chroot for
         * access to /dev/urandom, and before ha_random_boot() which may use
         * RAND_bytes().