91
Vývoj / Re:GPG - overeni podpisu promennych misto souboru
« kdy: 12. 05. 2018, 16:33:32 »
Diky za tip.
Nasel jsem tento prispevek: https://lists.gnupg.org/pipermail/gnupg-devel/2002-November/019343.html
A podle neho zkousim:
Problem je, ze se mi nedari predat obsah promennych:
Nasel jsem tento prispevek: https://lists.gnupg.org/pipermail/gnupg-devel/2002-November/019343.html
A podle neho zkousim:
Kód: [Vybrat]
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$
Pri predani cesty k souboru funguje krasne.Problem je, ze se mi nedari predat obsah promennych:
Kód: [Vybrat]
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"
Stale blika kurzor a na neco to ceka.