certificate_info.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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
  3. // found in the LICENSE file.
  4. #ifndef CHROMEOS_COMPONENTS_CERTIFICATE_PROVIDER_CERTIFICATE_INFO_H_
  5. #define CHROMEOS_COMPONENTS_CERTIFICATE_PROVIDER_CERTIFICATE_INFO_H_
  6. #include <stdint.h>
  7. #include <vector>
  8. #include "base/component_export.h"
  9. #include "base/memory/ref_counted.h"
  10. #include "net/cert/x509_certificate.h"
  11. #include "net/ssl/ssl_private_key.h"
  12. namespace chromeos {
  13. namespace certificate_provider {
  14. // Holds all information of a certificate that must be synchronously available
  15. // to implement net::SSLPrivateKey.
  16. struct COMPONENT_EXPORT(CERTIFICATE_PROVIDER) CertificateInfo {
  17. CertificateInfo();
  18. CertificateInfo(const CertificateInfo& other);
  19. ~CertificateInfo();
  20. bool operator==(const CertificateInfo& other) const;
  21. scoped_refptr<net::X509Certificate> certificate;
  22. // Contains the list of supported signature algorithms, using TLS 1.3's
  23. // SignatureScheme values. See net::SSLPrivateKey documentation for details.
  24. std::vector<uint16_t> supported_algorithms;
  25. };
  26. using CertificateInfoList = std::vector<CertificateInfo>;
  27. } // namespace certificate_provider
  28. } // namespace chromeos
  29. #endif // CHROMEOS_COMPONENTS_CERTIFICATE_PROVIDER_CERTIFICATE_INFO_H_