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

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

Issue 2225223002: Certificate Transparency: Change CTVerifyResult to have a single list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed redundant change & other coment Created 4 years, 4 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
« net/ssl/ssl_info.cc ('K') | « net/ssl/ssl_info.cc ('k') | no next file » | 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/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.h> 8 #include <string.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 // log used in the tests. 392 // log used in the tests.
393 sct[15] = 't'; 393 sct[15] = 't';
394 394
395 std::string sct_list; 395 std::string sct_list;
396 ct::EncodeSCTListForTesting(sct, &sct_list); 396 ct::EncodeSCTListForTesting(sct, &sct_list);
397 return sct_list; 397 return sct_list;
398 } 398 }
399 399
400 bool CheckForSingleVerifiedSCTInResult(const ct::CTVerifyResult& result, 400 bool CheckForSingleVerifiedSCTInResult(const ct::CTVerifyResult& result,
401 const std::string& log_description) { 401 const std::string& log_description) {
402 return (result.verified_scts.size() == 1U) && result.invalid_scts.empty() && 402 return (result.scts.size() == 1 &&
403 result.unknown_logs_scts.empty() && 403 result.scts[0].status == ct::SCT_STATUS_OK &&
404 result.verified_scts[0]->log_description == log_description; 404 result.scts[0].sct->log_description == log_description);
405 } 405 }
406 406
407 bool CheckForSCTOrigin(const ct::CTVerifyResult& result, 407 bool CheckForSCTOrigin(const ct::CTVerifyResult& result,
408 ct::SignedCertificateTimestamp::Origin origin) { 408 ct::SignedCertificateTimestamp::Origin origin) {
409 return (result.verified_scts.size() > 0) && 409 return (result.scts.size() > 0) && (result.scts[0].status == SCT_STATUS_OK) &&
eroman 2016/08/10 19:00:40 What are the guarantees around ordering? For more
Eran Messeri 2016/08/10 22:05:07 No guarantees indeed - Changed the code to look fo
410 (result.verified_scts[0]->origin == origin); 410 (result.scts[0].sct->origin == origin);
411 } 411 }
412 412
413 } // namespace ct 413 } // namespace ct
414 414
415 } // namespace net 415 } // namespace net
OLDNEW
« net/ssl/ssl_info.cc ('K') | « net/ssl/ssl_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698