BUILD: ssl: guard openssl specific with SSL_READ_EARLY_DATA_SUCCESS

let us switch to SSL_READ_EARLY_DATA_SUCCESS instead of openssl versions
This commit is contained in:
Ilya Shipitsin 2021-01-07 11:59:58 +05:00 committed by William Lallemand
parent ec36c91c69
commit 761d64c7ae

View File

@ -5630,7 +5630,7 @@ static struct task *ssl_sock_io_cb(struct task *t, void *context, unsigned short
goto leave;
}
}
#if (HA_OPENSSL_VERSION_NUMBER >= 0x10101000L)
#ifdef SSL_READ_EARLY_DATA_SUCCESS
/* If we have early data and somebody wants to receive, let them */
else if (b_data(&ctx->early_buf) && ctx->subs &&
ctx->subs->events & SUB_RETRY_RECV) {
@ -5669,7 +5669,7 @@ static size_t ssl_sock_to_buf(struct connection *conn, void *xprt_ctx, struct bu
if (!ctx)
goto out_error;
#if (HA_OPENSSL_VERSION_NUMBER >= 0x10101000L)
#ifdef SSL_READ_EARLY_DATA_SUCCESS
if (b_data(&ctx->early_buf)) {
try = b_contig_space(buf);
if (try > b_data(&ctx->early_buf))