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_server_socket_nss.h" | 5 #include "net/socket/ssl_server_socket_nss.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <winsock2.h> | 8 #include <winsock2.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 } | 272 } |
273 | 273 |
274 int64 SSLServerSocketNSS::NumBytesRead() const { | 274 int64 SSLServerSocketNSS::NumBytesRead() const { |
275 return transport_socket_->NumBytesRead(); | 275 return transport_socket_->NumBytesRead(); |
276 } | 276 } |
277 | 277 |
278 base::TimeDelta SSLServerSocketNSS::GetConnectTimeMicros() const { | 278 base::TimeDelta SSLServerSocketNSS::GetConnectTimeMicros() const { |
279 return transport_socket_->GetConnectTimeMicros(); | 279 return transport_socket_->GetConnectTimeMicros(); |
280 } | 280 } |
281 | 281 |
| 282 bool SSLServerSocketNSS::WasNpnNegotiated() const { |
| 283 return false; |
| 284 } |
| 285 |
282 NextProto SSLServerSocketNSS::GetNegotiatedProtocol() const { | 286 NextProto SSLServerSocketNSS::GetNegotiatedProtocol() const { |
283 // NPN is not supported by this class. | 287 // NPN is not supported by this class. |
284 return kProtoUnknown; | 288 return kProtoUnknown; |
285 } | 289 } |
286 | 290 |
| 291 bool SSLServerSocketNSS::GetSSLInfo(SSLInfo* ssl_info) { |
| 292 NOTIMPLEMENTED(); |
| 293 return false; |
| 294 } |
| 295 |
287 int SSLServerSocketNSS::InitializeSSLOptions() { | 296 int SSLServerSocketNSS::InitializeSSLOptions() { |
288 // Transport connected, now hook it up to nss | 297 // Transport connected, now hook it up to nss |
289 // TODO(port): specify rx and tx buffer sizes separately | 298 // TODO(port): specify rx and tx buffer sizes separately |
290 nss_fd_ = memio_CreateIOLayer(kRecvBufferSize); | 299 nss_fd_ = memio_CreateIOLayer(kRecvBufferSize); |
291 if (nss_fd_ == NULL) { | 300 if (nss_fd_ == NULL) { |
292 return ERR_OUT_OF_MEMORY; // TODO(port): map NSPR error code. | 301 return ERR_OUT_OF_MEMORY; // TODO(port): map NSPR error code. |
293 } | 302 } |
294 | 303 |
295 // Grab pointer to buffers | 304 // Grab pointer to buffers |
296 nss_bufs_ = memio_GetSecret(nss_fd_); | 305 nss_bufs_ = memio_GetSecret(nss_fd_); |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 // initializes the NSS base library. | 803 // initializes the NSS base library. |
795 EnsureNSSSSLInit(); | 804 EnsureNSSSSLInit(); |
796 if (!NSS_IsInitialized()) | 805 if (!NSS_IsInitialized()) |
797 return ERR_UNEXPECTED; | 806 return ERR_UNEXPECTED; |
798 | 807 |
799 EnableSSLServerSockets(); | 808 EnableSSLServerSockets(); |
800 return OK; | 809 return OK; |
801 } | 810 } |
802 | 811 |
803 } // namespace net | 812 } // namespace net |
OLD | NEW |