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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 } | 198 } |
199 | 199 |
200 void SSLServerSocketNSS::Disconnect() { | 200 void SSLServerSocketNSS::Disconnect() { |
201 transport_socket_->Disconnect(); | 201 transport_socket_->Disconnect(); |
202 } | 202 } |
203 | 203 |
204 bool SSLServerSocketNSS::IsConnectedAndIdle() const { | 204 bool SSLServerSocketNSS::IsConnectedAndIdle() const { |
205 return completed_handshake_ && transport_socket_->IsConnectedAndIdle(); | 205 return completed_handshake_ && transport_socket_->IsConnectedAndIdle(); |
206 } | 206 } |
207 | 207 |
208 int SSLServerSocketNSS::GetPeerAddress(AddressList* address) const { | 208 int SSLServerSocketNSS::GetPeerAddress(IPEndPoint* address) const { |
209 if (!IsConnected()) | 209 if (!IsConnected()) |
210 return ERR_SOCKET_NOT_CONNECTED; | 210 return ERR_SOCKET_NOT_CONNECTED; |
211 return transport_socket_->GetPeerAddress(address); | 211 return transport_socket_->GetPeerAddress(address); |
212 } | 212 } |
213 | 213 |
214 int SSLServerSocketNSS::GetLocalAddress(IPEndPoint* address) const { | 214 int SSLServerSocketNSS::GetLocalAddress(IPEndPoint* address) const { |
215 if (!IsConnected()) | 215 if (!IsConnected()) |
216 return ERR_SOCKET_NOT_CONNECTED; | 216 return ERR_SOCKET_NOT_CONNECTED; |
217 return transport_socket_->GetLocalAddress(address); | 217 return transport_socket_->GetLocalAddress(address); |
218 } | 218 } |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 // Initialize the NSS SSL library in a threadsafe way. This also | 766 // Initialize the NSS SSL library in a threadsafe way. This also |
767 // initializes the NSS base library. | 767 // initializes the NSS base library. |
768 EnsureNSSSSLInit(); | 768 EnsureNSSSSLInit(); |
769 if (!NSS_IsInitialized()) | 769 if (!NSS_IsInitialized()) |
770 return ERR_UNEXPECTED; | 770 return ERR_UNEXPECTED; |
771 | 771 |
772 return OK; | 772 return OK; |
773 } | 773 } |
774 | 774 |
775 } // namespace net | 775 } // namespace net |
OLD | NEW |