From 4e0f638cd28368e4b157e66724263f2af8c426e1 Mon Sep 17 00:00:00 2001 From: James Bowes Date: Thu, 26 Jul 2012 13:56:45 -0300 Subject: [PATCH] print out original stored value --- thing.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/thing.rb b/thing.rb index 4a3b0a7..f73d334 100644 --- a/thing.rb +++ b/thing.rb @@ -49,6 +49,9 @@ def compress_prefix(hash) return hash end +def binary_write(file, hash) +end + if $0 == __FILE__ if ARGV.length == 0 cert_data = STDIN.read @@ -57,7 +60,7 @@ if $0 == __FILE__ content_hex = cert.extensions.detect {|ext| ext.oid == 'subjectKeyIdentifier' } abort('ERROR: no X509v3 extension for subjectKeyIdentifier') unless content_hex - puts akamai_hex_to_content_set(content_hex.value) + puts akamai_hex_to_content_set(content_hex.value).join("|") end ARGV.each do |arg| @@ -87,7 +90,8 @@ if $0 == __FILE__ h = mk_hash(chunks, h) end h = compress_prefix(h) - file.write(h.to_json) + binary_write(file, h) +# file.write(h.to_json) end puts "Wrote:\n [%d] %s\n [%d] %s" % [File.size(txt_name), txt_name, File.size(json_name), json_name]