Skip to content

Instantly share code, notes, and snippets.

@jacyzon
Created January 15, 2015 05:08
Show Gist options
  • Select an option

  • Save jacyzon/5ec6bbc47b26b500807e to your computer and use it in GitHub Desktop.

Select an option

Save jacyzon/5ec6bbc47b26b500807e to your computer and use it in GitHub Desktop.
convert cert, key into json format
ruby -rjson -e 'puts JSON[Hash[Hash[*ARGV].map { |k,v| [k, File.read(v)] }]]' -- \
cert cert.pem \
key key.pem \
> example.com.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment