Retrieving a key from a keyserver with gpgme

Werner Koch wk at gnupg.org
Thu Sep 10 12:55:32 CEST 2015


On Thu, 10 Sep 2015 00:48, jeroen.ooms at stat.ucla.edu said:

> 1) Is there any way I can check if gpg.conf has a keyserver
> configured? Or better: can I set a keyserver in gpgme, rather than use
> the one from gpg.conf (i.e. the --keyserver param in gpg)

You can use gpgme to manage options.  Or on the command line use

 gpgconf --list-options gpg | awk -F: '$1=="keyserver" && $2!=1 {print $10}

You need to decode the output; in particular the leading '"' indicates
that a string follows which is percent escaped.

> 2) Currently the export step fails for some keys. For example: the
> first one succeeds, but the second one does not. Why is this?
>
> ./lookup 0x7638D0442B90D010e
> ./lookup 0x924FC6ADC80B5E36

Assuming lookup takes a standard gpg user id, the _first_ one has one
hexdigit to much.


Salam-Shalom,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gnupg-devel mailing list