I have detach signed a file using command line and the following command:
gpg --output doc.sig --detach-sig "import json.py"
When I use the following python script to verify the same file using the doc.sig
it always returns unverified
and I am not sure what I am doing wrong.
Python Script:
import gnupg
import tempfile
gpg = gnupg.GPG('/usr/local/bin/gpg')
verified = gpg.verify_file('doc.sig','import json.py')
print ("Verified" if verified else "Unverified")
Okay, the answer to the above problem is that you want to make sure you don't have multiple gnupg/gpg installations.
Just one python-gnupg
install.