| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 LogFailedNSSFunction(net_log_, "SSL_ExportKeyingMaterial", ""); | 140 LogFailedNSSFunction(net_log_, "SSL_ExportKeyingMaterial", ""); |
| 141 return MapNSSError(PORT_GetError()); | 141 return MapNSSError(PORT_GetError()); |
| 142 } | 142 } |
| 143 return OK; | 143 return OK; |
| 144 } | 144 } |
| 145 | 145 |
| 146 int SSLServerSocketNSS::Connect(OldCompletionCallback* callback) { | 146 int SSLServerSocketNSS::Connect(OldCompletionCallback* callback) { |
| 147 NOTIMPLEMENTED(); | 147 NOTIMPLEMENTED(); |
| 148 return ERR_NOT_IMPLEMENTED; | 148 return ERR_NOT_IMPLEMENTED; |
| 149 } | 149 } |
| 150 int SSLServerSocketNSS::Connect(const CompletionCallback& callback) { |
| 151 NOTIMPLEMENTED(); |
| 152 return ERR_NOT_IMPLEMENTED; |
| 153 } |
| 150 | 154 |
| 151 int SSLServerSocketNSS::Read(IOBuffer* buf, int buf_len, | 155 int SSLServerSocketNSS::Read(IOBuffer* buf, int buf_len, |
| 152 OldCompletionCallback* callback) { | 156 OldCompletionCallback* callback) { |
| 153 DCHECK(!user_read_callback_); | 157 DCHECK(!user_read_callback_); |
| 154 DCHECK(!user_handshake_callback_); | 158 DCHECK(!user_handshake_callback_); |
| 155 DCHECK(!user_read_buf_); | 159 DCHECK(!user_read_buf_); |
| 156 DCHECK(nss_bufs_); | 160 DCHECK(nss_bufs_); |
| 157 | 161 |
| 158 user_read_buf_ = buf; | 162 user_read_buf_ = buf; |
| 159 user_read_buf_len_ = buf_len; | 163 user_read_buf_len_ = buf_len; |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 // Initialize the NSS SSL library in a threadsafe way. This also | 768 // Initialize the NSS SSL library in a threadsafe way. This also |
| 765 // initializes the NSS base library. | 769 // initializes the NSS base library. |
| 766 EnsureNSSSSLInit(); | 770 EnsureNSSSSLInit(); |
| 767 if (!NSS_IsInitialized()) | 771 if (!NSS_IsInitialized()) |
| 768 return ERR_UNEXPECTED; | 772 return ERR_UNEXPECTED; |
| 769 | 773 |
| 770 return OK; | 774 return OK; |
| 771 } | 775 } |
| 772 | 776 |
| 773 } // namespace net | 777 } // namespace net |
| OLD | NEW |