mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-24 04:11:02 +01:00
MINOR: ssl: ssl_fc_has_early should work for BoringSSL
CO_FL_EARLY_SSL_HS/CO_FL_EARLY_DATA are removed for BoringSSL. Early data can be checked via BoringSSL API and ssl_fc_has_early can used it. This should be backported to all versions till 1.8.
This commit is contained in:
parent
f967c31e75
commit
c9858010c2
@ -6609,9 +6609,16 @@ smp_fetch_ssl_fc_has_early(const struct arg *args, struct sample *smp, const cha
|
||||
|
||||
smp->flags = 0;
|
||||
smp->data.type = SMP_T_BOOL;
|
||||
#ifdef OPENSSL_IS_BORINGSSL
|
||||
{
|
||||
struct ssl_sock_ctx *ctx = conn->xprt_ctx;
|
||||
smp->data.u.sint = (SSL_in_early_data(ctx->ssl) &&
|
||||
SSL_early_data_accepted(ctx->ssl));
|
||||
}
|
||||
#else
|
||||
smp->data.u.sint = ((conn->flags & CO_FL_EARLY_DATA) &&
|
||||
(conn->flags & (CO_FL_EARLY_SSL_HS | CO_FL_HANDSHAKE))) ? 1 : 0;
|
||||
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user