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

Issue 1576513002: Serialisation code for Certificate Transparency data (Closed)

Created:
4 years, 11 months ago by Rob Percival
Modified:
4 years, 7 months ago
Reviewers:
CC:
chromium-reviews, certificate-transparency-chrome_googlegroups.com, cbentzel+watch_chromium.org
Base URL:
ssh://caladan.lon.corp.google.com/usr/local/google/eranm/opensource_clients/chrome/src@sth_consistency_validation_2
Target Ref:
refs/pending/heads/sth_consistency_validation_2
Project:
chromium
Visibility:
Public.

Description

Serialisation code for Certificate Transparency data These data structures are taken from RFC6962-bis. They will be useful in the future when signed tree heads and consistency proofs are downloaded using the Component Updater and stored on disk. BUG=506227

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+658 lines, -8 lines) Patch
M net/cert/ct_serialization.h View 3 chunks +38 lines, -0 lines 2 comments Download
M net/cert/ct_serialization.cc View 5 chunks +190 lines, -0 lines 1 comment Download
M net/cert/ct_serialization_unittest.cc View 2 chunks +32 lines, -1 line 0 comments Download
A net/cert/ct_trans_item.h View 1 chunk +93 lines, -0 lines 0 comments Download
A net/cert/ct_trans_item.cc View 1 chunk +160 lines, -0 lines 0 comments Download
M net/cert/merkle_consistency_proof.h View 2 chunks +8 lines, -2 lines 0 comments Download
M net/cert/merkle_consistency_proof.cc View 2 chunks +21 lines, -2 lines 0 comments Download
M net/cert/signed_certificate_timestamp.h View 1 chunk +5 lines, -0 lines 0 comments Download
M net/cert/signed_certificate_timestamp.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M net/cert/signed_tree_head.h View 2 chunks +26 lines, -1 line 0 comments Download
A net/cert/signed_tree_head.cc View 1 chunk +50 lines, -0 lines 1 comment Download
M net/net.gypi View 2 chunks +3 lines, -0 lines 0 comments Download
M net/test/ct_test_util.h View 1 chunk +7 lines, -0 lines 1 comment Download
M net/test/ct_test_util.cc View 4 chunks +18 lines, -2 lines 1 comment Download

Messages

Total messages: 4 (3 generated)
Eran Messeri
4 years, 11 months ago (2016-01-14 12:46:45 UTC) #3
https://codereview.chromium.org/1576513002/diff/1/net/cert/ct_serialization.cc
File net/cert/ct_serialization.cc (right):

https://codereview.chromium.org/1576513002/diff/1/net/cert/ct_serialization.c...
net/cert/ct_serialization.cc:427: log_id.CopyToString(&output->log_id);
A common pattern in this file is to decode to a temporary object and swap it
with |output| only if decoding succeeded.

https://codereview.chromium.org/1576513002/diff/1/net/cert/ct_serialization.h
File net/cert/ct_serialization.h (right):

https://codereview.chromium.org/1576513002/diff/1/net/cert/ct_serialization.h...
net/cert/ct_serialization.h:24: struct TransItem;
Unnecessary as you're including ct_trans_item.h

https://codereview.chromium.org/1576513002/diff/1/net/cert/ct_serialization.h...
net/cert/ct_serialization.h:88: NET_EXPORT_PRIVATE bool
DecodeSignedTreeHead(base::StringPiece* input,
Comment that all of these are from RFC6962-bis, not RFC6962 (i.e. RFC6962 does
not need TLS encoding of these structures).

https://codereview.chromium.org/1576513002/diff/1/net/cert/signed_tree_head.cc
File net/cert/signed_tree_head.cc (right):

https://codereview.chromium.org/1576513002/diff/1/net/cert/signed_tree_head.c...
net/cert/signed_tree_head.cc:25: strncpy(this->sha256_root_hash,
sha256_root_hash, kSthRootHashLength);
You should use memcpy - strncpy breaks if there's a null character in the source
string.

https://codereview.chromium.org/1576513002/diff/1/net/test/ct_test_util.cc
File net/test/ct_test_util.cc (right):

https://codereview.chromium.org/1576513002/diff/1/net/test/ct_test_util.cc#ne...
net/test/ct_test_util.cc:287: const std::string
timestamp("\x0\x0\x1\x45\x3c\x5f\xb8\x35", 8);
Why not use the encoding functions you've added to avoid manually encoding these
values?

https://codereview.chromium.org/1576513002/diff/1/net/test/ct_test_util.h
File net/test/ct_test_util.h (right):

https://codereview.chromium.org/1576513002/diff/1/net/test/ct_test_util.h#new...
net/test/ct_test_util.h:85: std::string GetSampleSTH();
Since it belongs to RFC6962-bis the function name should reflect it -
GetSampleSTHDataV1?

Powered by Google App Engine
This is Rietveld 408576698