| 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 3453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3464 } | 3464 } |
| 3465 | 3465 |
| 3466 void SSLClientSocketNSS::VerifyCT() { | 3466 void SSLClientSocketNSS::VerifyCT() { |
| 3467 if (!cert_transparency_verifier_) | 3467 if (!cert_transparency_verifier_) |
| 3468 return; | 3468 return; |
| 3469 | 3469 |
| 3470 // Note that this is a completely synchronous operation: The CT Log Verifier | 3470 // Note that this is a completely synchronous operation: The CT Log Verifier |
| 3471 // gets all the data it needs for SCT verification and does not do any | 3471 // gets all the data it needs for SCT verification and does not do any |
| 3472 // external communication. | 3472 // external communication. |
| 3473 int result = cert_transparency_verifier_->Verify( | 3473 int result = cert_transparency_verifier_->Verify( |
| 3474 server_cert_verify_result_.verified_cert, | 3474 server_cert_verify_result_.verified_cert.get(), |
| 3475 core_->state().stapled_ocsp_response, | 3475 core_->state().stapled_ocsp_response, |
| 3476 core_->state().sct_list_from_tls_extension, | 3476 core_->state().sct_list_from_tls_extension, |
| 3477 &ct_verify_result_, | 3477 &ct_verify_result_, |
| 3478 net_log_); | 3478 net_log_); |
| 3479 // TODO(ekasper): wipe stapled_ocsp_response and sct_list_from_tls_extension | 3479 // TODO(ekasper): wipe stapled_ocsp_response and sct_list_from_tls_extension |
| 3480 // from the state after verification is complete, to conserve memory. | 3480 // from the state after verification is complete, to conserve memory. |
| 3481 | 3481 |
| 3482 VLOG(1) << "CT Verification complete: result " << result | 3482 VLOG(1) << "CT Verification complete: result " << result |
| 3483 << " Invalid scts: " << ct_verify_result_.invalid_scts.size() | 3483 << " Invalid scts: " << ct_verify_result_.invalid_scts.size() |
| 3484 << " Verified scts: " << ct_verify_result_.verified_scts.size() | 3484 << " Verified scts: " << ct_verify_result_.verified_scts.size() |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3547 scoped_refptr<X509Certificate> | 3547 scoped_refptr<X509Certificate> |
| 3548 SSLClientSocketNSS::GetUnverifiedServerCertificateChain() const { | 3548 SSLClientSocketNSS::GetUnverifiedServerCertificateChain() const { |
| 3549 return core_->state().server_cert.get(); | 3549 return core_->state().server_cert.get(); |
| 3550 } | 3550 } |
| 3551 | 3551 |
| 3552 ChannelIDService* SSLClientSocketNSS::GetChannelIDService() const { | 3552 ChannelIDService* SSLClientSocketNSS::GetChannelIDService() const { |
| 3553 return channel_id_service_; | 3553 return channel_id_service_; |
| 3554 } | 3554 } |
| 3555 | 3555 |
| 3556 } // namespace net | 3556 } // namespace net |
| OLD | NEW |