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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <certt.h> | 9 #include <certt.h> |
10 #include <keyt.h> | 10 #include <keyt.h> |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // behaviour is desired, for performance or compatibility, the current task | 60 // behaviour is desired, for performance or compatibility, the current task |
61 // runner should be supplied instead. | 61 // runner should be supplied instead. |
62 SSLClientSocketNSS(base::SingleThreadTaskRunner* nss_task_runner, | 62 SSLClientSocketNSS(base::SingleThreadTaskRunner* nss_task_runner, |
63 ClientSocketHandle* transport_socket, | 63 ClientSocketHandle* transport_socket, |
64 const HostPortPair& host_and_port, | 64 const HostPortPair& host_and_port, |
65 const SSLConfig& ssl_config, | 65 const SSLConfig& ssl_config, |
66 const SSLClientSocketContext& context); | 66 const SSLClientSocketContext& context); |
67 virtual ~SSLClientSocketNSS(); | 67 virtual ~SSLClientSocketNSS(); |
68 | 68 |
69 // SSLClientSocket implementation. | 69 // SSLClientSocket implementation. |
70 virtual void GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; | |
71 virtual void GetSSLCertRequestInfo( | 70 virtual void GetSSLCertRequestInfo( |
72 SSLCertRequestInfo* cert_request_info) OVERRIDE; | 71 SSLCertRequestInfo* cert_request_info) OVERRIDE; |
73 virtual int ExportKeyingMaterial(const base::StringPiece& label, | 72 virtual int ExportKeyingMaterial(const base::StringPiece& label, |
74 bool has_context, | 73 bool has_context, |
75 const base::StringPiece& context, | 74 const base::StringPiece& context, |
76 unsigned char* out, | 75 unsigned char* out, |
77 unsigned int outlen) OVERRIDE; | 76 unsigned int outlen) OVERRIDE; |
78 virtual NextProtoStatus GetNextProto(std::string* proto, | 77 virtual NextProtoStatus GetNextProto(std::string* proto, |
79 std::string* server_protos) OVERRIDE; | 78 std::string* server_protos) OVERRIDE; |
80 | 79 |
81 // StreamSocket implementation. | 80 // StreamSocket implementation. |
82 virtual int Connect(const CompletionCallback& callback) OVERRIDE; | 81 virtual int Connect(const CompletionCallback& callback) OVERRIDE; |
83 virtual void Disconnect() OVERRIDE; | 82 virtual void Disconnect() OVERRIDE; |
84 virtual bool IsConnected() const OVERRIDE; | 83 virtual bool IsConnected() const OVERRIDE; |
85 virtual bool IsConnectedAndIdle() const OVERRIDE; | 84 virtual bool IsConnectedAndIdle() const OVERRIDE; |
86 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE; | 85 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE; |
87 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; | 86 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; |
88 virtual const BoundNetLog& NetLog() const OVERRIDE; | 87 virtual const BoundNetLog& NetLog() const OVERRIDE; |
89 virtual void SetSubresourceSpeculation() OVERRIDE; | 88 virtual void SetSubresourceSpeculation() OVERRIDE; |
90 virtual void SetOmniboxSpeculation() OVERRIDE; | 89 virtual void SetOmniboxSpeculation() OVERRIDE; |
91 virtual bool WasEverUsed() const OVERRIDE; | 90 virtual bool WasEverUsed() const OVERRIDE; |
92 virtual bool UsingTCPFastOpen() const OVERRIDE; | 91 virtual bool UsingTCPFastOpen() const OVERRIDE; |
93 virtual int64 NumBytesRead() const OVERRIDE; | 92 virtual int64 NumBytesRead() const OVERRIDE; |
94 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; | 93 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; |
| 94 virtual bool GetSSLInfo(SSLInfo* ssl_info) const OVERRIDE; |
95 | 95 |
96 // Socket implementation. | 96 // Socket implementation. |
97 virtual int Read(IOBuffer* buf, | 97 virtual int Read(IOBuffer* buf, |
98 int buf_len, | 98 int buf_len, |
99 const CompletionCallback& callback) OVERRIDE; | 99 const CompletionCallback& callback) OVERRIDE; |
100 virtual int Write(IOBuffer* buf, | 100 virtual int Write(IOBuffer* buf, |
101 int buf_len, | 101 int buf_len, |
102 const CompletionCallback& callback) OVERRIDE; | 102 const CompletionCallback& callback) OVERRIDE; |
103 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; | 103 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; |
104 virtual bool SetSendBufferSize(int32 size) OVERRIDE; | 104 virtual bool SetSendBufferSize(int32 size) OVERRIDE; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 // Added the following code Debugging in release mode. | 189 // Added the following code Debugging in release mode. |
190 mutable base::Lock lock_; | 190 mutable base::Lock lock_; |
191 // This is mutable so that CalledOnValidThread can set it. | 191 // This is mutable so that CalledOnValidThread can set it. |
192 // It's guarded by |lock_|. | 192 // It's guarded by |lock_|. |
193 mutable base::PlatformThreadId valid_thread_id_; | 193 mutable base::PlatformThreadId valid_thread_id_; |
194 }; | 194 }; |
195 | 195 |
196 } // namespace net | 196 } // namespace net |
197 | 197 |
198 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 198 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
OLD | NEW |