'xyt.jpg' is not a JPEG file

Alex (via GPGTools) alex at gpgtools.org
Thu Dec 15 17:46:29 CET 2011

Dear all,

I think one of our users found a bug in GnuPG:

Description: 'xyt.jpg' is not a JPEG file
Version: 2.0.17
URL: http://support.gpgtools.org/discussions/everything/174

Steps that will reproduce the problem?
1. curl -LOs http://support.gpgtools.org/discussions/everything/174/assets/8ba23b7439a1ddd2b81d87daadf16b8c810dd7f4/essai.jpg
2. gpg2 --edit-key 123456789ABCDEF
3. addphoto essai.jpg

What is the expected result?
Added photo.

What happens instead?
Error message "gpg: `essai.jpg' is not a JPEG file"

Possible workaround:
Convert the file.

Any additional information:
* Seems to be a valid jpeg file
* Here is the output

$ curl -LOs http://support.gpgtools.org/discussions/everything/174/assets/8ba23b7439a1ddd2b81d87daadf16b8c810dd7f4/essai.jpg
$ gpg2 --edit-key 0DB03A7D
gpg (GnuPG/MacGPG2) 2.0.17; Copyright (C) 2011 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Secret key is available.

pub  2048R/0DB03A7D  created: 2011-08-11  expires: never       usage: SCEA
                     trust: ultimate      validity: ultimate
sub  2048R/0AA3DA82  created: 2011-08-11  expires: never       usage: SEA 
[ultimate] (1). GPGTools Test Key (For testing purposes only!) <test at gpgtools.org>

gpg> addphoto
Pick an image to use for your photo ID.  The image must be a JPEG file.
Remember that the image is stored within your public key.  If you use a
very large picture, your key will become very large as well!
Keeping the image close to 240x288 is a good size to use.

Enter JPEG filename for photo ID: essai.jpg
This JPEG is really large (13750 bytes) !
Are you sure you want to use it? (y/N) y
gpg: `essai.jpg' is not a JPEG file     

Enter JPEG filename for photo ID: 

Best regards, Alex

http://gpgtools.org/about (Google+, Twitter, RSS)

More information about the Gnupg-devel mailing list