[git] GPGME - branch, master, updated. gpgme-1.11.1-299-g3622576

by Ben McGinnes cvs at cvs.gnupg.org
Sat Sep 22 21:43:21 CEST 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, master has been updated
       via  3622576105ae1924d9b40ce0d09bf9a7accc0ed1 (commit)
      from  6878126b6f53cdf7daeeaf68116dda008564c2fa (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 3622576105ae1924d9b40ce0d09bf9a7accc0ed1
Author: Ben McGinnes <ben at adversary.org>
Date:   Sun Sep 23 05:37:40 2018 +1000

    docs: python bindings howto
    
    * Confirmed that updates to the tests have significant'y improved that
      output.
    * Updated some of the additional notes for the section on hkp4py.
    ** This is in anticipation adding at least import examples using that
       module as well.  It may also include adding examples of exporting a
       key and uploading it to the keyservers.
    
    Tested-by: Ben McGinnes <ben at adversary.org>
    Signed-off-by: Ben McGinnes <ben at adversary.org>

diff --git a/doc/gpgme-python-howto.texi b/doc/gpgme-python-howto.texi
index 85a8dcf..e78c6f8 100644
--- a/doc/gpgme-python-howto.texi
+++ b/doc/gpgme-python-howto.texi
@@ -2265,7 +2265,7 @@ support for Python 2.7 as well and is available via PyPI.
 
 Since it rewrites the @samp{hkp} protocol prefix as @samp{http} and @samp{hkps} as
 @samp{https}, the module is able to be used even with servers which do not
-support the full scope of keyserver functions.  It will work quite
+support the full scope of keyserver functions.  It also works quite
 readily when incorporated into a @ref{C plus Python plus SWIG plus Cython, , Cython} generated and compiled version
 of any code.
 
@@ -2281,6 +2281,23 @@ The hkp4py module returns key data via requests as string literals
 the retrurned key data must be encoded to UTF-8 when importing that
 key material using a @samp{gpg.Context().key_import()} method.
 
+For this reason an alternative method has been added to the @samp{search}
+function of @samp{hkp4py.KeyServer()} which returns the key in the correct
+format as expected by @samp{key_import}.  When importing using this module,
+it is now possible to import with this:
+
+ at example
+for key in keys:
+    if key.revoked is False:
+        gpg.Context().key_import(key.key_blob)
+    else:
+        pass
+ at end example
+
+Without that recent addition it would have been necessary to encode
+the contents of each @samp{hkp4py.KeyServer().search()[i].key} in
+ at samp{hkp4py.KeyServer().search()} before trying to import it.
+
 @node Copyright and Licensing
 @chapter Copyright and Licensing
 
diff --git a/lang/python/docs/gpgme-python-howto.org b/lang/python/docs/gpgme-python-howto.org
index 53ca3a5..4373e0f 100644
--- a/lang/python/docs/gpgme-python-howto.org
+++ b/lang/python/docs/gpgme-python-howto.org
@@ -2169,7 +2169,7 @@ support for Python 2.7 as well and is available via PyPI.
 
 Since it rewrites the =hkp= protocol prefix as =http= and =hkps= as
 =https=, the module is able to be used even with servers which do not
-support the full scope of keyserver functions.  It will work quite
+support the full scope of keyserver functions.  It also works quite
 readily when incorporated into a [[#cython][Cython]] generated and compiled version
 of any code.
 
@@ -2184,6 +2184,24 @@ The hkp4py module returns key data via requests as string literals
 the retrurned key data must be encoded to UTF-8 when importing that
 key material using a =gpg.Context().key_import()= method.
 
+For this reason an alternative method has been added to the =search=
+function of =hkp4py.KeyServer()= which returns the key in the correct
+format as expected by =key_import=.  When importing using this module,
+it is now possible to import with this:
+
+#+BEGIN_SRC python -i
+for key in keys:
+    if key.revoked is False:
+        gpg.Context().key_import(key.key_blob)
+    else:
+        pass
+#+END_SRC
+
+Without that recent addition it would have been necessary to encode
+the contents of each =hkp4py.KeyServer().search()[i].key= in
+=hkp4py.KeyServer().search()= before trying to import it.
+
+
 
 * Copyright and Licensing
   :PROPERTIES:

-----------------------------------------------------------------------

Summary of changes:
 doc/gpgme-python-howto.texi             | 19 ++++++++++++++++++-
 lang/python/docs/gpgme-python-howto.org | 20 +++++++++++++++++++-
 2 files changed, 37 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list