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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 virtual int Read(IOBuffer* buf, | 99 virtual int Read(IOBuffer* buf, |
100 int buf_len, | 100 int buf_len, |
101 const CompletionCallback& callback) OVERRIDE; | 101 const CompletionCallback& callback) OVERRIDE; |
102 virtual int Write(IOBuffer* buf, | 102 virtual int Write(IOBuffer* buf, |
103 int buf_len, | 103 int buf_len, |
104 const CompletionCallback& callback) OVERRIDE; | 104 const CompletionCallback& callback) OVERRIDE; |
105 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; | 105 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; |
106 virtual bool SetSendBufferSize(int32 size) OVERRIDE; | 106 virtual bool SetSendBufferSize(int32 size) OVERRIDE; |
107 virtual ServerBoundCertService* GetServerBoundCertService() const OVERRIDE; | 107 virtual ServerBoundCertService* GetServerBoundCertService() const OVERRIDE; |
108 | 108 |
109 protected: | |
110 // SSLClientSocket implementation. | |
111 virtual const X509Certificate* GetUnverifiedServerCertificateChain() const | |
Ryan Sleevi
2014/03/12 23:12:03
Don't return raw pointers to ref-counted types. It
haavardm
2014/03/13 10:32:02
OK. Didn't realize X509Certificate was immutable.
| |
112 OVERRIDE; | |
113 | |
109 private: | 114 private: |
110 // Helper class to handle marshalling any NSS interaction to and from the | 115 // Helper class to handle marshalling any NSS interaction to and from the |
111 // NSS and network task runners. Not every call needs to happen on the Core | 116 // NSS and network task runners. Not every call needs to happen on the Core |
112 class Core; | 117 class Core; |
113 | 118 |
114 enum State { | 119 enum State { |
115 STATE_NONE, | 120 STATE_NONE, |
116 STATE_HANDSHAKE, | 121 STATE_HANDSHAKE, |
117 STATE_HANDSHAKE_COMPLETE, | 122 STATE_HANDSHAKE_COMPLETE, |
118 STATE_VERIFY_CERT, | 123 STATE_VERIFY_CERT, |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 // Added the following code Debugging in release mode. | 206 // Added the following code Debugging in release mode. |
202 mutable base::Lock lock_; | 207 mutable base::Lock lock_; |
203 // This is mutable so that CalledOnValidThread can set it. | 208 // This is mutable so that CalledOnValidThread can set it. |
204 // It's guarded by |lock_|. | 209 // It's guarded by |lock_|. |
205 mutable base::PlatformThreadId valid_thread_id_; | 210 mutable base::PlatformThreadId valid_thread_id_; |
206 }; | 211 }; |
207 | 212 |
208 } // namespace net | 213 } // namespace net |
209 | 214 |
210 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 215 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
OLD | NEW |