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

Side by Side Diff: net/test/ct_test_util.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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
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/test/ct_test_util.h" 5 #include "net/test/ct_test_util.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/base64.h" 11 #include "base/base64.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/string_piece.h" 13 #include "base/strings/string_piece.h"
14 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
15 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
16 #include "net/cert/ct_serialization.h" 16 #include "net/cert/ct_serialization.h"
17 #include "net/cert/signed_certificate_timestamp.h" 17 #include "net/cert/signed_certificate_timestamp.h"
18 #include "net/cert/signed_tree_head.h" 18 #include "net/cert/signed_tree_head.h"
19 #include "net/cert/x509_certificate.h" 19 #include "net/cert/x509_certificate.h"
20 20
21 namespace net { 21 namespace net {
22 22
23 namespace ct { 23 namespace ct {
24 24
25 namespace { 25 namespace {
26 26
27 std::string HexToBytes(const char* hex_data) { 27 std::string HexToBytes(const char* hex_data) {
28 std::vector<uint8> output; 28 std::vector<uint8_t> output;
29 std::string result; 29 std::string result;
30 if (base::HexStringToBytes(hex_data, &output)) 30 if (base::HexStringToBytes(hex_data, &output))
31 result.assign(reinterpret_cast<const char*>(&output[0]), output.size()); 31 result.assign(reinterpret_cast<const char*>(&output[0]), output.size());
32 return result; 32 return result;
33 } 33 }
34 34
35 // The following test vectors are from 35 // The following test vectors are from
36 // http://code.google.com/p/certificate-transparency 36 // http://code.google.com/p/certificate-transparency
37 37
38 const char kDefaultDerCert[] = 38 const char kDefaultDerCert[] =
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 consistency_proof_json += std::string(","); 325 consistency_proof_json += std::string(",");
326 } 326 }
327 consistency_proof_json += std::string("]}"); 327 consistency_proof_json += std::string("]}");
328 328
329 return consistency_proof_json; 329 return consistency_proof_json;
330 } 330 }
331 331
332 } // namespace ct 332 } // namespace ct
333 333
334 } // namespace net 334 } // namespace net
OLDNEW
« no previous file with comments | « net/test/ct_test_util.h ('k') | net/test/embedded_test_server/android/embedded_test_server_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698