diff options
author | jsing <> | 2017-11-28 16:34:20 +0000 |
---|---|---|
committer | jsing <> | 2017-11-28 16:34:20 +0000 |
commit | d092b4b25f0344f2f2a7f8c1f93097e63f193156 (patch) | |
tree | 14049ca61b6311dc9802d8f78a33685da6af3633 /src/lib/libssl/bytestring.h | |
parent | 2123407555a8a039a48a3bbe8fa9edbe43401803 (diff) | |
download | openbsd-d092b4b25f0344f2f2a7f8c1f93097e63f193156.tar.gz openbsd-d092b4b25f0344f2f2a7f8c1f93097e63f193156.tar.bz2 openbsd-d092b4b25f0344f2f2a7f8c1f93097e63f193156.zip |
Add CBB_discard_child(), which allows for a child CBB to be discarded.
Based on BoringSSL.
Diffstat (limited to 'src/lib/libssl/bytestring.h')
-rw-r--r-- | src/lib/libssl/bytestring.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libssl/bytestring.h b/src/lib/libssl/bytestring.h index d8c8e6ada6..2e89a5791a 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.16 2017/11/28 16:34:20 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); | |||
394 | int CBB_flush(CBB *cbb); | 394 | int 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 | */ | ||
400 | void 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. |