transport_security_state_static.template 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Copyright (c) 2012 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. // This file is generated by net/tools/transport_security_state_generator/.
  5. #ifndef NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_
  6. #define NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_
  7. #include <stdint.h>
  8. #include <iterator>
  9. #include "base/time/time.h"
  10. #include "net/http/transport_security_state_source.h"
  11. // This is the time at which the key pins list was last updated.
  12. const base::Time kPinsListTimestamp = base::Time::FromTimeT([[PINS_LIST_TIMESTAMP]]);
  13. // These are SubjectPublicKeyInfo hashes for public key pinning. The
  14. // hashes are SHA256 digests.
  15. [[SPKI_HASHES]]
  16. static const char* const kExpectCTReportURIs[] = [[EXPECT_CT_REPORT_URIS]];
  17. // kNoRejectedPublicKeys is a placeholder for when no public keys are rejected.
  18. static const char* const kNoRejectedPublicKeys[] = {
  19. nullptr,
  20. };
  21. [[ACCEPTABLE_CERTS]]
  22. static const net::TransportSecurityStateSource::Pinset kPinsets[] = [[PINSETS]];
  23. // kHSTSHuffmanTree describes a Huffman tree. The nodes of the tree are pairs
  24. // of uint8s. The last node in the array is the root of the tree. Each pair is
  25. // two uint8_t values, the first is "left" and the second is "right". If a
  26. // uint8_t value has the MSB set then it represents a literal leaf value.
  27. // Otherwise it's a pointer to the n'th element of the array.
  28. static const uint8_t kHSTSHuffmanTree[] = [[HUFFMAN_TREE]];
  29. static const uint8_t kPreloadedHSTSData[] = [[HSTS_TRIE]];
  30. static const unsigned kPreloadedHSTSBits = [[HSTS_TRIE_BITS]];
  31. static const unsigned kHSTSRootPosition = [[HSTS_TRIE_ROOT]];
  32. static const net::TransportSecurityStateSource kHSTSSource = {
  33. kHSTSHuffmanTree,
  34. sizeof(kHSTSHuffmanTree),
  35. kPreloadedHSTSData,
  36. kPreloadedHSTSBits,
  37. kHSTSRootPosition,
  38. kExpectCTReportURIs,
  39. kPinsets,
  40. std::size(kPinsets)
  41. };
  42. #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_