blob: a8ab0731d18c7dbade86c88e14fb277dc6871f40 [file] [log] [blame]
Kaido Kert25902c62024-06-17 17:10:28 -07001// Copyright 2012 The Chromium Authors
Andrew Top0d1858f2019-05-15 22:01:47 -07002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// This file is generated by net/tools/transport_security_state_generator/.
6
7#ifndef NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_
8#define NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_
9
10#include <stdint.h>
11
Kaido Kert25902c62024-06-17 17:10:28 -070012#include <iterator>
13
14#include "base/time/time.h"
Andrew Top0d1858f2019-05-15 22:01:47 -070015#include "net/http/transport_security_state_source.h"
16
Kaido Kert25902c62024-06-17 17:10:28 -070017// This is the time at which the key pins list was last updated.
18const base::Time kPinsListTimestamp = base::Time::FromTimeT([[PINS_LIST_TIMESTAMP]]);
19
Andrew Top0d1858f2019-05-15 22:01:47 -070020// These are SubjectPublicKeyInfo hashes for public key pinning. The
21// hashes are SHA256 digests.
22[[SPKI_HASHES]]
23
Andrew Top0d1858f2019-05-15 22:01:47 -070024// kNoRejectedPublicKeys is a placeholder for when no public keys are rejected.
25static const char* const kNoRejectedPublicKeys[] = {
26 nullptr,
27};
28
29[[ACCEPTABLE_CERTS]]
30
31static const net::TransportSecurityStateSource::Pinset kPinsets[] = [[PINSETS]];
32
33// kHSTSHuffmanTree describes a Huffman tree. The nodes of the tree are pairs
34// of uint8s. The last node in the array is the root of the tree. Each pair is
35// two uint8_t values, the first is "left" and the second is "right". If a
36// uint8_t value has the MSB set then it represents a literal leaf value.
37// Otherwise it's a pointer to the n'th element of the array.
38static const uint8_t kHSTSHuffmanTree[] = [[HUFFMAN_TREE]];
39
40static const uint8_t kPreloadedHSTSData[] = [[HSTS_TRIE]];
41
42static const unsigned kPreloadedHSTSBits = [[HSTS_TRIE_BITS]];
43static const unsigned kHSTSRootPosition = [[HSTS_TRIE_ROOT]];
44
45static const net::TransportSecurityStateSource kHSTSSource = {
46 kHSTSHuffmanTree,
47 sizeof(kHSTSHuffmanTree),
48 kPreloadedHSTSData,
49 kPreloadedHSTSBits,
50 kHSTSRootPosition,
Andrew Top0d1858f2019-05-15 22:01:47 -070051 kPinsets,
Kaido Kert25902c62024-06-17 17:10:28 -070052 std::size(kPinsets)
Andrew Top0d1858f2019-05-15 22:01:47 -070053};
54
55#endif // NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_