summaryrefslogtreecommitdiff
path: root/lib/libssl/bytestring.h
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2021-12-15 17:23:35 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2021-12-15 17:23:35 +0000
commitbcc0303cc5c37074fa0f13de3a178119b3ef35ec (patch)
tree8ab48be9fc05e92ffc7f6b9d14b1337dbe7ad92b /lib/libssl/bytestring.h
parentae8679b78c3aafd49d62d1cdbf3c85f013e74733 (diff)
Provide CBS_get_last_u8().
This will be used in the TLSv1.3 record layer. From BoringSSL. ok tb@
Diffstat (limited to 'lib/libssl/bytestring.h')
-rw-r--r--lib/libssl/bytestring.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libssl/bytestring.h b/lib/libssl/bytestring.h
index 9e55dd44d64..4ab2828d09f 100644
--- a/lib/libssl/bytestring.h
+++ b/lib/libssl/bytestring.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bytestring.h,v 1.19 2021/05/16 10:58:27 jsing Exp $ */
+/* $OpenBSD: bytestring.h,v 1.20 2021/12/15 17:23:34 jsing Exp $ */
/*
* Copyright (c) 2014, Google Inc.
*
@@ -134,6 +134,12 @@ int CBS_get_u24(CBS *cbs, uint32_t *out);
int CBS_get_u32(CBS *cbs, uint32_t *out);
/*
+ * CBS_get_last_u8 sets |*out| to the last uint8_t from |cbs| and shortens
+ * |cbs|. It returns one on success and zero on error.
+ */
+int CBS_get_last_u8(CBS *cbs, uint8_t *out);
+
+/*
* CBS_get_bytes sets |*out| to the next |len| bytes from |cbs| and advances
* |cbs|. It returns one on success and zero on error.
*/