chromium / hstspreload

🔒🔍 A Go package to scan sites against requirements for Chromium-maintained HSTS preload list.
https://hstspreload.org
BSD 3-Clause "New" or "Revised" License
116 stars 37 forks source link

Add support for Expect-Staple report URIs #78

Closed dadrian closed 8 years ago

dadrian commented 8 years ago

This allows expect-staple report URIs to be added to the Huffman table generated by transport_security_state_static_generator.

I don't really expect this to be merge ready, but mostly wanted to check that I wasn't doing anything ridiculously wrong. For reference, Expect-Staple is described at https://docs.google.com/document/d/1aISglJIIwglcOAhqNfK-2vtQl-_dWAapc-VLDh-9-BE/edit#heading=h.rkpittae54q

lgarron commented 8 years ago

This script will hopefully go the way of the dodo soon, but I guess this is still the right place until then.

Assuming this code does the right thing, it looks good. Do you know if this makes the Huffman tree output larger, and how much?

dadrian commented 8 years ago

Pre-patch:

$ wc -c transport_security_state_static.h
730849 transport_security_state_static.h

Post-patch

$ wc -c transport_security_state_static.h 
741297 transport_security_state_static.h

That's including the 58 bytes for the (empty) Expect-Staple report URI table.

lgarron commented 8 years ago

Alright, not too bad. :-)

dadrian commented 8 years ago

As for correctness, I think does what I want? I mostly based it off of @estark37's similar change for Expect-CT (0936fb4d387a3e453d249ee76a6e40bfdd0977a9).

lgarron commented 8 years ago

Yeah, that should be fine. Is this safe to merge now, or does it depend on Chromium changes?

dadrian commented 8 years ago

:tada: