summaryrefslogtreecommitdiff
path: root/src/lib/libssl/t1_lib.c
diff options
context:
space:
mode:
authorjsing <>2017-10-11 16:51:39 +0000
committerjsing <>2017-10-11 16:51:39 +0000
commite64dc34242390cd4a16eb683e606c5beccbb9aa7 (patch)
tree2fe8124781fd11334215e44437c46397432bc7a3 /src/lib/libssl/t1_lib.c
parent62790ade0e2b202d99093dd2d8dc2df8284e2543 (diff)
downloadopenbsd-e64dc34242390cd4a16eb683e606c5beccbb9aa7.tar.gz
openbsd-e64dc34242390cd4a16eb683e606c5beccbb9aa7.tar.bz2
openbsd-e64dc34242390cd4a16eb683e606c5beccbb9aa7.zip
Fully convert ssl3_send_server_hello() to CBB.
Based on a diff from doug@
Diffstat (limited to 'src/lib/libssl/t1_lib.c')
-rw-r--r--src/lib/libssl/t1_lib.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c
index 0d03b45a97..8526ca167b 100644
--- a/src/lib/libssl/t1_lib.c
+++ b/src/lib/libssl/t1_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_lib.c,v 1.137 2017/08/30 16:44:37 jsing Exp $ */ 1/* $OpenBSD: t1_lib.c,v 1.138 2017/10/11 16:51:39 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -684,29 +684,6 @@ ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit)
684 return (p + len); 684 return (p + len);
685} 685}
686 686
687unsigned char *
688ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit)
689{
690 size_t len;
691 CBB cbb;
692
693 if (p >= limit)
694 return NULL;
695
696 if (!CBB_init_fixed(&cbb, p, limit - p))
697 return NULL;
698 if (!tlsext_serverhello_build(s, &cbb)) {
699 CBB_cleanup(&cbb);
700 return NULL;
701 }
702 if (!CBB_finish(&cbb, NULL, &len)) {
703 CBB_cleanup(&cbb);
704 return NULL;
705 }
706
707 return (p + len);
708}
709
710int 687int
711ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, 688ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d,
712 int n, int *al) 689 int n, int *al)