Chromium Code Reviews| Index: net/der/parse_values.h |
| diff --git a/net/der/parse_values.h b/net/der/parse_values.h |
| index fbe1d88b80b694e384f63379812c9bc536fc02e6..724ecf7648253812c2c98bb0bdf26bae479764b5 100644 |
| --- a/net/der/parse_values.h |
| +++ b/net/der/parse_values.h |
| @@ -30,6 +30,19 @@ NET_EXPORT bool ParseBoolRelaxed(const Input& in, bool* out) WARN_UNUSED_RESULT; |
| // uint64_t, is negative, or if there is an error reading the integer. |
| NET_EXPORT bool ParseUint64(const Input& in, uint64_t* out) WARN_UNUSED_RESULT; |
| +// Reads a DER-encoded ASN.1 BIT STRING value from |in| and puts the resulting |
| +// octet string into |bytes|, and the number of unused bits into |unused_bits|. |
| +// Returns true on success, otherwise returns false and does not modify the |
| +// out-parameters. |
| +// |
| +// On success it can be assumed that: |
| +// * |*unused_bits| < 8 |
| +// * The final byte of |bytes| has its |*unused_bits| least significant bits |
| +// set to 0. |
| +NET_EXPORT bool ParseBitString(const Input& in, |
| + Input* bytes, |
| + uint8_t* unused_bits) WARN_UNUSED_RESULT; |
|
nharper
2015/07/21 23:23:47
Should unused_bits be a size_t* instead? I realize
eroman
2015/07/22 17:05:23
I would argue for a uint8_t on the grounds that it
|
| + |
| struct GeneralizedTime { |
| uint16_t year; |
| uint8_t month; |