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

Unified Diff: net/tools/domain_security_preload_generator/resources/transport_security_state_static.template

Issue 2551153003: Add static domain security state generator tool. (Closed)
Patch Set: Fix iOS? Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: net/tools/domain_security_preload_generator/resources/transport_security_state_static.template
diff --git a/net/tools/domain_security_preload_generator/resources/transport_security_state_static.template b/net/tools/domain_security_preload_generator/resources/transport_security_state_static.template
new file mode 100644
index 0000000000000000000000000000000000000000..1f76c1d7d327d80265d82d066de4ead5131fe3f1
--- /dev/null
+++ b/net/tools/domain_security_preload_generator/resources/transport_security_state_static.template
@@ -0,0 +1,50 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_
+#define NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_
+
+#include <stdint.h>
+
+enum SecondLevelDomainName [[DOMAIN_IDS]];
+
+// These are SubjectPublicKeyInfo hashes for public key pinning. The
+// hashes are SHA256 digests.
+[[SPKI_HASHES]]
+
+static const char* const kExpectCTReportURIs[] = [[EXPECT_CT_REPORT_URIS]];
+
+static const char* const kExpectStapleReportURIs[] = [[EXPECT_STAPLE_REPORT_URIS]];
+
+// kNoRejectedPublicKeys is a placeholder for when no public keys are rejected.
+static const char* const kNoRejectedPublicKeys[] = {
+ NULL,
+};
+
+// kNoReportURI is a placeholder for when a pinset does not have a report URI.
+static const char kNoReportURI[] = "";
+
+[[ACCEPTABLE_CERTS]]
+
+struct Pinset {
+ const char* const* const accepted_pins;
+ const char* const* const rejected_pins;
+ const char* const report_uri;
+};
+
+static const struct 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]];
+
+#endif // NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_

Powered by Google App Engine
This is Rietveld 408576698