| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
| 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
| 7 | 7 |
| 8 // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=455424 | 8 // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=455424 |
| 9 // until NSS 3.12.2 comes out and we update to it. | 9 // until NSS 3.12.2 comes out and we update to it. |
| 10 #define Lock FOO_NSS_Lock | 10 #define Lock FOO_NSS_Lock |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 // ClientSocket methods: | 45 // ClientSocket methods: |
| 46 virtual int Connect(CompletionCallback* callback); | 46 virtual int Connect(CompletionCallback* callback); |
| 47 virtual void Disconnect(); | 47 virtual void Disconnect(); |
| 48 virtual bool IsConnected() const; | 48 virtual bool IsConnected() const; |
| 49 virtual bool IsConnectedAndIdle() const; | 49 virtual bool IsConnectedAndIdle() const; |
| 50 | 50 |
| 51 // Socket methods: | 51 // Socket methods: |
| 52 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 52 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
| 53 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 53 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
| 54 virtual bool SetReceiveBufferSize(int32 size); |
| 55 virtual bool SetSendBufferSize(int32 size); |
| 54 | 56 |
| 55 private: | 57 private: |
| 56 void InvalidateSessionIfBadCertificate(); | 58 void InvalidateSessionIfBadCertificate(); |
| 57 X509Certificate* UpdateServerCert(); | 59 X509Certificate* UpdateServerCert(); |
| 58 void DoCallback(int result); | 60 void DoCallback(int result); |
| 59 void DoConnectCallback(int result); | 61 void DoConnectCallback(int result); |
| 60 void OnIOComplete(int result); | 62 void OnIOComplete(int result); |
| 61 | 63 |
| 62 int DoLoop(int last_io_result); | 64 int DoLoop(int last_io_result); |
| 63 int DoHandshakeRead(); | 65 int DoHandshakeRead(); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 122 |
| 121 // Buffers for the network end of the SSL state machine | 123 // Buffers for the network end of the SSL state machine |
| 122 memio_Private* nss_bufs_; | 124 memio_Private* nss_bufs_; |
| 123 | 125 |
| 124 static bool nss_options_initialized_; | 126 static bool nss_options_initialized_; |
| 125 }; | 127 }; |
| 126 | 128 |
| 127 } // namespace net | 129 } // namespace net |
| 128 | 130 |
| 129 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 131 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
| OLD | NEW |