]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl: Fix wolfssl build
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 30 Apr 2025 13:26:30 +0000 (15:26 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 30 Apr 2025 13:50:10 +0000 (15:50 +0200)
The newly added SSL traces require an extra 'conn' parameter to
ssl_sock_chose_sni_ctx which was added in the "regular" code but not in
the wolfssl specific one.
Wolfssl also has a different prototype for some getter functions
(SSL_get_servername for instance), which do not expect a const SSL while
openssl version does.

src/ssl_clienthello.c
src/ssl_trace.c

index be94849c77c41160737f0354377aebd35b06ca0e..4f939440cecea73083d2f47de008f29b3faa3aee 100644 (file)
@@ -624,6 +624,7 @@ sni_lookup:
  */
 int ssl_sock_switchctx_wolfSSL_cbk(WOLFSSL* ssl, void* arg)
 {
+       struct connection *conn = SSL_get_ex_data(ssl, ssl_app_data_index);
        struct bind_conf *s = arg;
        int has_rsa_sig = 0, has_ecdsa_sig = 0;
        const char *servername;
index 4cf044380019fdc75748e4d573dc05e473ef0bca..8f77fb23cd83ea67132c95e7527196449d135aaa 100644 (file)
@@ -120,7 +120,7 @@ static void ssl_trace(enum trace_level level, uint64_t mask, const struct trace_
        }
 
        if (mask & SSL_EV_CONN_HNDSHK) {
-               const SSL *ssl = a2;
+               SSL *ssl = (SSL*)a2;
 
                if (ssl && src->verbosity > SSL_VERB_SIMPLE) {
                        const char *servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);