| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/base/ssl_client_socket_nss.h" | 5 #include "net/base/ssl_client_socket_nss.h" |
| 6 | 6 |
| 7 #include <nspr.h> | 7 #include <nspr.h> |
| 8 #include <nss.h> | 8 #include <nss.h> |
| 9 #include <secerr.h> | 9 #include <secerr.h> |
| 10 // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=455424 | 10 // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=455424 |
| 11 // until NSS 3.12.2 comes out and we update to it. | 11 // until NSS 3.12.2 comes out and we update to it. |
| 12 #define Lock FOO_NSS_Lock | 12 #define Lock FOO_NSS_Lock |
| 13 #include <ssl.h> | 13 #include <ssl.h> |
| 14 #include <sslerr.h> | 14 #include <sslerr.h> |
| 15 #include <pk11pub.h> | 15 #include <pk11pub.h> |
| 16 #undef Lock | 16 #undef Lock |
| 17 | 17 |
| 18 #include "base/compiler_specific.h" | 18 #include "base/compiler_specific.h" |
| 19 #include "base/logging.h" | 19 #include "base/logging.h" |
| 20 #include "base/nss_init.h" | 20 #include "base/nss_init.h" |
| 21 #include "base/string_util.h" | 21 #include "base/string_util.h" |
| 22 #include "net/base/io_buffer.h" |
| 22 #include "net/base/net_errors.h" | 23 #include "net/base/net_errors.h" |
| 23 #include "net/base/ssl_info.h" | 24 #include "net/base/ssl_info.h" |
| 24 | 25 |
| 25 static const int kRecvBufferSize = 4096; | 26 static const int kRecvBufferSize = 4096; |
| 26 | 27 |
| 27 namespace net { | 28 namespace net { |
| 28 | 29 |
| 29 // State machines are easier to debug if you log state transitions. | 30 // State machines are easier to debug if you log state transitions. |
| 30 // Enable these if you want to see what's going on. | 31 // Enable these if you want to see what's going on. |
| 31 #if 1 | 32 #if 1 |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 if (prerr == PR_WOULD_BLOCK_ERROR) { | 651 if (prerr == PR_WOULD_BLOCK_ERROR) { |
| 651 GotoState(STATE_PAYLOAD_WRITE); | 652 GotoState(STATE_PAYLOAD_WRITE); |
| 652 return ERR_IO_PENDING; | 653 return ERR_IO_PENDING; |
| 653 } | 654 } |
| 654 user_buf_ = NULL; | 655 user_buf_ = NULL; |
| 655 LeaveFunction(""); | 656 LeaveFunction(""); |
| 656 return NetErrorFromNSPRError(prerr); | 657 return NetErrorFromNSPRError(prerr); |
| 657 } | 658 } |
| 658 | 659 |
| 659 } // namespace net | 660 } // namespace net |
| OLD | NEW |