OLD | NEW |
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 Loading... |
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 |
OLD | NEW |