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

Issue 1295943002: Add a function for validating a DER-encoded INTEGER. (Closed)

Created:
5 years, 4 months ago by eroman
Modified:
5 years, 4 months ago
Reviewers:
nharper, davidben
CC:
chromium-reviews, cbentzel+watch_chromium.org, davidben
Base URL:
https://chromium.googlesource.com/chromium/src.git@cert_parsing
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a function for validating a DER-encoded INTEGER. This also modifies der::ParseUint64() to support the full uint64_t range. BUG=410574 Committed: https://crrev.com/6a9b7cbc41c4a6fe809d3e7f4765f251c0429371 Cr-Commit-Position: refs/heads/master@{#344081}

Patch Set 1 #

Total comments: 8

Patch Set 2 : address comments #

Total comments: 4

Patch Set 3 : remove numeric_length as an out-parameter of IsValidInteger #

Total comments: 4

Patch Set 4 : Address final comments (change func name, and out_negative --> negative) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -36 lines) Patch
M net/der/parse_values.h View 1 2 1 chunk +14 lines, -3 lines 0 comments Download
M net/der/parse_values.cc View 1 2 3 2 chunks +54 lines, -26 lines 0 comments Download
M net/der/parse_values_unittest.cc View 1 2 2 chunks +60 lines, -7 lines 0 comments Download

Messages

Total messages: 19 (6 generated)
eroman
@nharper: For the main review. I am using this function in https://codereview.chromium.org/1279963003.
5 years, 4 months ago (2015-08-14 20:42:48 UTC) #2
nharper
https://codereview.chromium.org/1295943002/diff/1/net/der/parse_values.cc File net/der/parse_values.cc (right): https://codereview.chromium.org/1295943002/diff/1/net/der/parse_values.cc#newcode158 net/der/parse_values.cc:158: *out_negative = first_byte & 0x80; I'm not familiar with ...
5 years, 4 months ago (2015-08-14 22:23:41 UTC) #3
eroman
https://codereview.chromium.org/1295943002/diff/1/net/der/parse_values.cc File net/der/parse_values.cc (right): https://codereview.chromium.org/1295943002/diff/1/net/der/parse_values.cc#newcode158 net/der/parse_values.cc:158: *out_negative = first_byte & 0x80; On 2015/08/14 22:23:41, nharper ...
5 years, 4 months ago (2015-08-14 23:19:38 UTC) #4
nharper
lgtm David, can you look over IsValidInteger to check for any integer size conversion issues? ...
5 years, 4 months ago (2015-08-14 23:33:15 UTC) #6
davidben
https://codereview.chromium.org/1295943002/diff/20001/net/der/parse_values.h File net/der/parse_values.h (right): https://codereview.chromium.org/1295943002/diff/20001/net/der/parse_values.h#newcode32 net/der/parse_values.h:32: // and false otherwise (zero counts as !negative). Nit: ...
5 years, 4 months ago (2015-08-17 17:20:42 UTC) #7
eroman
https://codereview.chromium.org/1295943002/diff/20001/net/der/parse_values.h File net/der/parse_values.h (right): https://codereview.chromium.org/1295943002/diff/20001/net/der/parse_values.h#newcode32 net/der/parse_values.h:32: // and false otherwise (zero counts as !negative). On ...
5 years, 4 months ago (2015-08-17 23:57:36 UTC) #8
davidben
lgtm https://codereview.chromium.org/1295943002/diff/40001/net/der/parse_values.cc File net/der/parse_values.cc (right): https://codereview.chromium.org/1295943002/diff/40001/net/der/parse_values.cc#newcode123 net/der/parse_values.cc:123: size_t GetNumberOfBytesInInteger(const Input& in) { I would maybe ...
5 years, 4 months ago (2015-08-18 19:44:16 UTC) #9
eroman
https://codereview.chromium.org/1295943002/diff/40001/net/der/parse_values.cc File net/der/parse_values.cc (right): https://codereview.chromium.org/1295943002/diff/40001/net/der/parse_values.cc#newcode123 net/der/parse_values.cc:123: size_t GetNumberOfBytesInInteger(const Input& in) { On 2015/08/18 19:44:15, David ...
5 years, 4 months ago (2015-08-18 19:54:13 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1295943002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1295943002/60001
5 years, 4 months ago (2015-08-18 19:54:51 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/122711)
5 years, 4 months ago (2015-08-18 20:55:06 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1295943002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1295943002/60001
5 years, 4 months ago (2015-08-18 20:57:32 UTC) #17
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 4 months ago (2015-08-18 23:51:57 UTC) #18
commit-bot: I haz the power
5 years, 4 months ago (2015-08-18 23:52:43 UTC) #19
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/6a9b7cbc41c4a6fe809d3e7f4765f251c0429371
Cr-Commit-Position: refs/heads/master@{#344081}

Powered by Google App Engine
This is Rietveld 408576698