summaryrefslogtreecommitdiff
path: root/src/lib/libssl/bytestring.h
diff options
context:
space:
mode:
authorjsing <>2017-12-09 13:43:25 +0000
committerjsing <>2017-12-09 13:43:25 +0000
commit8c1ed8b7e3af4b96d94cbf18ef16743f39476d74 (patch)
tree42a9145bbb9ff527ffacfe6e427e163b8c0dba6f /src/lib/libssl/bytestring.h
parent2d05f34ac9268051cf5db76a1727156ebad86c0f (diff)
downloadopenbsd-8c1ed8b7e3af4b96d94cbf18ef16743f39476d74.tar.gz
openbsd-8c1ed8b7e3af4b96d94cbf18ef16743f39476d74.tar.bz2
openbsd-8c1ed8b7e3af4b96d94cbf18ef16743f39476d74.zip
MFC: Correct TLS extensions handling when no extensions are present.
If no TLS extensions are present in a client hello or server hello, omit the entire extensions block, rather than including it with a length of zero. ok beck@ inoguchi@ Thanks to Eric Elena <eric at voguemerry dot com> for providing packet captures and testing the fix.
Diffstat (limited to 'src/lib/libssl/bytestring.h')
-rw-r--r--src/lib/libssl/bytestring.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libssl/bytestring.h b/src/lib/libssl/bytestring.h
index d8c8e6ada6..42d3d5d6d1 100644
--- a/src/lib/libssl/bytestring.h
+++ b/src/lib/libssl/bytestring.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bytestring.h,v 1.15 2016/11/04 18:28:58 guenther Exp $ */ 1/* $OpenBSD: bytestring.h,v 1.15.6.1 2017/12/09 13:43:25 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014, Google Inc. 3 * Copyright (c) 2014, Google Inc.
4 * 4 *
@@ -394,6 +394,12 @@ int CBB_finish(CBB *cbb, uint8_t **out_data, size_t *out_len);
394int CBB_flush(CBB *cbb); 394int CBB_flush(CBB *cbb);
395 395
396/* 396/*
397 * CBB_discard_child discards the current unflushed child of |cbb|. Neither the
398 * child's contents nor the length prefix will be included in the output.
399 */
400void CBB_discard_child(CBB *cbb);
401
402/*
397 * CBB_add_u8_length_prefixed sets |*out_contents| to a new child of |cbb|. The 403 * CBB_add_u8_length_prefixed sets |*out_contents| to a new child of |cbb|. The
398 * data written to |*out_contents| will be prefixed in |cbb| with an 8-bit 404 * data written to |*out_contents| will be prefixed in |cbb| with an 8-bit
399 * length. It returns one on success or zero on error. 405 * length. It returns one on success or zero on error.