| Index: net/der/parser.h
|
| diff --git a/net/der/parser.h b/net/der/parser.h
|
| index 901413363e3835c5bc16a6cf4038109184038fca..0eff35656af410c2f6dc28f1d5ac1c811cfe299c 100644
|
| --- a/net/der/parser.h
|
| +++ b/net/der/parser.h
|
| @@ -145,8 +145,24 @@ class NET_EXPORT Parser {
|
| // current value. Note that DER-encoded integers are arbitrary precision,
|
| // so this method will fail for valid input that represents an integer
|
| // outside the range of an int64.
|
| + //
|
| + // Note that on failure the Parser is left in an undefined state (the
|
| + // input may or may not have been advanced).
|
| bool ReadUint64(uint64_t* out) WARN_UNUSED_RESULT;
|
|
|
| + // Reads a BIT STRING. On success |bytes| is set to the octet string
|
| + // containing the bits, and |unused_bits| is set to the number of
|
| + // bits (in the range 0-7) that are unused.
|
| + //
|
| + // Note that on failure the Parser is left in an undefined state (the
|
| + // input may or may not have been advanced).
|
| + bool ReadBitString(Input* bytes, uint8_t* unused_bits) WARN_UNUSED_RESULT;
|
| +
|
| + // Same as ReadBitString() except it will only succeed when the number of
|
| + // bits in the bit string is a multiple of 8. In other words, there can be
|
| + // no unused bits in the octet string |*bytes|.
|
| + bool ReadBitStringNoUnusedBits(Input* bytes) WARN_UNUSED_RESULT;
|
| +
|
| // Lower level methods. The previous methods couple reading data from the
|
| // input with advancing the Parser's internal pointer to the next TLV; these
|
| // lower level methods decouple those two steps into methods that read from
|
|
|