mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 05:41:26 +02:00
BUILD: ssl: address a recent build warning when QUIC is enabled
Since commit 5ab9954faa ("MINOR: ssl: Add a flag to let it known we have an ALPN negociated"), when building with QUIC we get this warning: src/ssl_sock.c: In function 'ssl_sock_advertise_alpn_protos': src/ssl_sock.c:2189:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] Let's just move the instructions after the optional declaration. No backport is needed.
This commit is contained in:
parent
d4c51a4f57
commit
bdff394195
@ -2181,13 +2181,11 @@ static int ssl_sock_advertise_alpn_protos(SSL *s, const unsigned char **out,
|
|||||||
struct connection *conn;
|
struct connection *conn;
|
||||||
struct ssl_sock_ctx *ctx;
|
struct ssl_sock_ctx *ctx;
|
||||||
|
|
||||||
conn = SSL_get_ex_data(s, ssl_app_data_index);
|
|
||||||
ctx = __conn_get_ssl_sock_ctx(conn);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_QUIC
|
#ifdef USE_QUIC
|
||||||
struct quic_conn *qc = SSL_get_ex_data(s, ssl_qc_app_data_index);
|
struct quic_conn *qc = SSL_get_ex_data(s, ssl_qc_app_data_index);
|
||||||
#endif
|
#endif
|
||||||
|
conn = SSL_get_ex_data(s, ssl_app_data_index);
|
||||||
|
ctx = __conn_get_ssl_sock_ctx(conn);
|
||||||
|
|
||||||
if (SSL_select_next_proto((unsigned char**) out, outlen, (const unsigned char *)conf->alpn_str,
|
if (SSL_select_next_proto((unsigned char**) out, outlen, (const unsigned char *)conf->alpn_str,
|
||||||
conf->alpn_len, server, server_len) != OPENSSL_NPN_NEGOTIATED) {
|
conf->alpn_len, server, server_len) != OPENSSL_NPN_NEGOTIATED) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user