Skip to content

Instantly share code, notes, and snippets.

@evanphx
Created October 29, 2014 16:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save evanphx/358c1627b69f7a33fca6 to your computer and use it in GitHub Desktop.
Save evanphx/358c1627b69f7a33fca6 to your computer and use it in GitHub Desktop.
Tachyon installer with hash verification
curl http://tachyon.vektra.io/install.sh > it.sh && test $(openssl sha1 < it.sh) = "23fb0450b152dfaa8331dd37c3a4c13d4de9dbb8" && bash it.sh
@jordansissel
Copy link

curl -s http://tachyon.vektra.io/install.sh > it.sh && openssl sha1 < it.sh | grep -q '23fb0450b152dfaa8331dd37c3a4c13d4de9dbb8$' && echo bash it.sh

Works on Ubuntu 14.04 and OSX 10.9 despite output differences. Maybe this is good enough?

Also works on Ubuntu 12.04 and CentOS 6.2

@evanphx
Copy link
Author

evanphx commented Oct 29, 2014

Very nice! Good idea @jordansissel!

@dstufft
Copy link

dstufft commented Oct 29, 2014

where does the hash come from? How are users expected to get it? If the answer is "copy and paste this from a page secured by https" then this doesn't add anything as anyone able to attack the https:// URL in the curl download can attack the page that they used to get the hash.

@jordansissel
Copy link

@dstufft Where does the source of any trust system come from? There's a huge difference between "this isn't fully solved" and "this solution is vastly superior to the prior solution". Security is layers! Be chill. Have a hug! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment