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/socket/ssl_client_socket_impl.h" | 5 #include "net/socket/ssl_client_socket_impl.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <openssl/bio.h> | 8 #include <openssl/bio.h> |
9 #include <openssl/bytestring.h> | 9 #include <openssl/bytestring.h> |
10 #include <openssl/err.h> | 10 #include <openssl/err.h> |
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 const uint8_t* ocsp_response_raw; | 1317 const uint8_t* ocsp_response_raw; |
1318 size_t ocsp_response_len; | 1318 size_t ocsp_response_len; |
1319 SSL_get0_ocsp_response(ssl_, &ocsp_response_raw, &ocsp_response_len); | 1319 SSL_get0_ocsp_response(ssl_, &ocsp_response_raw, &ocsp_response_len); |
1320 ocsp_response.assign(reinterpret_cast<const char*>(ocsp_response_raw), | 1320 ocsp_response.assign(reinterpret_cast<const char*>(ocsp_response_raw), |
1321 ocsp_response_len); | 1321 ocsp_response_len); |
1322 } | 1322 } |
1323 | 1323 |
1324 start_cert_verification_time_ = base::TimeTicks::Now(); | 1324 start_cert_verification_time_ = base::TimeTicks::Now(); |
1325 | 1325 |
1326 return cert_verifier_->Verify( | 1326 return cert_verifier_->Verify( |
1327 server_cert_.get(), host_and_port_.host(), ocsp_response, | 1327 CertVerifier::RequestParams(server_cert_, host_and_port_.host(), |
1328 ssl_config_.GetCertVerifyFlags(), | 1328 ssl_config_.GetCertVerifyFlags(), |
| 1329 ocsp_response, CertificateList()), |
1329 // TODO(davidben): Route the CRLSet through SSLConfig so | 1330 // TODO(davidben): Route the CRLSet through SSLConfig so |
1330 // SSLClientSocket doesn't depend on SSLConfigService. | 1331 // SSLClientSocket doesn't depend on SSLConfigService. |
1331 SSLConfigService::GetCRLSet().get(), &server_cert_verify_result_, | 1332 SSLConfigService::GetCRLSet().get(), &server_cert_verify_result_, |
1332 base::Bind(&SSLClientSocketImpl::OnHandshakeIOComplete, | 1333 base::Bind(&SSLClientSocketImpl::OnHandshakeIOComplete, |
1333 base::Unretained(this)), | 1334 base::Unretained(this)), |
1334 &cert_verifier_request_, net_log_); | 1335 &cert_verifier_request_, net_log_); |
1335 } | 1336 } |
1336 | 1337 |
1337 int SSLClientSocketImpl::DoVerifyCertComplete(int result) { | 1338 int SSLClientSocketImpl::DoVerifyCertComplete(int result) { |
1338 cert_verifier_request_.reset(); | 1339 cert_verifier_request_.reset(); |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2336 if (rv != OK) { | 2337 if (rv != OK) { |
2337 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_CONNECT, rv); | 2338 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_CONNECT, rv); |
2338 return; | 2339 return; |
2339 } | 2340 } |
2340 | 2341 |
2341 net_log_.EndEvent(NetLog::TYPE_SSL_CONNECT, | 2342 net_log_.EndEvent(NetLog::TYPE_SSL_CONNECT, |
2342 base::Bind(&NetLogSSLInfoCallback, base::Unretained(this))); | 2343 base::Bind(&NetLogSSLInfoCallback, base::Unretained(this))); |
2343 } | 2344 } |
2344 | 2345 |
2345 } // namespace net | 2346 } // namespace net |
OLD | NEW |