gpgme can't find keys

Ingo Klöcker kloecker at kde.org
Fri Mar 4 22:57:27 CET 2022


On Freitag, 4. März 2022 16:33:57 CET William Yu via Gnupg-users wrote:
> I am running Ubuntu 20.04.4 LTS, I installed libgpgme11 from Ubuntu with
> version 1.13.1-7ubuntu2 and I installed gpg2 with gpg 2.2.19, libgcrypt
> 1.8.5.
> 
> My problem is this, I try to use keys on my computer in a C program and sign
> something with it. Currently my program can't find any keys. I can see 2 of
> my keys in terminal with gpg2 --list-keys. One key is 1024 bits, no
> passphrase, type 4(RSA) key, the other is the same but type 1 + subkey. I
> attached my test c program, which basically just configured everything
> according to manual and try to read out the keys. I also tried to generate
> key with my test program but it returned GPG_ERR_NOT_SUPPORTED.
> 
> I setup everything as default, so my home folder is /home/wyu/.gnupg, gpg2
> locates in /usr/bin/gpg2 and so on. Maybe someone could tell me what have I
> missed?

Please have a look at the test programs that you can find under
  https://dev.gnupg.org/source/gpgme/browse/master/tests/
in particular, run-keylist.c which shows how to list keys and run-genkey.c 
which shows how to generate keys.

Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20220304/8bad3bff/attachment.sig>


More information about the Gnupg-users mailing list