diff options
| author | jsing <> | 2017-10-11 16:51:39 +0000 |
|---|---|---|
| committer | jsing <> | 2017-10-11 16:51:39 +0000 |
| commit | 3903e57ba9926fc949f9d917a0b46c7b6f7001db (patch) | |
| tree | 2fe8124781fd11334215e44437c46397432bc7a3 /src/lib/libssl/t1_lib.c | |
| parent | 2a00ba595978d3507a5c493eceb0ea8597c6be56 (diff) | |
| download | openbsd-3903e57ba9926fc949f9d917a0b46c7b6f7001db.tar.gz openbsd-3903e57ba9926fc949f9d917a0b46c7b6f7001db.tar.bz2 openbsd-3903e57ba9926fc949f9d917a0b46c7b6f7001db.zip | |
Fully convert ssl3_send_server_hello() to CBB.
Based on a diff from doug@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/t1_lib.c | 25 |
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 | ||
| 687 | unsigned char * | ||
| 688 | ssl_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 | |||
| 710 | int | 687 | int |
| 711 | ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | 688 | ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, |
| 712 | int n, int *al) | 689 | int n, int *al) |
