OLD | NEW |
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/multi_log_ct_verifier.h" | 5 #include "net/cert/multi_log_ct_verifier.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 return false; | 91 return false; |
92 } | 92 } |
93 | 93 |
94 base::DictionaryValue* the_sct; | 94 base::DictionaryValue* the_sct; |
95 if (!verified_scts->GetDictionary(0, &the_sct)) | 95 if (!verified_scts->GetDictionary(0, &the_sct)) |
96 return false; | 96 return false; |
97 | 97 |
98 std::string origin; | 98 std::string origin; |
99 if (!the_sct->GetString("origin", &origin)) | 99 if (!the_sct->GetString("origin", &origin)) |
100 return false; | 100 return false; |
101 if (origin != "embedded_in_certificate") | 101 if (origin != "Embedded in certificate") |
102 return false; | 102 return false; |
103 | 103 |
104 base::ListValue* other_scts; | 104 base::ListValue* other_scts; |
105 if (!parsed.GetListValue("invalid_scts", &other_scts) || | 105 if (!parsed.GetListValue("invalid_scts", &other_scts) || |
106 !other_scts->empty()) { | 106 !other_scts->empty()) { |
107 return false; | 107 return false; |
108 } | 108 } |
109 | 109 |
110 if (!parsed.GetListValue("unknown_logs_scts", &other_scts) || | 110 if (!parsed.GetListValue("unknown_logs_scts", &other_scts) || |
111 !other_scts->empty()) { | 111 !other_scts->empty()) { |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 Mock::VerifyAndClearExpectations(&observer); | 301 Mock::VerifyAndClearExpectations(&observer); |
302 | 302 |
303 EXPECT_CALL(observer, OnSCTVerified(embedded_sct_chain_.get(), _)).Times(0); | 303 EXPECT_CALL(observer, OnSCTVerified(embedded_sct_chain_.get(), _)).Times(0); |
304 verifier_->SetObserver(nullptr); | 304 verifier_->SetObserver(nullptr); |
305 ASSERT_TRUE(VerifySinglePrecertificateChain(embedded_sct_chain_)); | 305 ASSERT_TRUE(VerifySinglePrecertificateChain(embedded_sct_chain_)); |
306 } | 306 } |
307 | 307 |
308 } // namespace | 308 } // namespace |
309 | 309 |
310 } // namespace net | 310 } // namespace net |
OLD | NEW |