Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Side by Side Diff: net/http/transport_security_state_static.template

Issue 2906633003: Add a build flag to configure bundling of HSTS preload list (Closed)
Patch Set: address Ryan comments Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file is generated by net/tools/transport_security_state_generator/. 5 // This file is generated by net/tools/transport_security_state_generator/.
6 6
7 #ifndef NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_ 7 #ifndef NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_
8 #define NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_ 8 #define NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_
9 9
10 #include <stdint.h> 10 #include <stdint.h>
11 11
12 #include "net/http/transport_security_state_source.h" 12 #include "net/http/transport_security_state_source.h"
13 13
14 // These are SubjectPublicKeyInfo hashes for public key pinning. The 14 // These are SubjectPublicKeyInfo hashes for public key pinning. The
15 // hashes are SHA256 digests. 15 // hashes are SHA256 digests.
16 [[SPKI_HASHES]] 16 [[SPKI_HASHES]]
17 17
18 static const char* const kExpectCTReportURIs[] = [[EXPECT_CT_REPORT_URIS]]; 18 static const char* const kExpectCTReportURIs[] = [[EXPECT_CT_REPORT_URIS]];
19 19
20 static const char* const kExpectStapleReportURIs[] = [[EXPECT_STAPLE_REPORT_URIS ]]; 20 static const char* const kExpectStapleReportURIs[] = [[EXPECT_STAPLE_REPORT_URIS ]];
21 21
22 // kNoRejectedPublicKeys is a placeholder for when no public keys are rejected. 22 // kNoRejectedPublicKeys is a placeholder for when no public keys are rejected.
23 static const char* const kNoRejectedPublicKeys[] = { 23 static const char* const kNoRejectedPublicKeys[] = {
24 nullptr, 24 nullptr,
25 }; 25 };
26 26
27 // kNoReportURI is a placeholder for when a pinset does not have a report URI.
28 static const char kNoReportURI[] = "";
29
30 [[ACCEPTABLE_CERTS]] 27 [[ACCEPTABLE_CERTS]]
31 28
32 static const net::TransportSecurityStateSource::Pinset kPinsets[] = [[PINSETS]]; 29 static const net::TransportSecurityStateSource::Pinset kPinsets[] = [[PINSETS]];
33 30
34 // kHSTSHuffmanTree describes a Huffman tree. The nodes of the tree are pairs 31 // kHSTSHuffmanTree describes a Huffman tree. The nodes of the tree are pairs
35 // of uint8s. The last node in the array is the root of the tree. Each pair is 32 // of uint8s. The last node in the array is the root of the tree. Each pair is
36 // two uint8_t values, the first is "left" and the second is "right". If a 33 // two uint8_t values, the first is "left" and the second is "right". If a
37 // uint8_t value has the MSB set then it represents a literal leaf value. 34 // uint8_t value has the MSB set then it represents a literal leaf value.
38 // Otherwise it's a pointer to the n'th element of the array. 35 // Otherwise it's a pointer to the n'th element of the array.
39 static const uint8_t kHSTSHuffmanTree[] = [[HUFFMAN_TREE]]; 36 static const uint8_t kHSTSHuffmanTree[] = [[HUFFMAN_TREE]];
40 37
41 static const uint8_t kPreloadedHSTSData[] = [[HSTS_TRIE]]; 38 static const uint8_t kPreloadedHSTSData[] = [[HSTS_TRIE]];
42 39
43 static const unsigned kPreloadedHSTSBits = [[HSTS_TRIE_BITS]]; 40 static const unsigned kPreloadedHSTSBits = [[HSTS_TRIE_BITS]];
44 static const unsigned kHSTSRootPosition = [[HSTS_TRIE_ROOT]]; 41 static const unsigned kHSTSRootPosition = [[HSTS_TRIE_ROOT]];
45 42
46 static const net::TransportSecurityStateSource kHSTSSource = { 43 static const net::TransportSecurityStateSource kHSTSSource = {
47 kHSTSHuffmanTree, 44 kHSTSHuffmanTree,
48 sizeof(kHSTSHuffmanTree), 45 sizeof(kHSTSHuffmanTree),
49 kPreloadedHSTSData, 46 kPreloadedHSTSData,
50 kPreloadedHSTSBits, 47 kPreloadedHSTSBits,
51 kHSTSRootPosition, 48 kHSTSRootPosition,
52 kExpectCTReportURIs, 49 kExpectCTReportURIs,
53 kExpectStapleReportURIs, 50 kExpectStapleReportURIs,
54 kPinsets, 51 kPinsets,
55 arraysize(kPinsets) 52 arraysize(kPinsets)
56 }; 53 };
57 54
58 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_ 55 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698