Skip to content

Instantly share code, notes, and snippets.

@irori
Created April 11, 2018 04:03
Show Gist options
  • Save irori/8b15709cf0241bd0fc1e4edf3e8d4535 to your computer and use it in GitHub Desktop.
Save irori/8b15709cf0241bd0fc1e4edf3e8d4535 to your computer and use it in GitHub Desktop.
SignedCertificateTimestampList generator
#!/usr/bin/ruby
# Combines SCTs into a SignedCertificateTimestampList structure.
# usage: sctlist.rb a.sct b.sct ...
buf = ""
ARGV.each do |f|
sct = File.read(f, :encoding => Encoding::ASCII_8BIT)
buf += [sct.bytesize].pack('n') + sct
end
print [buf.bytesize].pack('n') + buf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment