From 4b096d9251fbf4f46e597bb2ac44a0829138544f Mon Sep 17 00:00:00 2001 From: jsing <> Date: Wed, 11 Oct 2017 17:35:00 +0000 Subject: Convert ssl3_client_hello() to CBB. As part of this, change ssl_cipher_list_to_bytes() to take a CBB argument, rather than a pointer/length. Some additional clean up/renames while here. Based on a diff from doug@ --- src/lib/libssl/t1_lib.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'src/lib/libssl/t1_lib.c') diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c index 8526ca167b..1cef08d094 100644 --- a/src/lib/libssl/t1_lib.c +++ b/src/lib/libssl/t1_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t1_lib.c,v 1.138 2017/10/11 16:51:39 jsing Exp $ */ +/* $OpenBSD: t1_lib.c,v 1.139 2017/10/11 17:35:00 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -661,29 +661,6 @@ tls12_get_req_sig_algs(SSL *s, unsigned char **sigalgs, size_t *sigalgs_len) *sigalgs_len = sizeof(tls12_sigalgs); } -unsigned char * -ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) -{ - size_t len; - CBB cbb; - - if (p >= limit) - return NULL; - - if (!CBB_init_fixed(&cbb, p, limit - p)) - return NULL; - if (!tlsext_clienthello_build(s, &cbb)) { - CBB_cleanup(&cbb); - return NULL; - } - if (!CBB_finish(&cbb, NULL, &len)) { - CBB_cleanup(&cbb); - return NULL; - } - - return (p + len); -} - int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, int n, int *al) -- cgit v1.2.3-55-g6feb