blob: 7946e171b28a914f6e1dcec0275a7bf29fe303db [file] [log] [blame]
[email protected]0b45559b2009-06-12 21:45:111// 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_
7
8#include <string>
9#include <vector>
10
11#include "base/ref_counted.h"
12
13namespace net {
14
15class X509Certificate;
16
17// The SSLCertRequestInfo class contains the info that allows a user to
18// select a certificate to send to the SSL server for client authentication.
19class SSLCertRequestInfo
20 : public base::RefCountedThreadSafe<SSLCertRequestInfo> {
21 public:
22 // The host and port of the SSL server that requested client authentication.
23 std::string host_and_port;
24
25 // A list of client certificates that match the server's criteria in the
26 // SSL CertificateRequest message. In TLS 1.0, the CertificateRequest
27 // message is defined as:
[email protected]5e363962009-06-19 19:57:0128 // enum {
29 // rsa_sign(1), dss_sign(2), rsa_fixed_dh(3), dss_fixed_dh(4),
30 // (255)
31 // } ClientCertificateType;
32 //
33 // opaque DistinguishedName<1..2^16-1>;
34 //
[email protected]0b45559b2009-06-12 21:45:1135 // struct {
36 // ClientCertificateType certificate_types<1..2^8-1>;
37 // DistinguishedName certificate_authorities<3..2^16-1>;
38 // } CertificateRequest;
39 std::vector<scoped_refptr<X509Certificate> > client_certs;
[email protected]5389bc72009-11-05 23:34:2440
41 private:
42 friend class base::RefCountedThreadSafe<SSLCertRequestInfo>;
43
44 ~SSLCertRequestInfo() {}
[email protected]0b45559b2009-06-12 21:45:1145};
46
47} // namespace net
48
49#endif // NET_BASE_SSL_CERT_REQUEST_INFO_H_