| 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 #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 #include <certt.h> | 8 #include <certt.h> |
| 9 #include <keyt.h> | 9 #include <keyt.h> |
| 10 #include <nspr.h> | 10 #include <nspr.h> |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 int Read(IOBuffer* buf, | 100 int Read(IOBuffer* buf, |
| 101 int buf_len, | 101 int buf_len, |
| 102 const CompletionCallback& callback) override; | 102 const CompletionCallback& callback) override; |
| 103 int Write(IOBuffer* buf, | 103 int Write(IOBuffer* buf, |
| 104 int buf_len, | 104 int buf_len, |
| 105 const CompletionCallback& callback) override; | 105 const CompletionCallback& callback) override; |
| 106 int SetReceiveBufferSize(int32 size) override; | 106 int SetReceiveBufferSize(int32 size) override; |
| 107 int SetSendBufferSize(int32 size) override; | 107 int SetSendBufferSize(int32 size) override; |
| 108 ChannelIDService* GetChannelIDService() const override; | 108 ChannelIDService* GetChannelIDService() const override; |
| 109 | 109 |
| 110 protected: | |
| 111 // SSLClientSocket implementation. | |
| 112 scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain() | |
| 113 const override; | |
| 114 | |
| 115 private: | 110 private: |
| 116 // Helper class to handle marshalling any NSS interaction to and from the | 111 // Helper class to handle marshalling any NSS interaction to and from the |
| 117 // NSS and network task runners. Not every call needs to happen on the Core | 112 // NSS and network task runners. Not every call needs to happen on the Core |
| 118 class Core; | 113 class Core; |
| 119 | 114 |
| 120 enum State { | 115 enum State { |
| 121 STATE_NONE, | 116 STATE_NONE, |
| 122 STATE_HANDSHAKE, | 117 STATE_HANDSHAKE, |
| 123 STATE_HANDSHAKE_COMPLETE, | 118 STATE_HANDSHAKE_COMPLETE, |
| 124 STATE_VERIFY_CERT, | 119 STATE_VERIFY_CERT, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 // Added the following code Debugging in release mode. | 207 // Added the following code Debugging in release mode. |
| 213 mutable base::Lock lock_; | 208 mutable base::Lock lock_; |
| 214 // This is mutable so that CalledOnValidThread can set it. | 209 // This is mutable so that CalledOnValidThread can set it. |
| 215 // It's guarded by |lock_|. | 210 // It's guarded by |lock_|. |
| 216 mutable base::PlatformThreadId valid_thread_id_; | 211 mutable base::PlatformThreadId valid_thread_id_; |
| 217 }; | 212 }; |
| 218 | 213 |
| 219 } // namespace net | 214 } // namespace net |
| 220 | 215 |
| 221 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 216 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
| OLD | NEW |