Skip to content

Commit

Permalink
Add support for entries with 5 layers
Browse files Browse the repository at this point in the history
  • Loading branch information
sethmlarson committed Jan 4, 2024
1 parent 8897ebf commit ec75540
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build-hstspreload.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def main():

print("Encoding labels into binary...")
bin_layers = {}
for layer in range(4):
for layer in range(5):
for checksum in range(256):
chunks = []
for is_leaf, include_subdomains, label in sorted(
Expand All @@ -100,7 +100,7 @@ def main():
print("Encoding layer offsets into jump table...")
jump_table = []
current_offset = 0
for layer in range(4):
for layer in range(5):
jump_table_for_layer = []
for checksum in range(256):
bin_layer = bin_layers[(layer, checksum)]
Expand All @@ -115,7 +115,7 @@ def main():
print("Writing data into hstspreload.bin...")
with open("hstspreload/hstspreload.bin", "wb") as f:
f.truncate()
for layer in range(4):
for layer in range(5):
for checksum in range(256):
f.write(bin_layers[(layer, checksum)])

Expand Down

0 comments on commit ec75540

Please sign in to comment.