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