Changing trust in GPGME

Werner Koch wk at gnupg.org
Wed Jan 13 10:39:28 CET 2010


On Tue, 12 Jan 2010 23:41:52 +0100, Piotr Bratkowski wrote:

> I have this code. And when I see output owner_trust = 4, but in gpg
> from system I get 0. Do I need to somehow save this changes??

This is not directly supported by GPGME.  You need to write an edit
interactor to control the gpg --edit-key command.  GPA has code which
shows how to do it.

> while(!(err = gpgme_op_keylist_next (ctx,&key))) {
>  if(key->owner_trust==0)
>  {
>  key->owner_trust=GPGME_VALIDITY_FULL;
>  fprintf(stderr,"%i : Key owner= %s fingerprint= %s trust=
> %i\n",i,key->uids->name,key->subkeys->fpr,key->owner_trust);

That is useless.  You are changing a returned value for display.  It
does not make any sense to change it.


Salam-Shalom,

   Werner

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




More information about the Gnupg-users mailing list