summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_lib.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2022-10-21 16:12:31 +0100
committerMatt Caswell <matt@openssl.org>2022-10-27 10:52:52 +0100
commit7eb39ecb299db3eade11946f9385f5dee1d458d3 (patch)
treed877abd221285d0a959b7766982e5e00ca31d62b /ssl/ssl_lib.c
parent225f94e818d9f8cb9e272fb9128b4b0ef88a0cbc (diff)
Make SSL_alloc_buffers() and SSL_free_buffers() work again
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19472)
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r--ssl/ssl_lib.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 3b3eda4001..e71f0b5da5 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -6365,22 +6365,22 @@ int SSL_free_buffers(SSL *ssl)
rl = &sc->rlayer;
- if (RECORD_LAYER_read_pending(rl) || RECORD_LAYER_write_pending(rl))
- return 0;
-
- RECORD_LAYER_release(rl);
- return 1;
+ return rl->rrlmethod->free_buffers(rl->rrl)
+ && rl->wrlmethod->free_buffers(rl->wrl);
}
int SSL_alloc_buffers(SSL *ssl)
{
+ RECORD_LAYER *rl;
SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(ssl);
if (sc == NULL)
return 0;
- /* TODO(RECLAYER): Need a way to make this happen in the record layer */
- return 1;
+ rl = &sc->rlayer;
+
+ return rl->rrlmethod->alloc_buffers(rl->rrl)
+ && rl->wrlmethod->alloc_buffers(rl->wrl);
}
void SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb)