I like how GPG is integrated into the Mac and you can highlight any text and hit a key chord and it will encrypt/decrypt/sign/verify right on the spot from within any application. Wish it were just as tightly integrated everywhere else.
While the integration is really nice, for some reason it won't verify text. I can get it to verify files, but text in a file always gives me an error.
To get around this, I first made a really simple shell script
#!/bin/sh
pbpaste | gpg --verify
However, I really liked having the verify command be a service, so I made a service with Automator. I installed gnupg with brew, so gpg is in /usr/local/bin/
The first action is "Run Shell Script" with Pass input: "to stdin"
/usr/local/bin/gpg --verify
if [ "$?" -eq 0 ]; then
echo 'Success! The signature is valid!'
else
echo 'ERROR! The signature IS NOT valid (or the public key could not found)!'
fi
The second step is "Run Applescript" because it's the easiest way to get a dialog box.
on run {input, parameters}
display dialog "" & input buttons {"OK"}
return input
end run
Now if only we could sign bbcode and have it still validate.