Skip to content

Instantly share code, notes, and snippets.

@tuxmartin
Created May 12, 2018 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuxmartin/4f7213643d9ae1096381c5542049fb95 to your computer and use it in GitHub Desktop.
Save tuxmartin/4f7213643d9ae1096381c5542049fb95 to your computer and use it in GitHub Desktop.
martin@martin:~/test$ script=$(curl -s http://localhost:8080/test.sh)
martin@martin:~/test$ sign=$(curl -s http://localhost:8080/test.sh.asc)
martin@martin:~/test$
martin@martin:~/test$ echo "$script"
#!/bin/bash
echo "ok"
martin@martin:~/test$ echo "$sign" | head -n1
-----BEGIN PGP SIGNATURE-----
martin@martin:~/test$
martin@martin:~/test$ gpg --no-default-keyring --keyring ./x.gpg --enable-special-filenames --verify - '-&5' <test.sh.asc 5<test.sh 2>/dev/null && echo "$script" | bash || echo "gpg_verify_error"
ok
martin@martin:~/test$
not working :-(
martin@martin:~/test$ script=$(curl -s http://localhost:8080/test.sh)
martin@martin:~/test$ sign=$(curl -s http://localhost:8080/test.sh.asc)
martin@martin:~/test$ gpg --no-default-keyring --keyring ./x.gpg --enable-special-filenames --verify - '-&5' <(echo "$sign") 5<(echo "$script") 2>/dev/null && echo "$script" | bash || echo "gpg_verify_error"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment