| 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 NextProto SSLServerSocketNSS::GetNegotiatedProtocol() const { | 300 NextProto SSLServerSocketNSS::GetNegotiatedProtocol() const { |
| 301 // NPN is not supported by this class. | 301 // NPN is not supported by this class. |
| 302 return kProtoUnknown; | 302 return kProtoUnknown; |
| 303 } | 303 } |
| 304 | 304 |
| 305 bool SSLServerSocketNSS::GetSSLInfo(SSLInfo* ssl_info) { | 305 bool SSLServerSocketNSS::GetSSLInfo(SSLInfo* ssl_info) { |
| 306 NOTIMPLEMENTED(); | 306 NOTIMPLEMENTED(); |
| 307 return false; | 307 return false; |
| 308 } | 308 } |
| 309 | 309 |
| 310 void SSLServerSocketNSS::GetConnectionAttempts(ConnectionAttempts* out) const { |
| 311 out->clear(); |
| 312 } |
| 313 |
| 310 int SSLServerSocketNSS::InitializeSSLOptions() { | 314 int SSLServerSocketNSS::InitializeSSLOptions() { |
| 311 // Transport connected, now hook it up to nss | 315 // Transport connected, now hook it up to nss |
| 312 nss_fd_ = memio_CreateIOLayer(kRecvBufferSize, kSendBufferSize); | 316 nss_fd_ = memio_CreateIOLayer(kRecvBufferSize, kSendBufferSize); |
| 313 if (nss_fd_ == NULL) { | 317 if (nss_fd_ == NULL) { |
| 314 return ERR_OUT_OF_MEMORY; // TODO(port): map NSPR error code. | 318 return ERR_OUT_OF_MEMORY; // TODO(port): map NSPR error code. |
| 315 } | 319 } |
| 316 | 320 |
| 317 // Grab pointer to buffers | 321 // Grab pointer to buffers |
| 318 nss_bufs_ = memio_GetSecret(nss_fd_); | 322 nss_bufs_ = memio_GetSecret(nss_fd_); |
| 319 | 323 |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 // initializes the NSS base library. | 834 // initializes the NSS base library. |
| 831 EnsureNSSSSLInit(); | 835 EnsureNSSSSLInit(); |
| 832 if (!NSS_IsInitialized()) | 836 if (!NSS_IsInitialized()) |
| 833 return ERR_UNEXPECTED; | 837 return ERR_UNEXPECTED; |
| 834 | 838 |
| 835 EnableSSLServerSockets(); | 839 EnableSSLServerSockets(); |
| 836 return OK; | 840 return OK; |
| 837 } | 841 } |
| 838 | 842 |
| 839 } // namespace net | 843 } // namespace net |
| OLD | NEW |