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

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

Issue 67513008: Certificate Transparency: Add the high-level interface for verifying SCTs over multiple logs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
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 "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 log_id.CopyToString(&result.log_id); 347 log_id.CopyToString(&result.log_id);
348 extensions.CopyToString(&result.extensions); 348 extensions.CopyToString(&result.extensions);
349 result.timestamp = 349 result.timestamp =
350 base::Time::UnixEpoch() + 350 base::Time::UnixEpoch() +
351 base::TimeDelta::FromMilliseconds(static_cast<int64>(timestamp)); 351 base::TimeDelta::FromMilliseconds(static_cast<int64>(timestamp));
352 352
353 *output = result; 353 *output = result;
354 return true; 354 return true;
355 } 355 }
356 356
357 bool EncodeSCTListForTesting(const base::StringPiece& sct,
358 std::string* output) {
359 std::string encoded_sct;
360 return WriteVariableBytes(kSerializedSCTLengthBytes, sct, &encoded_sct) &&
361 WriteVariableBytes(kSCTListLengthBytes, encoded_sct, output);
Ryan Sleevi 2013/11/20 01:09:42 style nit: indent 4 spaces (or use clang-format /
Eran M. (Google) 2013/11/20 19:45:06 Done.
362 }
363
357 } // namespace ct 364 } // namespace ct
358 365
359 } // namespace net 366 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698