Created
May 12, 2018 21:07
-
-
Save tuxmartin/4f7213643d9ae1096381c5542049fb95 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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