how to use WKD with python3?
Andre Heinecke
aheinecke at gnupg.org
Wed Jun 3 17:16:52 CEST 2020
Hi,
I'll try to answer this even though I don't completely know how to do it in
python, but I know how it's done in C / C++.
On Wednesday 3 June 2020 12:52:46 CEST Ludwig Reiter wrote:
> how do I get public keys over WKD with python3/gpgme?
you can do a keylist with KEYLIST_MODE_LOCATE for a single mbox. If python
does not have that (it was added later this mode is KEYLIST_MODE_EXTERNAL |
KEYLIST_MODE_LOCAL)
So I think it would be:
ctx.keylist(some_uid, mode=(gpg.constants.keylist.mode.LOCAL |
gpg.constants.keylist.mode.EXTERNAL))
or:
ctx.keylist(some_uid, mode=gpg.constants.keylist.mode.LOCATE)
> I didn't find anything about this in the web. It seems like python3-gpg
> doesn't support to use WKD.
You can force that only WKD is used in the keylist if you set the auto-key-
locate context flag (gpgme_set_ctx_flag) to "clear,nodefault,wkd".
> Can someone point me to a good start point?
Good starting points are usually our "run-foo" test tools under gpgme/tests. I
usually use them as a starting point and example.
We maintain these tools because we usually use them when developing new
features. ;-)
Best regards,
Andre
--
GnuPG.com - a brand of g10 Code, the GnuPG experts.
g10 Code GmbH, Erkrath/Germany, AG Wuppertal HRB14459
GF Werner Koch, USt-Id DE215605608, www.g10code.com.
GnuPG e.V., Rochusstr. 44, D-40479 Düsseldorf. VR 11482 Düsseldorf
Vorstand: W.Koch, B.Reiter, A.Heinecke Mail: board at gnupg.org
Finanzamt D-Altstadt, St-Nr: 103/5923/1779. Tel: +49-211-28010702
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20200603/46f787da/attachment.sig>
More information about the Gnupg-users
mailing list