mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-19 12:10:46 +00:00
MINOR: ssl_sock: Set the QUIC application from ssl_sock_advertise_alpn_protos.
Make this function call quic_set_app_ops() if the protocol could be negotiated by the TLS stack.
This commit is contained in:
parent
b0bd62db23
commit
1761fdf0c6
@ -1974,17 +1974,26 @@ static int ssl_sock_advertise_alpn_protos(SSL *s, const unsigned char **out,
|
||||
unsigned int server_len, void *arg)
|
||||
{
|
||||
struct ssl_bind_conf *conf = arg;
|
||||
#ifdef USE_QUIC
|
||||
struct connection *conn = SSL_get_ex_data(s, ssl_app_data_index);
|
||||
#endif
|
||||
|
||||
if (SSL_select_next_proto((unsigned char**) out, outlen, (const unsigned char *)conf->alpn_str,
|
||||
conf->alpn_len, server, server_len) != OPENSSL_NPN_NEGOTIATED) {
|
||||
#ifdef USE_QUIC
|
||||
struct connection *conn = SSL_get_ex_data(s, ssl_app_data_index);
|
||||
|
||||
if (conn->qc)
|
||||
quic_set_tls_alert(conn->qc, SSL_AD_NO_APPLICATION_PROTOCOL);
|
||||
#endif
|
||||
return SSL_TLSEXT_ERR_NOACK;
|
||||
}
|
||||
|
||||
#ifdef USE_QUIC
|
||||
if (conn->qc && !quic_set_app_ops(conn->qc, *out, *outlen)) {
|
||||
quic_set_tls_alert(conn->qc, SSL_AD_NO_APPLICATION_PROTOCOL);
|
||||
return SSL_TLSEXT_ERR_NOACK;
|
||||
}
|
||||
#endif
|
||||
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user