NUM_TESTS=1
#TEST_TYPES="gpg-flatten flatten plain"
-TEST_TYPES="gpg-flatten plain"
+TEST_TYPES="gpg-flatten flatten"
function _main {
--- /dev/null
+From: No One <noone@localhost>
+MIME-Version: 1.0
+To: No One <noone@localhost>
+Subject: =?UTF-8?B?44GT44KT44Gr44Gh44Gv44CB44GK5YWD5rCX44Gn44GZ44GL77yf?=
+Content-Type: multipart/signed; micalg=pgp-sha512;
+ protocol="application/pgp-signature";
+ boundary="69pEqCNMs7DnfdpwkAdpUCaf0lwnKu6Vr"
+
+This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
+--69pEqCNMs7DnfdpwkAdpUCaf0lwnKu6Vr
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: quoted-printable
+
+thanks for the message!
+
+> =C3=9Cber Spa=C3=9F.
+>
+> qual =C3=A8 il suono di una mano sola?
+>
+> =E3=81=93=E3=82=93=E3=81=AB=E3=81=A1=E3=81=AF=E3=80=81=E3=81=8A=E5=85=83=
+=E6=B0=97=E3=81=A7=E3=81=99=E3=81=8B=EF=BC=9F
+>
+
+test.
+
+-andrew
+
+
+
+
+
+
+
+
+
+--69pEqCNMs7DnfdpwkAdpUCaf0lwnKu6Vr
+Content-Type: application/pgp-signature; name="signature.asc"
+Content-Description: OpenPGP digital signature
+Content-Disposition: attachment; filename="signature.asc"
+
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1
+
+iQEcBAEBCgAGBQJVr7ynAAoJEO8exSA5s25YknEH/isrM1jly/A0uwd6mgh60ob9
+1R6+Z8P68Prx19uGBbURkRQwXQUCv9v/Q7eJAOCi3fFqWtPZjPjW3bC4apOKguEU
+2DjjinZ9uBeHZz6W6R9Hs0JhbF038vMBmRz3BGouRqg06gTDwnj1l13RkbaZSsi2
+T/PjyaIS5P8ffEbIEwQtpgmFR2x/+eE3Ot/vzupdR8jZFk4oJ/YxtEOYFIc3Mnav
+8km9V1AKBlskASY0cW84R7pngFDTZeB2ElYdGslDu1r1GdeX4qAUhqYZVmZ8O4op
+4tv/gR51nw83lqJPgleZFMSFPPaafKb7JjeeYW6w4xjLKJ+xN1OV2Sjd5FM2KJs=
+=tTBC
+-----END PGP SIGNATURE-----
+
+--69pEqCNMs7DnfdpwkAdpUCaf0lwnKu6Vr--
+
--- /dev/null
+
+
+Your signature was verified.
+
+I'm sorry, I was not able to find your public key. Did you remember to attach it?
+
+- Edward, the friendly GnuPG bot
+The Free Software Foundation created me.
+
+Can you donate to support their work?
+https://www.fsf.org/donate
--- /dev/null
+
+
+I'm sorry, I was not able to find your public key. Did you remember to attach it?
+
+- Edward, the friendly GnuPG bot
+The Free Software Foundation created me.
+
+Can you donate to support their work?
+https://www.fsf.org/donate
--- /dev/null
+I'm sorry, I was not able to decrypt your message. Are you sure you encrypted it with my public key?
+
+I'm sorry, I was not able to find your public key. Did you remember to attach it?
+
+- Edward, the friendly GnuPG bot
+The Free Software Foundation created me.
+
+Can you donate to support their work?
+https://www.fsf.org/donate
--- /dev/null
+From: No One <noone@localhost>
+MIME-Version: 1.0
+To: No One <noone@localhost>
+Subject: test
+Content-Type: multipart/mixed;
+ boundary="------------050208050701010001050209"
+
+This is a multi-part message in MIME format.
+--------------050208050701010001050209
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 7bit
+
+
+--------------050208050701010001050209
+Content-Type: application/octet-stream;
+ name="tmp.img"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment;
+ filename="tmp.img"
+
+w8y/iYh2Y7J/wdlr6BpIx5tXTzXqfYKvAG2NBGAwqG3eOxwz8mR1x+Bmc40BOZAeTr+aCCan
+iOo7F+p2EqeOvMpWjKkct63PG6w+12ejkhF/UTo2vTifWDjDqFb7rJCnCRRKbN1blDt4xCWS
+vGHAOo5eKbEYFCbDrqZtgcTRtTAigZPEsABOK1LdsH2gHx8/pZ7sJGtyMCHhHenQPl2P8pdN
+B5WXuERYXTrNAR9CRQ86oZ02XZJ9QhFk3iBx+ddBlFOP3Bim0531iftD2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ZXk4GlEutC88IWOZstMuRdE72g==
+--------------050208050701010001050209--
+
--- /dev/null
+
+
+I'm sorry, I was not able to find your public key. Did you remember to attach it?
+
+- Edward, the friendly GnuPG bot
+The Free Software Foundation created me.
+
+Can you donate to support their work?
+https://www.fsf.org/donate
-thanks for the message!
-
+Hello, I am Edward, the friendly GnuPG bot. I received your message and decrypted it. Here's a copy of your message:
> thanks for the message!
>
> -andrew
>
>
->
+
+- Edward, the friendly GnuPG bot
+The Free Software Foundation created me.
+
+Can you donate to support their work?
+https://www.fsf.org/donate
-thanks for the message!
-
+Hello, I am Edward, the friendly GnuPG bot. I received your message and decrypted it. Here's a copy of your message:
> thanks for the message!
>
>
>
>
+
+I received your public key. Thanks.
+
+- Edward, the friendly GnuPG bot
+The Free Software Foundation created me.
+
+Can you donate to support their work?
+https://www.fsf.org/donate
-thanks for the message!
-> hi, i didn't encrypt this part. is that a mistake?
->
-> bye!
->
->
+Your signature was verified.
+
+- Edward, the friendly GnuPG bot
+The Free Software Foundation created me.
+
+Can you donate to support their work?
+https://www.fsf.org/donate
-thanks for the message!
+Hello, I am Edward, the friendly GnuPG bot. I received your message and decrypted it. Here's a copy of your message:
-
-> -----BEGIN PGP SIGNED MESSAGE-----
-> Hash: SHA1
->
> hello again!!!!
>
> i think i'll try this encryption thing and paste this in.
>
> let's see how it works!
-> -----BEGIN PGP SIGNATURE-----
-> Version: GnuPG v1
->
-> iJwEAQECAAYFAlWthW0ACgkQsT5tL2pPbuh5DQQAnkjHaeOoOKICD0o7ne5hp1TD
-> 7l7A2TszHerbk7SLSC3W5PV9PV8frj4NxyFUe6n1x2hYiIqJqxjctB2+7oV12Z1w
-> l3IYtYwjLk1Rqc+iHTb+S2+1XycXoTesRcK5f1bZIIl50RUpx4hLZVbIYyA6CoyE
-> ldPslQXK+wrNm3mkspY=
-> =+Jmq
-> -----END PGP SIGNATURE-----
->
-> hi, i didn't encrypt this part. is that a mistake?
->
-> bye!
>
>
+
+Your signature was verified.
+
+- Edward, the friendly GnuPG bot
+The Free Software Foundation created me.
+
+Can you donate to support their work?
+https://www.fsf.org/donate
--- /dev/null
+From: No One <noone@localhost>
+MIME-Version: 1.0
+To: No One <noone@localhost>
+Subject: =?UTF-8?B?44GT44KT44Gr44Gh44Gv44CB44GK5YWD5rCX44Gn44GZ44GL77yf?=
+Content-Type: multipart/encrypted;
+ protocol="application/pgp-encrypted";
+ boundary="x2iAciceo0NrKsl4uFVFGTgJ6k0ocg8FW"
+
+This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156)
+--x2iAciceo0NrKsl4uFVFGTgJ6k0ocg8FW
+Content-Type: application/pgp-encrypted
+Content-Description: PGP/MIME version identification
+
+Version: 1
+
+--x2iAciceo0NrKsl4uFVFGTgJ6k0ocg8FW
+Content-Type: application/octet-stream; name="encrypted.asc"
+Content-Description: OpenPGP encrypted message
+Content-Disposition: inline; filename="encrypted.asc"
+
+-----BEGIN PGP MESSAGE-----
+Version: GnuPG v1
+
+owGbwMvMwMS40S5XP8s/7wXjabskhtCNIq9LMjKLFYAoUaEktbhEITe1uDgxPVVP
+oTK/VKE4I780J0UhL79EoTg1VQGsNL+0pKC0RI+rYw4LAyMTAxsrE8gUBi5OAZjR
+/w2Z/2kxf6n7XqaQ+m96/xz+I86XLqnd65y+W+eg1e5LLfMVTRkOlJ6c/dnwpkOu
+heLnxuezYx5w5hdY6XEXzNBgCC5xzstINbyVWxBTl7jknH/XCTvO5mPSB84mnLCO
+W+jQYpDzRdOt6i2TxFmek1V+8/8uNzmwf3UI0wI+pe6Eox/sle+f/OXjAQA=
+=AT2s
+-----END PGP MESSAGE-----
+
+--x2iAciceo0NrKsl4uFVFGTgJ6k0ocg8FW--
+
--- /dev/null
+
+
+Your signature was verified.
+
+- Edward, the friendly GnuPG bot
+The Free Software Foundation created me.
+
+Can you donate to support their work?
+https://www.fsf.org/donate
--- /dev/null
+From: No One <noone@localhost>
+MIME-Version: 1.0
+To: No One <edward-ja@localhost>
+Subject: =?UTF-8?B?44GT44KT44Gr44Gh44Gv44CB44GK5YWD5rCX44Gn44GZ44GL77yf?=
+Content-Type: multipart/encrypted;
+ protocol="application/pgp-encrypted";
+ boundary="x2iAciceo0NrKsl4uFVFGTgJ6k0ocg8FW"
+
+This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156)
+--x2iAciceo0NrKsl4uFVFGTgJ6k0ocg8FW
+Content-Type: application/pgp-encrypted
+Content-Description: PGP/MIME version identification
+
+Version: 1
+
+--x2iAciceo0NrKsl4uFVFGTgJ6k0ocg8FW
+Content-Type: application/octet-stream; name="encrypted.asc"
+Content-Description: OpenPGP encrypted message
+Content-Disposition: inline; filename="encrypted.asc"
+
+-----BEGIN PGP MESSAGE-----
+Version: GnuPG v1
+
+hIwDWouAYlp2iv8BBAC+TPb/Fdoye+wORbVhPNslOQo829IK2nhRYkVcxouDoRQP
+M+q6vI0RMqwobFCqsyK6LIutS3JAqHIB7tsl//MN3hHUcIiF4ZgsyPpX+wazLMCp
+XFapg0WsuJjnBi5h0ugkpg/B4HuyiPYYIoH1wxCwp449MZzGHLmIMG02JlmiQtLp
+AV50UCk6OUoclVbJhpz6vttUxPPihTuVSTHGVJA25S3yF5Z2TTTosA5hwcEEN8/R
+fZ/cgYE88ewXcuo9/vYnXnQUGOzbEtFJ9g2wdnEpf0XzKgm60KcZCNXbDfHF9X9X
+BrimYlfjjaQ+vL7LEfEinhxZLbdu/yA5ej/colSP7IkefUVOE1J8mW2zmO5vNoRT
+mYj0T66+grP7ILPy+T68eY7pWaCoUWNqTQULyAfAyYpEmb6SBw/qtq0ZWVgAuIwM
++sA5vVgKDeb6+Rntesjs7YwIqKzp0LP/u/Dn+jp6D+3njltrkp/zhMUX2PL97CH7
+v9kZbwcxFFqjOvdtFn4bbHa+F1CjS6MakGDG8H609VtdL7vee7goaM9+PUCNYFur
+DOsEW0ML8a5gLNFzIScZTxsNwretctsJWu3TkVD+wY1UcqD/h4yIuKF7ZuJOGcW0
+CkxJ6U9OZsFgPzGqpLY3+Q/zb1Z0Tipex0FuKTw6gCpK9gieJKw04ZUFb7MuYPrj
+xSCY7ruJiHRz5Vby8a2uQMisjs8ajXtkzinfRRQe7vQd8WJGKBs5pUe+7kLgBhx+
+xI5oHuAQ3SkmdMjhFSQ7idgl+MV+7TVLBx96qdxfUhSw65uW2TySPkBpM1JDxU6A
+4hDENnhdBM6/o6JDbClGjVLCN1vgvBAZ8ToOShXOZ1AulZu2sazolhwzvEMzkQyH
+gURIeMRulCLM1ufflHaKzDFBOP24gK1Zl+B7g5BDvg==
+=Hetx
+-----END PGP MESSAGE-----
+
+--x2iAciceo0NrKsl4uFVFGTgJ6k0ocg8FW--
+
--- /dev/null
+こんにちは! 私はGnuPGボットのEdwardです。あなたから送られたメールの暗号を解きました。確認のため、内容を返信します:
+
+> thanks for the message!
+>
+> > Über Spaß.
+> >
+> > qual è il suono di una mano sola?
+> >
+> > こんにちは、お元気ですか?
+> >
+>
+> test.
+>
+> -andrew
+>
+>
+
+- GnuPGボットのEdward
+
+Free Software Foundationが私を制作しました。 Free Software Foundationに寄付しませんか。| https://www.fsf.org/donate
+++ /dev/null
-To: No One <noone@localhost>
-Subject: =?UTF-8?B?44GT44KT44Gr44Gh44Gv44CB44GK5YWD5rCX44Gn44GZ44GL77yf?=
-
-Sorry, i couldn't find your key.
-I'll need that to encrypt a message to you.
+++ /dev/null
-To: No One <noone@localhost>
-Subject: =?UTF-8?B?44GT44KT44Gr44Gh44Gv44CB44GK5YWD5rCX44Gn44GZ44GL77yf?=
-
-Sorry, i couldn't find your key.
-I'll need that to encrypt a message to you.