astroid
astroid copied to clipboard
Show less information about encryption by default
I would suggest showing less information about Gpg.
What about displaying a short and coloured message next to the "From" in the header, like:
From: Alice ([email protected]) ✓ Signature verification succeeded
From: Alice ([email protected]) 🔐 Encrypted (signature verification succeeded)
The user could click on the crypto message to display all the info in the current box (like gpg output, keys info, etc.)
One thing regarding colors: please don't use "red" for the "Error: no-pub-key" it looks unnecessarily dangerous I think.
Hugo Roy writes on august 27, 2016 13:54:
I would suggest showing less information about Gpg.
What about displaying a short and coloured message next to the "From" in the header, like:
From: Alice ([email protected]) ✓ Signature verification succeeded
From: Alice ([email protected]) 🔐 Encrypted (signature verification succeeded)
The user could click on the crypto message to display all the info in the current box (like gpg output, keys info, etc.)
Agreed, the header element should be toggelable. I'll see if I can implement the logic, then you'd be able to customize the UI. The first OK-sign displays nicely here, the second only sometimes. It does in the Thread-view though, so maybe that is enough.
One thing regarding colors: please don't use "red" for the "Error: no-pub-key" it looks unnecessarily dangerous I think.
Agreed, should be some slightly less aggressive color for this error.
Gaute Hope writes on august 28, 2016 14:16:
Hugo Roy writes on august 27, 2016 13:54:
One thing regarding colors: please don't use "red" for the "Error: no-pub-key" it looks unnecessarily dangerous I think.
Agreed, should be some slightly less aggressive color for this error.
I am now adding the error to the class list of the divs, so that you can specify custom CSS rules for different errors. For this one, use class: 'no-pub-key'.
https://github.com/astroidmail/astroid/commit/64084a6e9287c9b7e0bf2b1fd28eac777f58f420
i have different problems with the gpg integration. first of all the name & email arent shown in the head-frame (just the hash):

i have an email that is shown as "signed" while it is encrypted as well. this is the log:
[13:58:57.873208] [0x00007f266cf67f40] [info] msg: loading mid: 10CC72734A3E63...
[13:58:57.873232] [0x00007f266cf67f40] [info] msg: filename: /home/...
[13:58:57.873446] [0x00007f266cf67f40] [debug] chunk (203): content-type: multipart/encrypted
[13:58:57.873474] [0x00007f266cf67f40] [debug] chunk: multi part
[13:58:57.873513] [0x00007f266cf67f40] [debug] crypto: gpg: gpg2
[13:58:57.882009] [0x00007f266cf67f40] [warning] chunk: is encrypted.
[13:58:57.882083] [0x00007f266cf67f40] [debug] crypto: decrypting and verifiying..
[13:58:57.985311] [0x00007f266cf67f40] [debug] cr: encrypted for: () [] [...
[13:58:57.985389] [0x00007f266cf67f40] [debug] cr: encrypted for: () [] [...
[13:58:57.985405] [0x00007f266cf67f40] [info] crypto: successfully decrypted message.
[13:58:57.985467] [0x00007f266cf67f40] [debug] chunk (204): content-type: multipart/signed
[13:58:57.985489] [0x00007f266cf67f40] [debug] chunk: multi part
[13:58:57.985545] [0x00007f266cf67f40] [debug] crypto: gpg: gpg2
[13:58:57.992739] [0x00007f266cf67f40] [warning] chunk: is signed.
[13:58:58.002245] [0x00007f266cf67f40] [debug] chunk (205): content-type: multipart/related
[13:58:58.002311] [0x00007f266cf67f40] [debug] chunk: multi part
[13:58:58.002331] [0x00007f266cf67f40] [debug] chunk: alternative: false
[13:58:58.002357] [0x00007f266cf67f40] [debug] chunk (206): content-type: multipart/alternative
[13:58:58.002377] [0x00007f266cf67f40] [debug] chunk: multi part
[13:58:58.002391] [0x00007f266cf67f40] [debug] chunk: alternative: true
[13:58:58.002414] [0x00007f266cf67f40] [debug] chunk (207): content-type: text/plain
[13:58:58.002436] [0x00007f266cf67f40] [debug] chunk: preferred.
[13:58:58.002450] [0x00007f266cf67f40] [debug] chunk: is part (viewable: true, attachment: false)
[13:58:58.002474] [0x00007f266cf67f40] [debug] chunk (208): content-type: text/html
[13:58:58.002494] [0x00007f266cf67f40] [debug] chunk: is part (viewable: true, attachment: false)
[13:58:58.002511] [0x00007f266cf67f40] [debug] chunk: multipart: added sibling
[13:58:58.002526] [0x00007f266cf67f40] [debug] chunk: multipart: preferred.
[13:58:58.002541] [0x00007f266cf67f40] [debug] chunk: multipart: added sibling
[13:58:58.002556] [0x00007f266cf67f40] [debug] chunk: multi part end
[13:58:58.002581] [0x00007f266cf67f40] [debug] chunk (209): content-type: image/png
[13:58:58.002601] [0x00007f266cf67f40] [debug] chunk: part, id: ...
[13:58:58.002621] [0x00007f266cf67f40] [debug] chunk: is part (viewable: false, attachment: true)
[13:58:58.002638] [0x00007f266cf67f40] [debug] chunk: multi part end
[13:58:58.002653] [0x00007f266cf67f40] [debug] chunk: multi part end
[13:58:58.002671] [0x00007f266cf67f40] [debug] chunk: multi part end
and finally i have encrypted mails which cant be decrypted by astroid while gpg --decrypt works fine - these are usual mails that have smime attachments.

this is the log:
[13:58:57.872413] [0x00007f266cf67f40] [debug] chunk (196): content-type: multipart/signed
[13:58:57.872456] [0x00007f266cf67f40] [debug] chunk: multi part
[13:58:57.872506] [0x00007f266cf67f40] [debug] crypto: gpg: gpg2
[13:58:57.872541] [0x00007f266cf67f40] [error] crypto: unsupported protocol:
[13:58:57.872563] [0x00007f266cf67f40] [error] chunk: no crypto ready.
[13:58:57.872579] [0x00007f266cf67f40] [debug] chunk: alternative: false
I second this proposal - the gpg info box is taking way too much space, see here:

Also, same as @emdete the corresponding UIDs for the keys that the msg is encrypted to aren't shown, although we should create a seperate issue for this.
@emdete there's https://github.com/astroidmail/astroid/issues/564 for the missing name in "encrypted to" field.