| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // NSS may optionally be run on a dedicated thread. If synchronous/blocking | 58 // NSS may optionally be run on a dedicated thread. If synchronous/blocking |
| 59 // behaviour is desired, for performance or compatibility, the current task | 59 // behaviour is desired, for performance or compatibility, the current task |
| 60 // runner should be supplied instead. | 60 // runner should be supplied instead. |
| 61 SSLClientSocketNSS(base::SequencedTaskRunner* nss_task_runner, | 61 SSLClientSocketNSS(base::SequencedTaskRunner* nss_task_runner, |
| 62 ClientSocketHandle* transport_socket, | 62 ClientSocketHandle* transport_socket, |
| 63 const HostPortPair& host_and_port, | 63 const HostPortPair& host_and_port, |
| 64 const SSLConfig& ssl_config, | 64 const SSLConfig& ssl_config, |
| 65 const SSLClientSocketContext& context); | 65 const SSLClientSocketContext& context); |
| 66 virtual ~SSLClientSocketNSS(); | 66 virtual ~SSLClientSocketNSS(); |
| 67 | 67 |
| 68 // SSLClientSocket implementation. | 68 // SSLSocket implementation. |
| 69 virtual void GetSSLCertRequestInfo( | |
| 70 SSLCertRequestInfo* cert_request_info) OVERRIDE; | |
| 71 virtual int ExportKeyingMaterial(const base::StringPiece& label, | 69 virtual int ExportKeyingMaterial(const base::StringPiece& label, |
| 72 bool has_context, | 70 bool has_context, |
| 73 const base::StringPiece& context, | 71 const base::StringPiece& context, |
| 74 unsigned char* out, | 72 unsigned char* out, |
| 75 unsigned int outlen) OVERRIDE; | 73 unsigned int outlen) OVERRIDE; |
| 74 virtual int GetTlsUniqueChannelBinding(unsigned char* out, |
| 75 unsigned int *outlen, |
| 76 unsigned int outlen_max) OVERRIDE; |
| 77 // SSLClientSocket implementation. |
| 78 virtual void GetSSLCertRequestInfo( |
| 79 SSLCertRequestInfo* cert_request_info) OVERRIDE; |
| 76 virtual NextProtoStatus GetNextProto(std::string* proto, | 80 virtual NextProtoStatus GetNextProto(std::string* proto, |
| 77 std::string* server_protos) OVERRIDE; | 81 std::string* server_protos) OVERRIDE; |
| 78 | 82 |
| 79 // StreamSocket implementation. | 83 // StreamSocket implementation. |
| 80 virtual int Connect(const CompletionCallback& callback) OVERRIDE; | 84 virtual int Connect(const CompletionCallback& callback) OVERRIDE; |
| 81 virtual void Disconnect() OVERRIDE; | 85 virtual void Disconnect() OVERRIDE; |
| 82 virtual bool IsConnected() const OVERRIDE; | 86 virtual bool IsConnected() const OVERRIDE; |
| 83 virtual bool IsConnectedAndIdle() const OVERRIDE; | 87 virtual bool IsConnectedAndIdle() const OVERRIDE; |
| 84 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE; | 88 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE; |
| 85 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; | 89 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 // Added the following code Debugging in release mode. | 192 // Added the following code Debugging in release mode. |
| 189 mutable base::Lock lock_; | 193 mutable base::Lock lock_; |
| 190 // This is mutable so that CalledOnValidThread can set it. | 194 // This is mutable so that CalledOnValidThread can set it. |
| 191 // It's guarded by |lock_|. | 195 // It's guarded by |lock_|. |
| 192 mutable base::PlatformThreadId valid_thread_id_; | 196 mutable base::PlatformThreadId valid_thread_id_; |
| 193 }; | 197 }; |
| 194 | 198 |
| 195 } // namespace net | 199 } // namespace net |
| 196 | 200 |
| 197 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 201 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
| OLD | NEW |