// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file is generated by net/tools/transport_security_state_generator/.

#ifndef NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_
#define NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_

#include <stdint.h>

#include <iterator>

#include "base/time/time.h"
#include "net/http/transport_security_state_source.h"

// This is the time at which the key pins list was last updated.
const base::Time kPinsListTimestamp = base::Time::FromTimeT([[PINS_LIST_TIMESTAMP]]);

// These are SubjectPublicKeyInfo hashes for public key pinning. The
// hashes are SHA256 digests.
[[SPKI_HASHES]]

// kNoRejectedPublicKeys is a placeholder for when no public keys are rejected.
static const char* const kNoRejectedPublicKeys[] = {
    nullptr,
};

[[ACCEPTABLE_CERTS]]

static const net::TransportSecurityStateSource::Pinset kPinsets[] = [[PINSETS]];

// kHSTSHuffmanTree describes a Huffman tree. The nodes of the tree are pairs
// of uint8s. The last node in the array is the root of the tree. Each pair is
// two uint8_t values, the first is "left" and the second is "right". If a
// uint8_t value has the MSB set then it represents a literal leaf value.
// Otherwise it's a pointer to the n'th element of the array.
static const uint8_t kHSTSHuffmanTree[] = [[HUFFMAN_TREE]];

static const uint8_t kPreloadedHSTSData[] = [[HSTS_TRIE]];

static const unsigned kPreloadedHSTSBits = [[HSTS_TRIE_BITS]];
static const unsigned kHSTSRootPosition = [[HSTS_TRIE_ROOT]];

static const net::TransportSecurityStateSource kHSTSSource = {
  kHSTSHuffmanTree,
  sizeof(kHSTSHuffmanTree),
  kPreloadedHSTSData,
  kPreloadedHSTSBits,
  kHSTSRootPosition,
  kPinsets,
  std::size(kPinsets)
};

#endif  // NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_
