Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: net/der/parser.cc

Issue 1541213002: Adding OCSP Parser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix more null checks. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/der/parser.h ('k') | net/net.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/der/parser.cc
diff --git a/net/der/parser.cc b/net/der/parser.cc
index 6419549cf044998e362503b0b8b0300afc3343f5..0cb2600f5e6919606df2f422299e49cfd009f6cb 100644
--- a/net/der/parser.cc
+++ b/net/der/parser.cc
@@ -179,6 +179,13 @@ bool Parser::ReadSequence(Parser* out) {
return ReadConstructed(kSequence, out);
}
+bool Parser::ReadUint8(uint8_t* out) {
+ Input encoded_int;
+ if (!ReadTag(kInteger, &encoded_int))
+ return false;
+ return ParseUint8(encoded_int, out);
+}
+
bool Parser::ReadUint64(uint64_t* out) {
Input encoded_int;
if (!ReadTag(kInteger, &encoded_int))
@@ -193,6 +200,13 @@ bool Parser::ReadBitString(BitString* bit_string) {
return ParseBitString(value, bit_string);
}
+bool Parser::ReadGeneralizedTime(GeneralizedTime* out) {
+ Input value;
+ if (!ReadTag(kGeneralizedTime, &value))
+ return false;
+ return ParseGeneralizedTime(value, out);
+}
+
} // namespace der
} // namespace net
« no previous file with comments | « net/der/parser.h ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698