gpa alternate keyring support
Bernhard Reiter
bernhard@intevation.de
Sat Nov 10 17:19:01 2001
--a2FkP9tdjPU2nyhF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hello Paul,
thanks for your patch.
Note that you can reach the people interested in gpa-development
on the mailinglist gpa-dev@gnupg.org.
Unfortunatly there is no real active person for gpa right now.
AFAIK werner is doing some releases in the meantime.
We also like to use the same abbreviation for a META-project about
free software and email security in case you wonder about the other
mails on the mentioned list.
Best Regards,
Bernhard
On Mon, Nov 05, 2001 at 01:22:45PM -0800, Paul A Vixie wrote:
> First and foremost, THANK YOU for authoring gpa! I'm still tracking down=
a
> coredump in my X server that's tickled by GIMP in some way, but gpa itsel=
f is
> working very well.
>=20
> Second, I had to change two files in gpa-0.4.2 in order to support altern=
ate
> keyrings. As a workaround I added a GPA_KEYRING variable to the environm=
ent,
> which if set, causes gpg to be called with --no-default-keyring and --key=
ring.
> This uncovered a problem where if one has a known public key but it is no=
t in
> the keyring currently being edited, gpa dumped core. Both changes were e=
asy,
> thanks to a well designed program. Note that a proper UI for this would =
most
> likely involve a --keyring argument on the command line -- the environment
> variable was just my own hacky expedient and I won't be shocked if you ch=
oose
> not to implement this in the same way I did.
>=20
> My patches are below. Thanks again for a fine program.
>=20
> --- gpapa/gpapaintern.c.orig Mon Nov 5 12:07:41 2001
> +++ gpapa/gpapaintern.c Mon Nov 5 12:22:46 2001
> @@ -25,6 +25,7 @@
> #include "gpgme_types.h"
> #include "rungpg.h"
> #include "gpgme.h"
> +#include "ops.h"
> =20
> /* Just a string helper function.
> */
> @@ -186,7 +187,7 @@
> GpapaCallbackFunc callback, gpointer calldata)
> {
> GpgObject gpg;
> - char **arg;
> + char **arg, *env;
> int return_code =3D 0;
> =20
> /* This data we want to have available in our callbacks to
> @@ -217,6 +218,12 @@
> =20
> _gpgme_gpg_add_arg (gpg, "--no-options");
> _gpgme_gpg_add_arg (gpg, "--always-trust");
> +
> + if ((env =3D getenv("GPA_KEYRING")) !=3D NULL) {
> + _gpgme_gpg_add_arg (gpg, "--no-default-keyring");
> + _gpgme_gpg_add_arg (gpg, "--keyring");
> + _gpgme_gpg_add_arg (gpg, strdup(env));
> + }
> =20
> _gpgme_gpg_set_status_handler (gpg, status_handler, &gpapa_data);
> _gpgme_gpg_set_colon_line_handler (gpg, line_handler, &gpapa_data);
> --- src/keyring.c.orig Mon Nov 5 12:29:23 2001
> +++ src/keyring.c Mon Nov 5 12:30:22 2001
> @@ -1191,6 +1191,13 @@
> if (key_id)
> {
> key =3D gpapa_get_public_key_by_ID (key_id, gpa_callback, editor->=
window);
> + }
> + else
> + {
> + key =3D NULL;
> + }
> + if (key)
> + {
> gtk_label_set_text (GTK_LABEL (editor->status_key_user),
> gpapa_key_get_name (GPAPA_KEY (key), gpa_callback,
> editor->window));
--=20
Professional Service around Free Software (intevation.net) =
=20
The FreeGIS Project (freegis.org)
Association for a Free Informational Infrastructure (ffii.org)
FSF Europe (fsfeurope.org)
--a2FkP9tdjPU2nyhF
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Weitere Infos: siehe http://www.gnupg.org
iEYEARECAAYFAjvtUsUACgkQh9ag3dpKERZkpACcCLSFyZMgVNof0vatgvvr5IYC
h/8An1Q84AAUhgV+JoM3qMjCVPplI/rK
=yQY9
-----END PGP SIGNATURE-----
--a2FkP9tdjPU2nyhF--