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

Side by Side Diff: net/cert/ct_serialization.cc

Issue 1953773002: Forward declare CT structs in ct_serialization.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « net/cert/ct_serialization.h ('k') | net/cert/ct_serialization_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/cert/ct_serialization.h" 5 #include "net/cert/ct_serialization.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
11 11
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/numerics/safe_math.h" 13 #include "base/numerics/safe_math.h"
14 #include "net/cert/signed_certificate_timestamp.h"
15 #include "net/cert/signed_tree_head.h"
14 16
15 namespace net { 17 namespace net {
16 18
17 namespace ct { 19 namespace ct {
18 20
19 namespace { 21 namespace {
20 22
21 // Note: length is always specified in bytes. 23 // Note: length is always specified in bytes.
22 // Signed Certificate Timestamp (SCT) Version length 24 // Signed Certificate Timestamp (SCT) Version length
23 const size_t kVersionLength = 1; 25 const size_t kVersionLength = 1;
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 bool EncodeSCTListForTesting(const base::StringPiece& sct, 409 bool EncodeSCTListForTesting(const base::StringPiece& sct,
408 std::string* output) { 410 std::string* output) {
409 std::string encoded_sct; 411 std::string encoded_sct;
410 return WriteVariableBytes(kSerializedSCTLengthBytes, sct, &encoded_sct) && 412 return WriteVariableBytes(kSerializedSCTLengthBytes, sct, &encoded_sct) &&
411 WriteVariableBytes(kSCTListLengthBytes, encoded_sct, output); 413 WriteVariableBytes(kSCTListLengthBytes, encoded_sct, output);
412 } 414 }
413 415
414 } // namespace ct 416 } // namespace ct
415 417
416 } // namespace net 418 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/ct_serialization.h ('k') | net/cert/ct_serialization_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698