From ccb4f685d743447d79e76e1380f93ba28b5b8e1e Mon Sep 17 00:00:00 2001 From: jsing <> Date: Wed, 20 Jul 2022 06:32:24 +0000 Subject: Remove tls_buffer_set_data() and remove/revise callers. There is no way that tls_buffer_set_data() can currently work in conjunction with tls_buffer_expand(). This fact is currently hidden by the way that PHH works, which reads the same data from the record layer (which it needs to do anyway, since we may not have all of the handshake message in a single record). Since this is broken, mop it up and change the PHH callback to not provide the record data. ok beck@ tb@ --- src/lib/libssl/tls_buffer.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/lib/libssl/tls_buffer.c') diff --git a/src/lib/libssl/tls_buffer.c b/src/lib/libssl/tls_buffer.c index 5c0ca7e40e..9bb6b62e51 100644 --- a/src/lib/libssl/tls_buffer.c +++ b/src/lib/libssl/tls_buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_buffer.c,v 1.1 2021/10/23 13:12:14 jsing Exp $ */ +/* $OpenBSD: tls_buffer.c,v 1.2 2022/07/20 06:32:24 jsing Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing * @@ -76,15 +76,6 @@ tls_buffer_resize(struct tls_buffer *buf, size_t capacity) return 1; } -int -tls_buffer_set_data(struct tls_buffer *buf, CBS *data) -{ - if (!tls_buffer_resize(buf, CBS_len(data))) - return 0; - memcpy(buf->data, CBS_data(data), CBS_len(data)); - return 1; -} - ssize_t tls_buffer_extend(struct tls_buffer *buf, size_t len, tls_read_cb read_cb, void *cb_arg) -- cgit v1.2.3-55-g6feb