SignedTreeHead.h 935 B

12345678910111213141516171819202122232425262728293031
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef SignedTreeHead_h
  6. #define SignedTreeHead_h
  7. #include "SignedCertificateTimestamp.h"
  8. namespace mozilla { namespace ct {
  9. // Signed Tree Head as defined in section 3.5. of RFC-6962.
  10. struct SignedTreeHead
  11. {
  12. // Version enum in RFC 6962, Section 3.2. Note that while in the current
  13. // RFC the STH and SCT share the versioning scheme, there are plans in
  14. // RFC-6962-bis to use separate versions, so using a separate scheme here.
  15. enum class Version { V1 = 0, };
  16. Version version;
  17. uint64_t timestamp;
  18. uint64_t treeSize;
  19. Buffer sha256RootHash;
  20. DigitallySigned signature;
  21. };
  22. } } // namespace mozilla::ct
  23. #endif // SignedTreeHead_h