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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // SSLClientSocket implementation. |
69 virtual void GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; | |
70 virtual void GetSSLCertRequestInfo( | 69 virtual void GetSSLCertRequestInfo( |
71 SSLCertRequestInfo* cert_request_info) OVERRIDE; | 70 SSLCertRequestInfo* cert_request_info) OVERRIDE; |
72 virtual int ExportKeyingMaterial(const base::StringPiece& label, | 71 virtual int ExportKeyingMaterial(const base::StringPiece& label, |
73 bool has_context, | 72 bool has_context, |
74 const base::StringPiece& context, | 73 const base::StringPiece& context, |
75 unsigned char* out, | 74 unsigned char* out, |
76 unsigned int outlen) OVERRIDE; | 75 unsigned int outlen) OVERRIDE; |
77 virtual NextProtoStatus GetNextProto(std::string* proto, | 76 virtual NextProtoStatus GetNextProto(std::string* proto, |
78 std::string* server_protos) OVERRIDE; | 77 std::string* server_protos) OVERRIDE; |
79 | 78 |
80 // StreamSocket implementation. | 79 // StreamSocket implementation. |
81 virtual int Connect(const CompletionCallback& callback) OVERRIDE; | 80 virtual int Connect(const CompletionCallback& callback) OVERRIDE; |
82 virtual void Disconnect() OVERRIDE; | 81 virtual void Disconnect() OVERRIDE; |
83 virtual bool IsConnected() const OVERRIDE; | 82 virtual bool IsConnected() const OVERRIDE; |
84 virtual bool IsConnectedAndIdle() const OVERRIDE; | 83 virtual bool IsConnectedAndIdle() const OVERRIDE; |
85 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE; | 84 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE; |
86 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; | 85 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; |
87 virtual const BoundNetLog& NetLog() const OVERRIDE; | 86 virtual const BoundNetLog& NetLog() const OVERRIDE; |
88 virtual void SetSubresourceSpeculation() OVERRIDE; | 87 virtual void SetSubresourceSpeculation() OVERRIDE; |
89 virtual void SetOmniboxSpeculation() OVERRIDE; | 88 virtual void SetOmniboxSpeculation() OVERRIDE; |
90 virtual bool WasEverUsed() const OVERRIDE; | 89 virtual bool WasEverUsed() const OVERRIDE; |
91 virtual bool UsingTCPFastOpen() const OVERRIDE; | 90 virtual bool UsingTCPFastOpen() const OVERRIDE; |
92 virtual int64 NumBytesRead() const OVERRIDE; | 91 virtual int64 NumBytesRead() const OVERRIDE; |
93 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; | 92 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; |
| 93 virtual bool GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; |
94 | 94 |
95 // Socket implementation. | 95 // Socket implementation. |
96 virtual int Read(IOBuffer* buf, | 96 virtual int Read(IOBuffer* buf, |
97 int buf_len, | 97 int buf_len, |
98 const CompletionCallback& callback) OVERRIDE; | 98 const CompletionCallback& callback) OVERRIDE; |
99 virtual int Write(IOBuffer* buf, | 99 virtual int Write(IOBuffer* buf, |
100 int buf_len, | 100 int buf_len, |
101 const CompletionCallback& callback) OVERRIDE; | 101 const CompletionCallback& callback) OVERRIDE; |
102 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; | 102 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; |
103 virtual bool SetSendBufferSize(int32 size) OVERRIDE; | 103 virtual bool SetSendBufferSize(int32 size) OVERRIDE; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 // Added the following code Debugging in release mode. | 188 // Added the following code Debugging in release mode. |
189 mutable base::Lock lock_; | 189 mutable base::Lock lock_; |
190 // This is mutable so that CalledOnValidThread can set it. | 190 // This is mutable so that CalledOnValidThread can set it. |
191 // It's guarded by |lock_|. | 191 // It's guarded by |lock_|. |
192 mutable base::PlatformThreadId valid_thread_id_; | 192 mutable base::PlatformThreadId valid_thread_id_; |
193 }; | 193 }; |
194 | 194 |
195 } // namespace net | 195 } // namespace net |
196 | 196 |
197 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 197 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
OLD | NEW |