Kaido Kert | 25902c6 | 2024-06-17 17:10:28 -0700 | [diff] [blame^] | 1 | // Copyright 2012 The Chromium Authors |
Andrew Top | 0d1858f | 2019-05-15 22:01:47 -0700 | [diff] [blame] | 2 | // 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 Kert | 25902c6 | 2024-06-17 17:10:28 -0700 | [diff] [blame^] | 12 | #include <iterator> |
| 13 | |
| 14 | #include "base/time/time.h" |
Andrew Top | 0d1858f | 2019-05-15 22:01:47 -0700 | [diff] [blame] | 15 | #include "net/http/transport_security_state_source.h" |
| 16 | |
Kaido Kert | 25902c6 | 2024-06-17 17:10:28 -0700 | [diff] [blame^] | 17 | // This is the time at which the key pins list was last updated. |
| 18 | const base::Time kPinsListTimestamp = base::Time::FromTimeT([[PINS_LIST_TIMESTAMP]]); |
| 19 | |
Andrew Top | 0d1858f | 2019-05-15 22:01:47 -0700 | [diff] [blame] | 20 | // These are SubjectPublicKeyInfo hashes for public key pinning. The |
| 21 | // hashes are SHA256 digests. |
| 22 | [[SPKI_HASHES]] |
| 23 | |
Andrew Top | 0d1858f | 2019-05-15 22:01:47 -0700 | [diff] [blame] | 24 | // kNoRejectedPublicKeys is a placeholder for when no public keys are rejected. |
| 25 | static const char* const kNoRejectedPublicKeys[] = { |
| 26 | nullptr, |
| 27 | }; |
| 28 | |
| 29 | [[ACCEPTABLE_CERTS]] |
| 30 | |
| 31 | static 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. |
| 38 | static const uint8_t kHSTSHuffmanTree[] = [[HUFFMAN_TREE]]; |
| 39 | |
| 40 | static const uint8_t kPreloadedHSTSData[] = [[HSTS_TRIE]]; |
| 41 | |
| 42 | static const unsigned kPreloadedHSTSBits = [[HSTS_TRIE_BITS]]; |
| 43 | static const unsigned kHSTSRootPosition = [[HSTS_TRIE_ROOT]]; |
| 44 | |
| 45 | static const net::TransportSecurityStateSource kHSTSSource = { |
| 46 | kHSTSHuffmanTree, |
| 47 | sizeof(kHSTSHuffmanTree), |
| 48 | kPreloadedHSTSData, |
| 49 | kPreloadedHSTSBits, |
| 50 | kHSTSRootPosition, |
Andrew Top | 0d1858f | 2019-05-15 22:01:47 -0700 | [diff] [blame] | 51 | kPinsets, |
Kaido Kert | 25902c6 | 2024-06-17 17:10:28 -0700 | [diff] [blame^] | 52 | std::size(kPinsets) |
Andrew Top | 0d1858f | 2019-05-15 22:01:47 -0700 | [diff] [blame] | 53 | }; |
| 54 | |
| 55 | #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_ |