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.h" | 5 #include "net/socket/ssl_client_socket.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 int buf_len, | 137 int buf_len, |
138 const CompletionCallback& callback) override { | 138 const CompletionCallback& callback) override { |
139 return transport_->Write(buf, buf_len, callback); | 139 return transport_->Write(buf, buf_len, callback); |
140 } | 140 } |
141 int SetReceiveBufferSize(int32_t size) override { | 141 int SetReceiveBufferSize(int32_t size) override { |
142 return transport_->SetReceiveBufferSize(size); | 142 return transport_->SetReceiveBufferSize(size); |
143 } | 143 } |
144 int SetSendBufferSize(int32_t size) override { | 144 int SetSendBufferSize(int32_t size) override { |
145 return transport_->SetSendBufferSize(size); | 145 return transport_->SetSendBufferSize(size); |
146 } | 146 } |
| 147 int SetDoNotFragment(bool do_not_fragment) override { |
| 148 return transport_->SetDoNotFragment(do_not_fragment); |
| 149 } |
147 | 150 |
148 protected: | 151 protected: |
149 std::unique_ptr<StreamSocket> transport_; | 152 std::unique_ptr<StreamSocket> transport_; |
150 }; | 153 }; |
151 | 154 |
152 // ReadBufferingStreamSocket is a wrapper for an existing StreamSocket that | 155 // ReadBufferingStreamSocket is a wrapper for an existing StreamSocket that |
153 // will ensure a certain amount of data is internally buffered before | 156 // will ensure a certain amount of data is internally buffered before |
154 // satisfying a Read() request. It exists to mimic OS-level internal | 157 // satisfying a Read() request. It exists to mimic OS-level internal |
155 // buffering, but in a way to guarantee that X number of bytes will be | 158 // buffering, but in a way to guarantee that X number of bytes will be |
156 // returned to callers of Read(), regardless of how quickly the OS receives | 159 // returned to callers of Read(), regardless of how quickly the OS receives |
(...skipping 3261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3418 ASSERT_TRUE(sock_->GetSSLInfo(&ssl_info)); | 3421 ASSERT_TRUE(sock_->GetSSLInfo(&ssl_info)); |
3419 | 3422 |
3420 EXPECT_THAT(rv, IsError(ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN)); | 3423 EXPECT_THAT(rv, IsError(ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN)); |
3421 EXPECT_TRUE(ssl_info.cert_status & CERT_STATUS_PINNED_KEY_MISSING); | 3424 EXPECT_TRUE(ssl_info.cert_status & CERT_STATUS_PINNED_KEY_MISSING); |
3422 EXPECT_TRUE(ssl_info.cert_status & | 3425 EXPECT_TRUE(ssl_info.cert_status & |
3423 CERT_STATUS_CERTIFICATE_TRANSPARENCY_REQUIRED); | 3426 CERT_STATUS_CERTIFICATE_TRANSPARENCY_REQUIRED); |
3424 EXPECT_TRUE(sock_->IsConnected()); | 3427 EXPECT_TRUE(sock_->IsConnected()); |
3425 } | 3428 } |
3426 | 3429 |
3427 } // namespace net | 3430 } // namespace net |
OLD | NEW |