[email protected] | 0b45559b | 2009-06-12 21:45:11 | [diff] [blame] | 1 | // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef NET_BASE_SSL_CERT_REQUEST_INFO_H_ | ||||
6 | #define NET_BASE_SSL_CERT_REQUEST_INFO_H_ | ||||
[email protected] | 32b76ef | 2010-07-26 23:08:24 | [diff] [blame] | 7 | #pragma once |
[email protected] | 0b45559b | 2009-06-12 21:45:11 | [diff] [blame] | 8 | |
9 | #include <string> | ||||
10 | #include <vector> | ||||
11 | |||||
12 | #include "base/ref_counted.h" | ||||
13 | |||||
14 | namespace net { | ||||
15 | |||||
16 | class X509Certificate; | ||||
17 | |||||
18 | // The SSLCertRequestInfo class contains the info that allows a user to | ||||
19 | // select a certificate to send to the SSL server for client authentication. | ||||
20 | class SSLCertRequestInfo | ||||
21 | : public base::RefCountedThreadSafe<SSLCertRequestInfo> { | ||||
22 | public: | ||||
[email protected] | 9349cfb | 2010-08-31 18:00:53 | [diff] [blame^] | 23 | SSLCertRequestInfo(); |
24 | |||||
[email protected] | 0b45559b | 2009-06-12 21:45:11 | [diff] [blame] | 25 | // The host and port of the SSL server that requested client authentication. |
26 | std::string host_and_port; | ||||
27 | |||||
28 | // A list of client certificates that match the server's criteria in the | ||||
29 | // SSL CertificateRequest message. In TLS 1.0, the CertificateRequest | ||||
30 | // message is defined as: | ||||
[email protected] | 5e36396 | 2009-06-19 19:57:01 | [diff] [blame] | 31 | // enum { |
32 | // rsa_sign(1), dss_sign(2), rsa_fixed_dh(3), dss_fixed_dh(4), | ||||
33 | // (255) | ||||
34 | // } ClientCertificateType; | ||||
35 | // | ||||
36 | // opaque DistinguishedName<1..2^16-1>; | ||||
37 | // | ||||
[email protected] | 0b45559b | 2009-06-12 21:45:11 | [diff] [blame] | 38 | // struct { |
39 | // ClientCertificateType certificate_types<1..2^8-1>; | ||||
40 | // DistinguishedName certificate_authorities<3..2^16-1>; | ||||
41 | // } CertificateRequest; | ||||
42 | std::vector<scoped_refptr<X509Certificate> > client_certs; | ||||
[email protected] | 5389bc7 | 2009-11-05 23:34:24 | [diff] [blame] | 43 | |
44 | private: | ||||
45 | friend class base::RefCountedThreadSafe<SSLCertRequestInfo>; | ||||
46 | |||||
[email protected] | 9349cfb | 2010-08-31 18:00:53 | [diff] [blame^] | 47 | ~SSLCertRequestInfo(); |
[email protected] | 0b45559b | 2009-06-12 21:45:11 | [diff] [blame] | 48 | }; |
49 | |||||
50 | } // namespace net | ||||
51 | |||||
52 | #endif // NET_BASE_SSL_CERT_REQUEST_INFO_H_ |