Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Side by Side Diff: net/socket/ssl_server_socket_nss.h

Issue 1474983003: Support for client certs in ssl_server_socket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits on utils Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_SERVER_SOCKET_NSS_H_ 5 #ifndef NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_
6 #define NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_ 6 #define NET_SOCKET_SSL_SERVER_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 10 matching lines...) Expand all
21 21
22 namespace net { 22 namespace net {
23 23
24 class SSLServerSocketNSS : public SSLServerSocket { 24 class SSLServerSocketNSS : public SSLServerSocket {
25 public: 25 public:
26 // See comments on CreateSSLServerSocket for details of how these 26 // See comments on CreateSSLServerSocket for details of how these
27 // parameters are used. 27 // parameters are used.
28 SSLServerSocketNSS(scoped_ptr<StreamSocket> socket, 28 SSLServerSocketNSS(scoped_ptr<StreamSocket> socket,
29 scoped_refptr<X509Certificate> certificate, 29 scoped_refptr<X509Certificate> certificate,
30 crypto::RSAPrivateKey* key, 30 crypto::RSAPrivateKey* key,
31 const SSLServerConfig& ssl_config); 31 const SSLServerConfig& ssl_server_config);
32 ~SSLServerSocketNSS() override; 32 ~SSLServerSocketNSS() override;
33 33
34 // SSLServerSocket interface. 34 // SSLServerSocket interface.
35 int Handshake(const CompletionCallback& callback) override; 35 int Handshake(const CompletionCallback& callback) override;
36 36
37 // SSLSocket interface. 37 // SSLSocket interface.
38 int ExportKeyingMaterial(const base::StringPiece& label, 38 int ExportKeyingMaterial(const base::StringPiece& label,
39 bool has_context, 39 bool has_context,
40 const base::StringPiece& context, 40 const base::StringPiece& context,
41 unsigned char* out, 41 unsigned char* out,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // The NSS SSL state machine 131 // The NSS SSL state machine
132 PRFileDesc* nss_fd_; 132 PRFileDesc* nss_fd_;
133 133
134 // Buffers for the network end of the SSL state machine 134 // Buffers for the network end of the SSL state machine
135 memio_Private* nss_bufs_; 135 memio_Private* nss_bufs_;
136 136
137 // StreamSocket for sending and receiving data. 137 // StreamSocket for sending and receiving data.
138 scoped_ptr<StreamSocket> transport_socket_; 138 scoped_ptr<StreamSocket> transport_socket_;
139 139
140 // Options for the SSL socket. 140 // Options for the SSL socket.
141 SSLServerConfig ssl_config_; 141 SSLServerConfig ssl_server_config_;
142 142
143 // Certificate for the server. 143 // Certificate for the server.
144 scoped_refptr<X509Certificate> cert_; 144 scoped_refptr<X509Certificate> cert_;
145 145
146 // Private key used by the server. 146 // Private key used by the server.
147 scoped_ptr<crypto::RSAPrivateKey> key_; 147 scoped_ptr<crypto::RSAPrivateKey> key_;
148 148
149 State next_handshake_state_; 149 State next_handshake_state_;
150 bool completed_handshake_; 150 bool completed_handshake_;
151 151
152 DISALLOW_COPY_AND_ASSIGN(SSLServerSocketNSS); 152 DISALLOW_COPY_AND_ASSIGN(SSLServerSocketNSS);
153 }; 153 };
154 154
155 } // namespace net 155 } // namespace net
156 156
157 #endif // NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_ 157 #endif // NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698