From d740eaab5e7724508dd84cde4e4268f487ee22e2 Mon Sep 17 00:00:00 2001 From: doug <> Date: Sat, 7 Feb 2015 02:02:28 +0000 Subject: 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@ --- src/lib/libssl/bytestring.h | 8 ++++---- src/lib/libssl/src/ssl/bytestring.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libssl/bytestring.h b/src/lib/libssl/bytestring.h index 09414af056..209bb38e24 100644 --- a/src/lib/libssl/bytestring.h +++ b/src/lib/libssl/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); diff --git a/src/lib/libssl/src/ssl/bytestring.h b/src/lib/libssl/src/ssl/bytestring.h index 09414af056..209bb38e24 100644 --- a/src/lib/libssl/src/ssl/bytestring.h +++ b/src/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); -- cgit v1.2.3-55-g6feb