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

Side by Side Diff: chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc

Issue 1951233003: Consistent SignedCertificateTimestamp::Version and SignedTreeHead::Version (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 | « no previous file | net/cert/ct_objects_extractor_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/ssl/chrome_expect_ct_reporter.h" 5 #include "chrome/browser/ssl/chrome_expect_ct_reporter.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void MakeTestSCTAndStatus( 59 void MakeTestSCTAndStatus(
60 net::ct::SignedCertificateTimestamp::Origin origin, 60 net::ct::SignedCertificateTimestamp::Origin origin,
61 const std::string& log_id, 61 const std::string& log_id,
62 const std::string& extensions, 62 const std::string& extensions,
63 const std::string& signature_data, 63 const std::string& signature_data,
64 const base::Time& timestamp, 64 const base::Time& timestamp,
65 net::ct::SCTVerifyStatus status, 65 net::ct::SCTVerifyStatus status,
66 net::SignedCertificateTimestampAndStatusList* sct_list) { 66 net::SignedCertificateTimestampAndStatusList* sct_list) {
67 scoped_refptr<net::ct::SignedCertificateTimestamp> sct( 67 scoped_refptr<net::ct::SignedCertificateTimestamp> sct(
68 new net::ct::SignedCertificateTimestamp()); 68 new net::ct::SignedCertificateTimestamp());
69 sct->version = net::ct::SignedCertificateTimestamp::SCT_VERSION_1; 69 sct->version = net::ct::SignedCertificateTimestamp::V1;
70 sct->log_id = log_id; 70 sct->log_id = log_id;
71 sct->extensions = extensions; 71 sct->extensions = extensions;
72 sct->timestamp = timestamp; 72 sct->timestamp = timestamp;
73 sct->signature.signature_data = signature_data; 73 sct->signature.signature_data = signature_data;
74 sct->origin = origin; 74 sct->origin = origin;
75 sct_list->push_back(net::SignedCertificateTimestampAndStatus(sct, status)); 75 sct_list->push_back(net::SignedCertificateTimestampAndStatus(sct, status));
76 } 76 }
77 77
78 // Checks that |expected_cert| matches the PEM-encoded certificate chain 78 // Checks that |expected_cert| matches the PEM-encoded certificate chain
79 // in |chain|. 79 // in |chain|.
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 net::HostPortPair host_port("example.test", 443); 441 net::HostPortPair host_port("example.test", 443);
442 GURL report_uri("http://example-report.test"); 442 GURL report_uri("http://example-report.test");
443 443
444 // Check that the report is sent and contains the correct information. 444 // Check that the report is sent and contains the correct information.
445 reporter.OnExpectCTFailed(host_port, report_uri, ssl_info); 445 reporter.OnExpectCTFailed(host_port, report_uri, ssl_info);
446 EXPECT_EQ(report_uri, sender->latest_report_uri()); 446 EXPECT_EQ(report_uri, sender->latest_report_uri());
447 EXPECT_FALSE(sender->latest_serialized_report().empty()); 447 EXPECT_FALSE(sender->latest_serialized_report().empty());
448 ASSERT_NO_FATAL_FAILURE(CheckExpectCTReport( 448 ASSERT_NO_FATAL_FAILURE(CheckExpectCTReport(
449 sender->latest_serialized_report(), host_port, ssl_info)); 449 sender->latest_serialized_report(), host_port, ssl_info));
450 } 450 }
OLDNEW
« no previous file with comments | « no previous file | net/cert/ct_objects_extractor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698