mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-29 14:50:59 +01:00
MINOR: quic: Display the SSL alert in ->ssl_send_alert() callback.
At least displays the SSL alert error code passed to ->ssl_send_alert() QUIC BIO method and the SSL encryption level. This function is newly called when using picoquic client with a recent version of BoringSSL (Nov 19 2020). This is not the case with OpenSSL with 32 as QUIC draft implementation.
This commit is contained in:
parent
26c49d9eb0
commit
47c433fdcb
@ -519,6 +519,17 @@ static void quic_trace(enum trace_level level, uint64_t mask, const struct trace
|
|||||||
(unsigned long long)pkt->cdata_len);
|
(unsigned long long)pkt->cdata_len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mask & QUIC_EV_CONN_SSLALERT) {
|
||||||
|
const uint8_t *alert = a2;
|
||||||
|
const enum ssl_encryption_level_t *level = a3;
|
||||||
|
|
||||||
|
if (alert)
|
||||||
|
chunk_appendf(&trace_buf, " alert=0x%02x", *alert);
|
||||||
|
if (level)
|
||||||
|
chunk_appendf(&trace_buf, " el=%c",
|
||||||
|
quic_enc_level_char(ssl_to_quic_enc_level(*level)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (mask & QUIC_EV_CONN_LPKT) {
|
if (mask & QUIC_EV_CONN_LPKT) {
|
||||||
const struct quic_rx_packet *pkt = a2;
|
const struct quic_rx_packet *pkt = a2;
|
||||||
@ -847,8 +858,7 @@ int ha_quic_send_alert(SSL *ssl, enum ssl_encryption_level_t level, uint8_t aler
|
|||||||
{
|
{
|
||||||
struct connection *conn = SSL_get_ex_data(ssl, ssl_app_data_index);
|
struct connection *conn = SSL_get_ex_data(ssl, ssl_app_data_index);
|
||||||
|
|
||||||
TRACE_ENTER(QUIC_EV_CONN_SSLALERT, conn);
|
TRACE_DEVEL("SSL alert", QUIC_EV_CONN_SSLALERT, conn, &alert, &level);
|
||||||
TRACE_LEAVE(QUIC_EV_CONN_SSLALERT, conn);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user