summaryrefslogtreecommitdiffstats
path: root/lib/libssl/t1_lib.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2017-10-11 17:35:00 +0000
committerjsing <jsing@openbsd.org>2017-10-11 17:35:00 +0000
commitf63b027d1ba2131ffa63033a25a12824888ab509 (patch)
treef72c6069a0a2398804d03ffc280331b1612d6d0e /lib/libssl/t1_lib.c
parentinput files should not be .o; from Scott Cheloha (diff)
downloadwireguard-openbsd-f63b027d1ba2131ffa63033a25a12824888ab509.tar.xz
wireguard-openbsd-f63b027d1ba2131ffa63033a25a12824888ab509.zip
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@
Diffstat (limited to 'lib/libssl/t1_lib.c')
-rw-r--r--lib/libssl/t1_lib.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/lib/libssl/t1_lib.c b/lib/libssl/t1_lib.c
index 8526ca167b9..1cef08d0946 100644
--- a/lib/libssl/t1_lib.c
+++ b/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)