| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 108 |
| 109 // SSLClientSocket implementation. | 109 // SSLClientSocket implementation. |
| 110 ChannelIDService* GetChannelIDService() const override; | 110 ChannelIDService* GetChannelIDService() const override; |
| 111 SSLFailureState GetSSLFailureState() const override; | 111 SSLFailureState GetSSLFailureState() const override; |
| 112 | 112 |
| 113 protected: | |
| 114 // SSLClientSocket implementation. | |
| 115 scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain() | |
| 116 const override; | |
| 117 | |
| 118 private: | 113 private: |
| 119 // Helper class to handle marshalling any NSS interaction to and from the | 114 // Helper class to handle marshalling any NSS interaction to and from the |
| 120 // NSS and network task runners. Not every call needs to happen on the Core | 115 // NSS and network task runners. Not every call needs to happen on the Core |
| 121 class Core; | 116 class Core; |
| 122 | 117 |
| 123 enum State { | 118 enum State { |
| 124 STATE_NONE, | 119 STATE_NONE, |
| 125 STATE_HANDSHAKE, | 120 STATE_HANDSHAKE, |
| 126 STATE_HANDSHAKE_COMPLETE, | 121 STATE_HANDSHAKE_COMPLETE, |
| 127 STATE_VERIFY_CERT, | 122 STATE_VERIFY_CERT, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 // Added the following code Debugging in release mode. | 210 // Added the following code Debugging in release mode. |
| 216 mutable base::Lock lock_; | 211 mutable base::Lock lock_; |
| 217 // This is mutable so that CalledOnValidThread can set it. | 212 // This is mutable so that CalledOnValidThread can set it. |
| 218 // It's guarded by |lock_|. | 213 // It's guarded by |lock_|. |
| 219 mutable base::PlatformThreadId valid_thread_id_; | 214 mutable base::PlatformThreadId valid_thread_id_; |
| 220 }; | 215 }; |
| 221 | 216 |
| 222 } // namespace net | 217 } // namespace net |
| 223 | 218 |
| 224 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 219 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
| OLD | NEW |