Pārlūkot izejas kodu

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.

Change-Id: I892600f4946e880a4ff03d219181116ef04f5372
Reviewed-on: https://boringssl-review.googlesource.com/3241
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
Doug Hogan pirms 9 gadiem
committed by Adam Langley
vecāks
revīzija
2683af70e7
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. +3
    -3
      include/openssl/bytestring.h

+ 3
- 3
include/openssl/bytestring.h Parādīt failu

@@ -47,7 +47,7 @@ OPENSSL_EXPORT void CBS_init(CBS *cbs, const uint8_t *data, size_t len);
* otherwise. */
OPENSSL_EXPORT 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|. */
OPENSSL_EXPORT const uint8_t *CBS_data(const CBS *cbs);

/* CBS_len returns the number of bytes remaining in |cbs|. */
@@ -134,7 +134,7 @@ OPENSSL_EXPORT 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). */
OPENSSL_EXPORT int CBS_get_asn1(CBS *cbs, CBS *out, unsigned tag_value);

/* CBS_get_asn1_element acts like |CBS_get_asn1| but |out| will include the
@@ -155,7 +155,7 @@ OPENSSL_EXPORT 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). */
OPENSSL_EXPORT int CBS_get_any_asn1_element(CBS *cbs, CBS *out,
unsigned *out_tag,
size_t *out_header_len);


Notiek ielāde…
Atcelt
Saglabāt