| 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 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 #include <limits> | 30 #include <limits> |
| 31 | 31 |
| 32 #include "base/lazy_instance.h" | 32 #include "base/lazy_instance.h" |
| 33 #include "base/memory/ref_counted.h" | 33 #include "base/memory/ref_counted.h" |
| 34 #include "crypto/rsa_private_key.h" | 34 #include "crypto/rsa_private_key.h" |
| 35 #include "crypto/nss_util_internal.h" | 35 #include "crypto/nss_util_internal.h" |
| 36 #include "net/base/io_buffer.h" | 36 #include "net/base/io_buffer.h" |
| 37 #include "net/base/net_errors.h" | 37 #include "net/base/net_errors.h" |
| 38 #include "net/base/net_log.h" | 38 #include "net/base/net_log.h" |
| 39 #include "net/ocsp/nss_ocsp.h" | |
| 40 #include "net/socket/nss_ssl_util.h" | 39 #include "net/socket/nss_ssl_util.h" |
| 41 #include "net/socket/ssl_error_params.h" | 40 #include "net/socket/ssl_error_params.h" |
| 42 | 41 |
| 43 // SSL plaintext fragments are shorter than 16KB. Although the record layer | 42 // SSL plaintext fragments are shorter than 16KB. Although the record layer |
| 44 // overhead is allowed to be 2K + 5 bytes, in practice the overhead is much | 43 // overhead is allowed to be 2K + 5 bytes, in practice the overhead is much |
| 45 // smaller than 1KB. So a 17KB buffer should be large enough to hold an | 44 // smaller than 1KB. So a 17KB buffer should be large enough to hold an |
| 46 // entire SSL record. | 45 // entire SSL record. |
| 47 static const int kRecvBufferSize = 17 * 1024; | 46 static const int kRecvBufferSize = 17 * 1024; |
| 48 static const int kSendBufferSize = 17 * 1024; | 47 static const int kSendBufferSize = 17 * 1024; |
| 49 | 48 |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 // initializes the NSS base library. | 824 // initializes the NSS base library. |
| 826 EnsureNSSSSLInit(); | 825 EnsureNSSSSLInit(); |
| 827 if (!NSS_IsInitialized()) | 826 if (!NSS_IsInitialized()) |
| 828 return ERR_UNEXPECTED; | 827 return ERR_UNEXPECTED; |
| 829 | 828 |
| 830 EnableSSLServerSockets(); | 829 EnableSSLServerSockets(); |
| 831 return OK; | 830 return OK; |
| 832 } | 831 } |
| 833 | 832 |
| 834 } // namespace net | 833 } // namespace net |
| OLD | NEW |