OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_INFO_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_INFO_H_ |
6 #define CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_INFO_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_INFO_H_ |
7 | 7 |
8 #include <stddef.h> | |
9 #include <vector> | 8 #include <vector> |
10 | 9 |
11 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
12 #include "net/cert/x509_certificate.h" | 11 #include "net/cert/x509_certificate.h" |
13 #include "net/ssl/ssl_private_key.h" | 12 #include "net/ssl/ssl_private_key.h" |
14 | 13 |
15 namespace chromeos { | 14 namespace chromeos { |
16 namespace certificate_provider { | 15 namespace certificate_provider { |
17 | 16 |
18 // Holds all information of a certificate that must be synchronously available | 17 // Holds all information of a certificate that must be synchronously available |
19 // to implement net::SSLPrivateKey. | 18 // to implement net::SSLPrivateKey. |
20 struct CertificateInfo { | 19 struct CertificateInfo { |
21 CertificateInfo(); | 20 CertificateInfo(); |
22 CertificateInfo(const CertificateInfo& other); | 21 CertificateInfo(const CertificateInfo& other); |
23 ~CertificateInfo(); | 22 ~CertificateInfo(); |
24 | 23 |
25 net::SSLPrivateKey::Type type = net::SSLPrivateKey::Type::RSA; | |
26 size_t max_signature_length_in_bytes = 0; | |
27 scoped_refptr<net::X509Certificate> certificate; | 24 scoped_refptr<net::X509Certificate> certificate; |
28 std::vector<net::SSLPrivateKey::Hash> supported_hashes; | 25 std::vector<net::SSLPrivateKey::Hash> supported_hashes; |
29 }; | 26 }; |
30 using CertificateInfoList = std::vector<CertificateInfo>; | 27 using CertificateInfoList = std::vector<CertificateInfo>; |
31 | 28 |
32 } // namespace certificate_provider | 29 } // namespace certificate_provider |
33 } // namespace chromeos | 30 } // namespace chromeos |
34 | 31 |
35 #endif // CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_INFO_H_ | 32 #endif // CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_INFO_H_ |
OLD | NEW |