mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 06:11:32 +02:00
BUG/MEDIUM: ssl/sample: ssl_bc_* fetch keywords are broken.
Since the split between connections and conn-stream objects, this keywords are broken. This patch must be backported in 1.8
This commit is contained in:
parent
fd04fcf5ed
commit
eb8def9f34
@ -6578,8 +6578,8 @@ smp_fetch_ssl_x_key_alg(const struct arg *args, struct sample *smp, const char *
|
|||||||
static int
|
static int
|
||||||
smp_fetch_ssl_fc(const struct arg *args, struct sample *smp, const char *kw, void *private)
|
smp_fetch_ssl_fc(const struct arg *args, struct sample *smp, const char *kw, void *private)
|
||||||
{
|
{
|
||||||
struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin :
|
struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
|
||||||
smp->strm ? smp->strm->si[1].end : NULL);
|
smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL;
|
||||||
|
|
||||||
smp->data.type = SMP_T_BOOL;
|
smp->data.type = SMP_T_BOOL;
|
||||||
smp->data.u.sint = (conn && conn->xprt == &ssl_sock);
|
smp->data.u.sint = (conn && conn->xprt == &ssl_sock);
|
||||||
@ -6623,8 +6623,8 @@ smp_fetch_ssl_fc_is_resumed(const struct arg *args, struct sample *smp, const ch
|
|||||||
static int
|
static int
|
||||||
smp_fetch_ssl_fc_cipher(const struct arg *args, struct sample *smp, const char *kw, void *private)
|
smp_fetch_ssl_fc_cipher(const struct arg *args, struct sample *smp, const char *kw, void *private)
|
||||||
{
|
{
|
||||||
struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin :
|
struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
|
||||||
smp->strm ? smp->strm->si[1].end : NULL);
|
smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL;
|
||||||
|
|
||||||
smp->flags = 0;
|
smp->flags = 0;
|
||||||
if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
|
if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
|
||||||
@ -6649,9 +6649,8 @@ smp_fetch_ssl_fc_cipher(const struct arg *args, struct sample *smp, const char *
|
|||||||
static int
|
static int
|
||||||
smp_fetch_ssl_fc_alg_keysize(const struct arg *args, struct sample *smp, const char *kw, void *private)
|
smp_fetch_ssl_fc_alg_keysize(const struct arg *args, struct sample *smp, const char *kw, void *private)
|
||||||
{
|
{
|
||||||
struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin :
|
struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
|
||||||
smp->strm ? smp->strm->si[1].end : NULL);
|
smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL;
|
||||||
|
|
||||||
int sint;
|
int sint;
|
||||||
|
|
||||||
smp->flags = 0;
|
smp->flags = 0;
|
||||||
@ -6674,8 +6673,8 @@ smp_fetch_ssl_fc_alg_keysize(const struct arg *args, struct sample *smp, const c
|
|||||||
static int
|
static int
|
||||||
smp_fetch_ssl_fc_use_keysize(const struct arg *args, struct sample *smp, const char *kw, void *private)
|
smp_fetch_ssl_fc_use_keysize(const struct arg *args, struct sample *smp, const char *kw, void *private)
|
||||||
{
|
{
|
||||||
struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin :
|
struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
|
||||||
smp->strm ? smp->strm->si[1].end : NULL);
|
smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL;
|
||||||
|
|
||||||
smp->flags = 0;
|
smp->flags = 0;
|
||||||
if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
|
if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
|
||||||
@ -6745,8 +6744,8 @@ smp_fetch_ssl_fc_alpn(const struct arg *args, struct sample *smp, const char *kw
|
|||||||
static int
|
static int
|
||||||
smp_fetch_ssl_fc_protocol(const struct arg *args, struct sample *smp, const char *kw, void *private)
|
smp_fetch_ssl_fc_protocol(const struct arg *args, struct sample *smp, const char *kw, void *private)
|
||||||
{
|
{
|
||||||
struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin :
|
struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
|
||||||
smp->strm ? smp->strm->si[1].end : NULL);
|
smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL;
|
||||||
|
|
||||||
smp->flags = 0;
|
smp->flags = 0;
|
||||||
if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
|
if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
|
||||||
@ -6771,9 +6770,8 @@ static int
|
|||||||
smp_fetch_ssl_fc_session_id(const struct arg *args, struct sample *smp, const char *kw, void *private)
|
smp_fetch_ssl_fc_session_id(const struct arg *args, struct sample *smp, const char *kw, void *private)
|
||||||
{
|
{
|
||||||
#if OPENSSL_VERSION_NUMBER > 0x0090800fL
|
#if OPENSSL_VERSION_NUMBER > 0x0090800fL
|
||||||
struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin :
|
struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
|
||||||
smp->strm ? smp->strm->si[1].end : NULL);
|
smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL;
|
||||||
|
|
||||||
SSL_SESSION *ssl_sess;
|
SSL_SESSION *ssl_sess;
|
||||||
|
|
||||||
smp->flags = SMP_F_CONST;
|
smp->flags = SMP_F_CONST;
|
||||||
@ -6915,9 +6913,8 @@ static int
|
|||||||
smp_fetch_ssl_fc_unique_id(const struct arg *args, struct sample *smp, const char *kw, void *private)
|
smp_fetch_ssl_fc_unique_id(const struct arg *args, struct sample *smp, const char *kw, void *private)
|
||||||
{
|
{
|
||||||
#if OPENSSL_VERSION_NUMBER > 0x0090800fL
|
#if OPENSSL_VERSION_NUMBER > 0x0090800fL
|
||||||
struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin :
|
struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
|
||||||
smp->strm ? smp->strm->si[1].end : NULL);
|
smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL;
|
||||||
|
|
||||||
int finished_len;
|
int finished_len;
|
||||||
struct chunk *finished_trash;
|
struct chunk *finished_trash;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user