[git] GPGME - branch, ben/docs/2018-03, updated. gpgme-1.10.0-90-gb35aaef
by Ben McGinnes
cvs at cvs.gnupg.org
Thu Mar 15 01:19:24 CET 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".
The branch, ben/docs/2018-03 has been updated
via b35aaef7a3b793b8f6f5b42596c0a6a51e87f78c (commit)
from 6bc12a0eeb20409770cb8b923d08c18c2b730cb8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b35aaef7a3b793b8f6f5b42596c0a6a51e87f78c
Author: Ben McGinnes <ben at adversary.org>
Date: Thu Mar 15 11:18:02 2018 +1100
doc: python bindings howto
* Added text for verifying signatures.
diff --git a/lang/python/docs/GPGMEpythonHOWTOen.org b/lang/python/docs/GPGMEpythonHOWTOen.org
index 7e7265f..dca6999 100644
--- a/lang/python/docs/GPGMEpythonHOWTOen.org
+++ b/lang/python/docs/GPGMEpythonHOWTOen.org
@@ -936,6 +936,27 @@
pass
#+end_src
+ In both of the previous examples it is also possible to compare the
+ original data that was signed against the signed data in
+ =verified[0]= to see if it matches with something like this:
+
+ #+begin_src python
+ afile = open(filename, "rb")
+ text = afile.read()
+ afile.close()
+
+ if text == verified[0]:
+ print("Good signature.")
+ else:
+ pass
+ #+end_src
+
+ The following two examples, however, deal with detached signatures.
+ With his method of verification the data that was signed does not
+ get returned since it is already being explicitly referenced in the
+ first argument of =c.verify=. So =verified[0]= is None and only
+ the data in =verified[1]= is available.
+
#+begin_src python
import gpg
import time
-----------------------------------------------------------------------
Summary of changes:
lang/python/docs/GPGMEpythonHOWTOen.org | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
hooks/post-receive
--
GnuPG Made Easy
http://git.gnupg.org
More information about the Gnupg-commits
mailing list