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

Side by Side Diff: net/ssl/ssl_info.cc

Issue 1452053005: SSL - minor cleanup. Added UpdateSignedCertificateTimestamps to SSLInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « net/ssl/ssl_info.h ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ssl/ssl_info.h" 5 #include "net/ssl/ssl_info.h"
6 6
7 #include "base/pickle.h" 7 #include "base/pickle.h"
8 #include "net/cert/cert_status_flags.h" 8 #include "net/cert/cert_status_flags.h"
9 #include "net/cert/signed_certificate_timestamp.h" 9 #include "net/cert/signed_certificate_timestamp.h"
10 #include "net/cert/x509_certificate.h" 10 #include "net/cert/x509_certificate.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 handshake_type = HANDSHAKE_UNKNOWN; 57 handshake_type = HANDSHAKE_UNKNOWN;
58 public_key_hashes.clear(); 58 public_key_hashes.clear();
59 signed_certificate_timestamps.clear(); 59 signed_certificate_timestamps.clear();
60 pinning_failure_log.clear(); 60 pinning_failure_log.clear();
61 } 61 }
62 62
63 void SSLInfo::SetCertError(int error) { 63 void SSLInfo::SetCertError(int error) {
64 cert_status |= MapNetErrorToCertStatus(error); 64 cert_status |= MapNetErrorToCertStatus(error);
65 } 65 }
66 66
67 void SSLInfo::UpdateSignedCertificateTimestamps(
68 const ct::CTVerifyResult& ct_verify_result) {
69 for (const auto& sct : ct_verify_result.verified_scts) {
70 signed_certificate_timestamps.push_back(
71 SignedCertificateTimestampAndStatus(sct, ct::SCT_STATUS_OK));
72 }
73 for (const auto& sct : ct_verify_result.invalid_scts) {
74 signed_certificate_timestamps.push_back(
75 SignedCertificateTimestampAndStatus(sct, ct::SCT_STATUS_INVALID));
76 }
77 for (const auto& sct : ct_verify_result.unknown_logs_scts) {
78 signed_certificate_timestamps.push_back(
79 SignedCertificateTimestampAndStatus(sct, ct::SCT_STATUS_LOG_UNKNOWN));
80 }
81 }
82
67 } // namespace net 83 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/ssl_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698