Re: Changing trust in GPGME
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. ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Changing trust in GPGME
Hello, What is GPA?? Regards, Piotr Bratkowski Werner Koch pisze: 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 ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Changing trust in GPGME
On Wed, 13 Jan 2010 10:49:03 +0100, Piotr Bratkowski wrote: What is GPA?? http://www.gnupg.org/related_software/gpa/ The GNU Privacy Assistant (GPA) is a graphical user interface for the GnuPG (GNU Privacy Guard). GPA utilizes GTK (the GIMP Tool Kit) and compiles for various platforms. Actually GPA was the first GUI frontend for GPG. The development site is at: http://wald.intevation.org/projects/gpa/ Shalom-Salam, Werner -- Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz. ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
fragility of --edit-key interface [was: Re: Changing trust in GPGME]
On Wed, Jan 13, 2010 at 10:39:28AM +0100, Werner Koch wrote: 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. Hello Werner et. al. My understanding is that one of the main advantages of GPGME is that it provides a stable API to gnupg functionality. I understand that GPGME doesn't yet provide all the functionality that a user might need, but I think that suggesting developers use gpg --edit-key to achieve their desired functionality should include a strong warning that the interface to gpg --edit-key is fragile and may change unexpectedly and without warning. For instance, as of v1.4.10 (and v2.0.13), the edit-key interface to generate a subkey on an existing key ('addkey') in expert mode changed such that the RSA (set your own capabilities) selection in the key type chooser moved from entry 7 to entry 8. As far as I can tell, this change was not documented, at least not in the any of the changelogs associated with recent gnupg releases. The Monkeysphere project [0] is using this capability and this undocumented change recently caused problems. Developers looking for the stable interface that GPGME is supposed to provide should be duly warned that the gpg --edit-key interface is not as stable, and that they should be on the look out for changes to that interface in the future. jamie. [0] http://web.monkeysphere.info/ signature.asc Description: Digital signature ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users