Skip to content

Instantly share code, notes, and snippets.

@larsks
Created July 29, 2009 18:50
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 larsks/158331 to your computer and use it in GitHub Desktop.
Save larsks/158331 to your computer and use it in GitHub Desktop.
>>> import gpgme
>>> ctx = gpgme.Context()
>>> data = open('sample.sh.asc')
>>> import sys
>>> sig = ctx.verify(data, None, sys.stdout)
#!/bin/sh
echo "Hello, world."
>>> sig[0].validity
4
>>> gpgme.VALIDITY_FULL
4
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment