opaque_attestation_statement.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright 2018 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 DEVICE_FIDO_OPAQUE_ATTESTATION_STATEMENT_H_
  5. #define DEVICE_FIDO_OPAQUE_ATTESTATION_STATEMENT_H_
  6. #include <string>
  7. #include "base/component_export.h"
  8. #include "components/cbor/values.h"
  9. #include "device/fido/attestation_statement.h"
  10. namespace device {
  11. // https://www.w3.org/TR/2017/WD-webauthn-20170505/#fido-u2f-attestation
  12. class COMPONENT_EXPORT(DEVICE_FIDO) OpaqueAttestationStatement
  13. : public AttestationStatement {
  14. public:
  15. OpaqueAttestationStatement(std::string attestation_format,
  16. cbor::Value attestation_statement_map);
  17. OpaqueAttestationStatement(const OpaqueAttestationStatement&) = delete;
  18. OpaqueAttestationStatement& operator=(const OpaqueAttestationStatement&) =
  19. delete;
  20. ~OpaqueAttestationStatement() override;
  21. // AttestationStatement:
  22. cbor::Value AsCBOR() const override;
  23. bool IsSelfAttestation() const override;
  24. bool IsAttestationCertificateInappropriatelyIdentifying() const override;
  25. absl::optional<base::span<const uint8_t>> GetLeafCertificate() const override;
  26. private:
  27. cbor::Value attestation_statement_map_;
  28. };
  29. } // namespace device
  30. #endif // DEVICE_FIDO_OPAQUE_ATTESTATION_STATEMENT_H_