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 // TODO(ukai): code is similar with http_network_transaction.cc. We should | 5 // TODO(ukai): code is similar with http_network_transaction.cc. We should |
6 // think about ways to share code, if possible. | 6 // think about ways to share code, if possible. |
7 | 7 |
8 #include "net/socket_stream/socket_stream.h" | 8 #include "net/socket_stream/socket_stream.h" |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 if (session_params && session_params->ignore_certificate_errors) | 1330 if (session_params && session_params->ignore_certificate_errors) |
1331 return OK; | 1331 return OK; |
1332 } | 1332 } |
1333 | 1333 |
1334 if (!delegate_) | 1334 if (!delegate_) |
1335 return result; | 1335 return result; |
1336 | 1336 |
1337 SSLInfo ssl_info; | 1337 SSLInfo ssl_info; |
1338 ssl_socket->GetSSLInfo(&ssl_info); | 1338 ssl_socket->GetSSLInfo(&ssl_info); |
1339 | 1339 |
1340 TransportSecurityState::DomainState domain_state; | 1340 TransportSecurityState* state = context_->transport_security_state(); |
1341 const bool fatal = context_->transport_security_state() && | 1341 const bool fatal = |
1342 context_->transport_security_state()->GetDomainState(url_.host(), | 1342 state && |
1343 SSLConfigService::IsSNIAvailable(context_->ssl_config_service()), | 1343 state->ShouldSSLErrorsBeFatal( |
1344 &domain_state) && | 1344 url_.host(), |
1345 domain_state.ShouldSSLErrorsBeFatal(); | 1345 SSLConfigService::IsSNIAvailable(context_->ssl_config_service())); |
1346 | 1346 |
1347 delegate_->OnSSLCertificateError(this, ssl_info, fatal); | 1347 delegate_->OnSSLCertificateError(this, ssl_info, fatal); |
1348 return ERR_IO_PENDING; | 1348 return ERR_IO_PENDING; |
1349 } | 1349 } |
1350 | 1350 |
1351 CookieStore* SocketStream::cookie_store() const { | 1351 CookieStore* SocketStream::cookie_store() const { |
1352 return cookie_store_; | 1352 return cookie_store_; |
1353 } | 1353 } |
1354 | 1354 |
1355 } // namespace net | 1355 } // namespace net |
OLD | NEW |