blob: ffce13fd11461708e4143102977340311c9e82aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_BASE_SSL_CERT_REQUEST_INFO_H_
#define NET_BASE_SSL_CERT_REQUEST_INFO_H_
#pragma once
#include <string>
#include <vector>
#include "base/memory/ref_counted.h"
#include "net/base/net_export.h"
namespace net {
class X509Certificate;
// The SSLCertRequestInfo class contains the info that allows a user to
// select a certificate to send to the SSL server for client authentication.
class NET_EXPORT SSLCertRequestInfo
: public base::RefCountedThreadSafe<SSLCertRequestInfo> {
public:
SSLCertRequestInfo();
void Reset();
// The host and port of the SSL server that requested client authentication.
std::string host_and_port;
// True if the server that issues this request was the HTTPS proxy used in
// the request. False, if the server was the origin server.
bool is_proxy;
// A list of client certificates that match the server's criteria in the
// SSL CertificateRequest message. In TLS 1.0, the CertificateRequest
// message is defined as:
// enum {
// rsa_sign(1), dss_sign(2), rsa_fixed_dh(3), dss_fixed_dh(4),
// (255)
// } ClientCertificateType;
//
// opaque DistinguishedName<1..2^16-1>;
//
// struct {
// ClientCertificateType certificate_types<1..2^8-1>;
// DistinguishedName certificate_authorities<3..2^16-1>;
// } CertificateRequest;
std::vector<scoped_refptr<X509Certificate> > client_certs;
private:
friend class base::RefCountedThreadSafe<SSLCertRequestInfo>;
~SSLCertRequestInfo();
};
} // namespace net
#endif // NET_BASE_SSL_CERT_REQUEST_INFO_H_
|