summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDoug Hogan <doug@cvs.openbsd.org>2015-02-07 02:02:29 +0000
committerDoug Hogan <doug@cvs.openbsd.org>2015-02-07 02:02:29 +0000
commit05bf44e956b296500c0e3c1e557d50648fe6c4c9 (patch)
tree5559b3c72af09b9e0aa69993846bfa9801d8756e /lib
parent8783ebc33ea99767532d1d9396e84f04bcddf9e7 (diff)
Fix typo and ASN.1 tag number range comment in bytestring.h.
CBS_get_asn1() and CBS_get_any_asn1_element() only support the single byte ASN.1 identifier octets (aka short form tags). Tag number 31 is the start of the multi-byte long form per X.690 section 8.1.2.4. From BoringSSL commit 2683af70e73f116e14db2bca6290fa4a010a2ee4 ok miod@
Diffstat (limited to 'lib')
-rw-r--r--lib/libssl/src/ssl/bytestring.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libssl/src/ssl/bytestring.h b/lib/libssl/src/ssl/bytestring.h
index 09414af0568..209bb38e24a 100644
--- a/lib/libssl/src/ssl/bytestring.h
+++ b/lib/libssl/src/ssl/bytestring.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bytestring.h,v 1.2 2015/02/06 22:22:33 doug Exp $ */
+/* $OpenBSD: bytestring.h,v 1.3 2015/02/07 02:02:28 doug Exp $ */
/*
* Copyright (c) 2014, Google Inc.
*
@@ -56,7 +56,7 @@ void CBS_init(CBS *cbs, const uint8_t *data, size_t len);
int CBS_skip(CBS *cbs, size_t len);
/*
- * CBS_data returns a pointer to the contains of |cbs|.
+ * CBS_data returns a pointer to the contents of |cbs|.
*/
const uint8_t *CBS_data(const CBS *cbs);
@@ -170,7 +170,7 @@ int CBS_get_u24_length_prefixed(CBS *cbs, CBS *out);
* element must match |tag_value|. It returns one on success and zero
* on error.
*
- * Tag numbers greater than 31 are not supported.
+ * Tag numbers greater than 30 are not supported (i.e. short form only).
*/
int CBS_get_asn1(CBS *cbs, CBS *out, unsigned tag_value);
@@ -197,7 +197,7 @@ int CBS_peek_asn1_tag(const CBS *cbs, unsigned tag_value);
* header. Each of |out|, |out_tag|, and |out_header_len| may be NULL to ignore
* the value.
*
- * Tag numbers greater than 31 are not supported.
+ * Tag numbers greater than 30 are not supported (i.e. short form only).
*/
int CBS_get_any_asn1_element(CBS *cbs, CBS *out, unsigned *out_tag,
size_t *out_header_len);