feature request: --show-photos additions

David Shaw dshaw@jabberwocky.com
Tue Jul 2 22:59:03 2002

On Tue, Jul 02, 2002 at 10:01:48PM +0200, Simon Josefsson wrote:
> David Shaw <dshaw@jabberwocky.com> writes:
> > On Tue, Jul 02, 2002 at 06:02:23PM +0200, Simon Josefsson wrote:
> >> Two things I miss in the photo id stuff:
> >> 
> >> 1) A possibility of outputing the JPEG image programmatically.
> >
> > This is in 1.2 (soon), or the 1.1.90 devel snapshot.
> How do I use it?
> I've tried
> $ gpg --list-keys B565716F --photo-viewer 'cat>foo' --show-photos
> $ gpg --list-keys B565716F --photo-viewer 'echo %I' --show-photos
> but it still forked the default photo viewer and didn't do anything
> else.  I don't have any photo-viewer in my options file.

The first example should work, but you need to put options before
commands in GnuPG:

$ gpg -photo-viewer 'cat >foo' --show-photos --list-keys B565716F

If you want to do it completely programmatically, use gpg
--attribute-fd and pass a fd.  GnuPG will write the raw attribute
packet to that fd.  Note that the attribute packet is not the photo -
it follows the RFC format, so you need to remove the photo header
before using the data as a jpeg.  --attribute-fd is only available in
1.1.90 and later.

> >> 2) An option for viewing any photo ID present in keys used for
> >>    verifying contents.  Putting show-photos in options works fine, but
> >>    only for list-keys and others, not for verifying data.
> >
> > Hmm.  I'm not sure I understand what you mean here.  Do you mean show
> > the photo when a signature from that key is checked?
> Yes.  Ideally I'd like my mail reader to show the JPEG alongside the
> GPG result (which is why I want 1), but it probably requires some code
> in the mailreader, so it would be nice if GPG started the photo viewer
> whenever I verify some data from my mail reader.

This sounds reasonable, but I need to think about it some more. :)


   David Shaw  |  dshaw@jabberwocky.com  |  WWW http://www.jabberwocky.com/
   "There are two major products that come out of Berkeley: LSD and UNIX.
      We don't believe this to be a coincidence." - Jeremy S. Anderson