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

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 Created 4 years, 10 months 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
« no previous file with comments | « net/socket/ssl_client_socket_openssl.cc ('k') | net/socket/ssl_server_socket_nss.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 11 matching lines...) Expand all
22 22
23 namespace net { 23 namespace net {
24 24
25 class SSLServerSocketNSS : public SSLServerSocket { 25 class SSLServerSocketNSS : public SSLServerSocket {
26 public: 26 public:
27 // See comments on CreateSSLServerSocket for details of how these 27 // See comments on CreateSSLServerSocket for details of how these
28 // parameters are used. 28 // parameters are used.
29 SSLServerSocketNSS(scoped_ptr<StreamSocket> socket, 29 SSLServerSocketNSS(scoped_ptr<StreamSocket> socket,
30 scoped_refptr<X509Certificate> certificate, 30 scoped_refptr<X509Certificate> certificate,
31 const crypto::RSAPrivateKey& key, 31 const crypto::RSAPrivateKey& key,
32 const SSLServerConfig& ssl_config); 32 const SSLServerConfig& ssl_server_config);
33 ~SSLServerSocketNSS() override; 33 ~SSLServerSocketNSS() override;
34 34
35 // SSLServerSocket interface. 35 // SSLServerSocket interface.
36 int Handshake(const CompletionCallback& callback) override; 36 int Handshake(const CompletionCallback& callback) override;
37 37
38 // SSLSocket interface. 38 // SSLSocket interface.
39 int ExportKeyingMaterial(const base::StringPiece& label, 39 int ExportKeyingMaterial(const base::StringPiece& label,
40 bool has_context, 40 bool has_context,
41 const base::StringPiece& context, 41 const base::StringPiece& context,
42 unsigned char* out, 42 unsigned char* out,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // The NSS SSL state machine 132 // The NSS SSL state machine
133 PRFileDesc* nss_fd_; 133 PRFileDesc* nss_fd_;
134 134
135 // Buffers for the network end of the SSL state machine 135 // Buffers for the network end of the SSL state machine
136 memio_Private* nss_bufs_; 136 memio_Private* nss_bufs_;
137 137
138 // StreamSocket for sending and receiving data. 138 // StreamSocket for sending and receiving data.
139 scoped_ptr<StreamSocket> transport_socket_; 139 scoped_ptr<StreamSocket> transport_socket_;
140 140
141 // Options for the SSL socket. 141 // Options for the SSL socket.
142 SSLServerConfig ssl_config_; 142 SSLServerConfig ssl_server_config_;
143 143
144 // Certificate for the server. 144 // Certificate for the server.
145 scoped_refptr<X509Certificate> cert_; 145 scoped_refptr<X509Certificate> cert_;
146 146
147 // Private key used by the server. 147 // Private key used by the server.
148 scoped_ptr<crypto::RSAPrivateKey> key_; 148 scoped_ptr<crypto::RSAPrivateKey> key_;
149 149
150 State next_handshake_state_; 150 State next_handshake_state_;
151 bool completed_handshake_; 151 bool completed_handshake_;
152 152
153 DISALLOW_COPY_AND_ASSIGN(SSLServerSocketNSS); 153 DISALLOW_COPY_AND_ASSIGN(SSLServerSocketNSS);
154 }; 154 };
155 155
156 } // namespace net 156 } // namespace net
157 157
158 #endif // NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_ 158 #endif // NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_openssl.cc ('k') | net/socket/ssl_server_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698