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
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org https://lists.gnupg.org/mailman/listinfo/gnupg-users