Topic: Gmail fine/Yahoo Problems

First of all, big thank you for this, it's well described and great. Sorry about the length of the post and, also, I'm pretty new to GPG, PGP.

I'm sending signed and encrypted emails to a server script that uses the Perl GPG module to decrypt them. This seems fine for Googlemail, so far:. I've removed the text 'PGP' from the encryption banners so that the code box will display the encrypted blocks.



Subject: test transaction
MIME-Version: 1.0
X-FireGPG-Version: 0.7.10
Content-Type: multipart/encrypted;  protocol="application/pgp-encrypted"; boundary="-----firegpg0710eqg67hjd8ix3mdn9zznf"
X-Spam-Status: No, score=2.6
X-Spam-Score: 26
X-Spam-Bar: ++
X-Spam-Flag: NO

This is an OpenPGP/MIME encrypted message (RFC 2440 and 3156)
-------firegpg0710eqg67hjd8ix3mdn9zznf
Content-Type: application/pgp-encrypted
Content-Description: PGP/MIME version identification

Version: 1

-------firegpg0710eqg67hjd8ix3mdn9zznf
Content-Type: application/octet-stream; name="encrypted.asc"
Content-Description: OpenPGP encrypted message
Content-Disposition: inline; filename="encrypted.asc"

-----BEGIN MESSAGE-----
Version: GnuPG v1.4.6 (GNU/Linux)

hQIOA49aN6n5IG62EAgAopHw18/2sea9SjwGQGFTeMgrhvi1EgXfojObmB8w48WH
Zln0xdElH0avdJoEpc77QPvvZWz+SHDd8EFVTeignTy008L2ZtGwHvyUP6Jvqj9J
PaKfQ6PHJ3ONErFz0a0CZ3O4ReOdzg0olN4opnqZxYzxKrJnid4KO0WRacKgLHZo
oJcdLu4OV9D+sKGcWxvAoiYoONRsCzWtIdBDnVp07EZD76DTnTXbnkpoIubZ16QF
xiC76G6uGNoB7irNhuLNXt+nXkOqwUbSVn/Cfp5duTBuG4+HJ5deZ7vx+IPlVYXX
NVpuNMUSp9e0za0Tpy9XYC24Nx8MfKPv3zAs9jvWNQgAnaZkLLzg8jSYdrs3vcV5
zXjlmOUUICPsJAKME2/ERq6a1GR6HnBcM4CZlE4vny0v2cSWbHjjLjtWBPBLWNXO
Izj2kAP1M0oSCQwdGr8hDV+hGHhhYozMHb7u3ZuGnGH+kwW9YxDZPLO/2TQbYSDy
3Hxs+xcXqv0MloCiHqCJZlX84LBH7fPAnLbkyzGEWHSmqaUHrBtgio7L7c2f9qwu
o+sjlhZae1YutrohuXogvdjuFjiJtLu3bNODcL7d7oIwIfeoNA2x8845EC43bxpP
kjeHohDqlb4c4ovU6M26QBp4/7j1UALneoF0dV4jLWmqQ/Zj7WAdwJG0TktOvyBa
B9LA8AGtjvj4HVf1zLuqEjA0/xC6JLiRpsTUYfSGnZzpvGX0yMmYXPd7T/1A/01k
ki5ADDleM3huQCbWdl0lhCryMH0THmr1iz5UmsIOHP4Sd21jLSCQMUE2fw6Hwv9j
VQ/cgEBtn5wlv+gVKdtpkJ3UwY3Umm3quGFA8Y1hPES3RRAiLuFYQYgY9KZPLrOe
M3ctb5jPZ7SupKyd87dSk4WZ5mcSl9CqauCQZsBpYNQUY8UHC45rD0ONP9GD6uly
kJ03H3zQmVZwGpwB4lTjW8B84ZgD0TjV3QtLHkhSQYgWMPMW121r+7qCLc9HZqaE
00bepaUtjVB7eOzDgGsV77bu7cd6/ZDlLhM+M581TcLTMfWhMmpu3uAe/Y+4VXWD
0s0oNGcOnoAgH/GGlOvmLAlCpyhsfW9ihHJK4eBmcdQ0/um77c6DHys7/dC85Q3o
aj4AfwpuKeOykTICoiSa9Yt43UF3T3pflKlEGU2ewajA9EPhbLyaqTSX0dye2Cun
zq7GQavPu9AweOVTJa3lz+c5wEEv256fFGdVlNOtcF/qzASJeUJAC4yMHXUafB/5
bJmIcA==
=UBTF
-----END MESSAGE-----

-------firegpg0710eqg67hjd8ix3mdn9zznf--

But if I use a Yahoo mail account (with plain text selected), body selected and click sign and encryt:

Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=0.3
X-Spam-Score: 3
X-Spam-Bar: /
X-Spam-Flag: NO

-----BEGIN MESSAGE-----=0AVersion: GnuPG v1.4.6 (GNU/Linux)=0A=0AhQIOA4=
9aN6n5IG62EAf/anJf8dy6dR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MIHjW5w=3D=3D=0A=3DsxXg=0A-----END  MESSAGE-----=0A=
=0A=0A=0A      

This is not decrypted by the Perl script:

protocol error: expected ENC_TO got NODATA: 
 at /usr/local/share/perl/5.8.8/GnuPG.pm line 154
    GnuPG::abort_gnupg('GnuPG=HASH(0x8374a9c)', 'protocol error: expected ENC_TO got NODATA: \x{a}') called at /usr/local/share/perl/5.8.8/GnuPG.pm line 722
    GnuPG::decrypt_postwrite('GnuPG=HASH(0x8374a9c)', 'ciphertext', 'mail.txt', 'output', 'decrypt.txt', 'passphrase', 'xxxxx') called at /usr/local/share/perl/5.8.8/GnuPG.pm line 711
    GnuPG::decrypt('GnuPG=HASH(0x8374a9c)', 'ciphertext', 'mail.txt', 'output', 'decrypt.txt', 'passphrase', 'xxxx') called at ./popmailtest.cgi line 89

The mime headers are different on each of these...also I'mnot sure whether I'm doing the right thing to sign and encrypt the body? For example I don't see any evidence of signature verification during the decrypt process, even though I've got 'sign' selected for Gmail.

Best regards Hugh

Re: Gmail fine/Yahoo Problems

Hi

To reply to my own message but (hopefully) help others. The problem is the mime types. I've added processing for the Yahoo to decode:

Content-Transfer-Encoding: quoted-printable

and then decrypted and this seems to work...apparently the web mail setups have different ways of dealing with this data and (probably) I'll be forced to choose some kind of allowable subset, since I'm decrypting with a script that I'd like to keep fairly simple...

Best regards Hugh