Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AOSP Mail: Attachments (OpenPGP message, key) crippled #290

Open
dschuermann opened this issue Feb 23, 2014 · 6 comments
Open

AOSP Mail: Attachments (OpenPGP message, key) crippled #290

dschuermann opened this issue Feb 23, 2014 · 6 comments

Comments

@dschuermann
Copy link
Member

In AOSP Mail client, importing keys or decrypting messages attached to emails does not work. The AOSP Mail application tries to decode an attached OpenPGP messages/key (ASCII Armored -> Base64 encoding, more precisely Radix64, see RFC4880) as content, which is wrong and cripples the attachment completely. It makes no difference if the attached .asc file is directly shared to OpenKeychain or saved before opening it. The files are crippled: They end after some bytes with the string "There was an error while decoding the message." (This is actually part of the downloaded/shared file).

Reproduce

Send an email with Thunderbird to yourself with a file "testkey.asc" containing for example my key from http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x718C070100012282 (begin copying -----BEGIN PGP PUBLIC KEY BLOCK----- to -----END PGP PUBLIC KEY BLOCK-----).

More Information

Reported upstream: https://code.google.com/p/android/issues/detail?id=75181

Funny

"There was an error while decoding the message." has been translated to german as "Beim Entschlüsseln der Nachricht ist ein Fehler aufgetreten." (https://android.googlesource.com/platform/packages/apps/Email/+/0d21834/res/values-de/strings.xml) which means: "There was an error while decrypting the message."

Ideas

At best we would detect these broken files but the string message_decode_error varies between languages so it's difficult to check for it reliably.

@dschuermann dschuermann changed the title Attached asc key from email can not be imported opening from AOSP mail AOSP Mail: Attachments (keys, encrypted files) crippled Aug 4, 2014
@dschuermann dschuermann changed the title AOSP Mail: Attachments (keys, encrypted files) crippled AOSP Mail: Attachments (OpenPGP keys, encrypted payload) crippled May 5, 2015
@dschuermann dschuermann changed the title AOSP Mail: Attachments (OpenPGP keys, encrypted payload) crippled AOSP Mail: Attachments (OpenPGP message, key) crippled May 5, 2015
@dschuermann
Copy link
Member Author

AOSP Mail:

android44_aosp_mail
android44_aosp_mail2
android44_aosp_mail3

GMail:
pgpmime

@dschuermann
Copy link
Member Author

Just a note for later:
Check if Intent data uri contains "com.android.email.attachmentprovider", if yes: Show notify that redirects to this issue.

@clst
Copy link

clst commented Oct 20, 2015

FYI: the otherwise not that great HTC Mail client can properly save the .asc file which you can then decrypt manually. But K9 cannot show the resulting multipart file so you are then stuck with viewing in a text editor or manually extracting the HTML.
EDIT: using an IMAP account

@Valodim
Copy link
Member

Valodim commented Oct 21, 2015

The upcoming version has basic MIME parsing included, so the parts can then be viewed in OpenKeychain, no more manual extraction necessary 👍

The underlying problem here still remains unsolved, unfortunately.

@clst
Copy link

clst commented Oct 21, 2015

Wow, good news. Thanks for the hard work.

@denics
Copy link

denics commented Mar 12, 2016

Great! Does this means that there is hope to see open keychain integrated in aosp mail client one day?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants