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 // This file includes code SSLClientSocketNSS::DoVerifyCertComplete() derived | 5 // This file includes code SSLClientSocketNSS::DoVerifyCertComplete() derived |
6 // from AuthCertificateCallback() in | 6 // from AuthCertificateCallback() in |
7 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp. | 7 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp. |
8 | 8 |
9 /* ***** BEGIN LICENSE BLOCK ***** | 9 /* ***** BEGIN LICENSE BLOCK ***** |
10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 #include "crypto/scoped_nss_types.h" | 86 #include "crypto/scoped_nss_types.h" |
87 #include "net/base/address_list.h" | 87 #include "net/base/address_list.h" |
88 #include "net/base/connection_type_histograms.h" | 88 #include "net/base/connection_type_histograms.h" |
89 #include "net/base/dns_util.h" | 89 #include "net/base/dns_util.h" |
90 #include "net/base/io_buffer.h" | 90 #include "net/base/io_buffer.h" |
91 #include "net/base/net_errors.h" | 91 #include "net/base/net_errors.h" |
92 #include "net/base/net_log.h" | 92 #include "net/base/net_log.h" |
93 #include "net/cert/asn1_util.h" | 93 #include "net/cert/asn1_util.h" |
94 #include "net/cert/cert_status_flags.h" | 94 #include "net/cert/cert_status_flags.h" |
95 #include "net/cert/cert_verifier.h" | 95 #include "net/cert/cert_verifier.h" |
| 96 #include "net/cert/ct_signed_certificate_timestamp_log_param.h" |
96 #include "net/cert/ct_verifier.h" | 97 #include "net/cert/ct_verifier.h" |
97 #include "net/cert/scoped_nss_types.h" | 98 #include "net/cert/scoped_nss_types.h" |
98 #include "net/cert/single_request_cert_verifier.h" | 99 #include "net/cert/single_request_cert_verifier.h" |
99 #include "net/cert/x509_certificate_net_log_param.h" | 100 #include "net/cert/x509_certificate_net_log_param.h" |
100 #include "net/cert/x509_util.h" | 101 #include "net/cert/x509_util.h" |
101 #include "net/http/transport_security_state.h" | 102 #include "net/http/transport_security_state.h" |
102 #include "net/ocsp/nss_ocsp.h" | 103 #include "net/ocsp/nss_ocsp.h" |
103 #include "net/socket/client_socket_handle.h" | 104 #include "net/socket/client_socket_handle.h" |
104 #include "net/socket/nss_ssl_util.h" | 105 #include "net/socket/nss_ssl_util.h" |
105 #include "net/socket/ssl_error_params.h" | 106 #include "net/socket/ssl_error_params.h" |
(...skipping 3368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3474 if (!cert_transparency_verifier_) | 3475 if (!cert_transparency_verifier_) |
3475 return; | 3476 return; |
3476 | 3477 |
3477 // Note that this is a completely synchronous operation: The CT Log Verifier | 3478 // Note that this is a completely synchronous operation: The CT Log Verifier |
3478 // gets all the data it needs for SCT verification and does not do any | 3479 // gets all the data it needs for SCT verification and does not do any |
3479 // external communication. | 3480 // external communication. |
3480 int result = cert_transparency_verifier_->Verify( | 3481 int result = cert_transparency_verifier_->Verify( |
3481 server_cert_verify_result_.verified_cert, | 3482 server_cert_verify_result_.verified_cert, |
3482 std::string(), // SCT list from OCSP response | 3483 std::string(), // SCT list from OCSP response |
3483 std::string(), // SCT list from TLS extension | 3484 std::string(), // SCT list from TLS extension |
3484 &ct_verify_result_); | 3485 &ct_verify_result_, |
| 3486 net_log_); |
3485 | 3487 |
3486 VLOG(1) << "CT Verification complete: result " << result | 3488 VLOG(1) << "CT Verification complete: result " << result |
3487 << " Unverified scts: " << ct_verify_result_.unverified_scts.size() | 3489 << " Unverified scts: " << ct_verify_result_.unverified_scts.size() |
3488 << " Verified scts: " << ct_verify_result_.verified_scts.size() | 3490 << " Verified scts: " << ct_verify_result_.verified_scts.size() |
3489 << " scts from unknown logs: " | 3491 << " scts from unknown logs: " |
3490 << ct_verify_result_.unknown_logs_scts.size(); | 3492 << ct_verify_result_.unknown_logs_scts.size(); |
3491 | 3493 |
3492 if (!ct_verify_result_.unverified_scts.empty() || | 3494 if (!ct_verify_result_.unverified_scts.empty() || |
3493 !ct_verify_result_.unknown_logs_scts.empty() || | 3495 !ct_verify_result_.unknown_logs_scts.empty() || |
3494 !ct_verify_result_.verified_scts.empty()) { | 3496 !ct_verify_result_.verified_scts.empty()) { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3548 EnsureThreadIdAssigned(); | 3550 EnsureThreadIdAssigned(); |
3549 base::AutoLock auto_lock(lock_); | 3551 base::AutoLock auto_lock(lock_); |
3550 return valid_thread_id_ == base::PlatformThread::CurrentId(); | 3552 return valid_thread_id_ == base::PlatformThread::CurrentId(); |
3551 } | 3553 } |
3552 | 3554 |
3553 ServerBoundCertService* SSLClientSocketNSS::GetServerBoundCertService() const { | 3555 ServerBoundCertService* SSLClientSocketNSS::GetServerBoundCertService() const { |
3554 return server_bound_cert_service_; | 3556 return server_bound_cert_service_; |
3555 } | 3557 } |
3556 | 3558 |
3557 } // namespace net | 3559 } // namespace net |
OLD | NEW |