]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl: fix build of backend without ssl
authorWilly Tarreau <w@1wt.eu>
Wed, 8 Nov 2017 13:25:59 +0000 (14:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 8 Nov 2017 13:28:08 +0000 (14:28 +0100)
Commit 522eea7 ("MINOR: ssl: Handle sending early data to server.") added
a dependency on SRV_SSL_O_EARLY_DATA which only exists when USE_OPENSSL
is defined (which is probably not the best solution) and breaks the build
when ssl is not enabled. Just add an ifdef USE_OPENSSL around the block
for now.

src/backend.c

index ca064b695389e315182a273d636acbc959825450..c8c2b9dea89b855b88b4ccc6d47414ec95741449 100644 (file)
@@ -1209,6 +1209,7 @@ int connect_server(struct stream *s)
 
        err = si_connect(&s->si[1]);
 
+#ifdef USE_OPENSSL
        if (!reuse && cli_conn && srv &&
            (srv->ssl_ctx.options & SRV_SSL_O_EARLY_DATA) &&
                    (cli_conn->flags & CO_FL_EARLY_DATA) &&
@@ -1217,6 +1218,7 @@ int connect_server(struct stream *s)
                srv_conn->flags &= ~(CO_FL_SSL_WAIT_HS | CO_FL_WAIT_L6_CONN);
                srv_conn->flags |= CO_FL_EARLY_SSL_HS;
        }
+#endif
 
        if (err != SF_ERR_NONE)
                return err;