Menu

#760 Allow importing of encrypted public keys

fixed
nobody
None
1.9.9
Minor
All
2.0
nobody
2018-03-21
2018-03-15
kluk
No

Currently, a public key attachment that is encrypted using PGP/Inline, is not detected (encrypted attachments have mimetype application/octet-stream), and thus will not be imported when you use the import button in enigmail.

This patch changes:
- detection of public keys: .asc.pgp is now detected as a public key;
- public keys are decrypted (if necessary) before trying to import them;
- fixes a bug where encrypted attachments with an accompying .sig detached signature are detected as just signed attachments instead of signed and encrypted attachments;
- correctly removes the tempfile after importing a key.

1 Attachments

Related

Bugs: #901

Discussion

  • kluk

    kluk - 2018-03-15
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,8 +1,8 @@
     Currently, a public key attachment that is encrypted using PGP/Inline, is not detected (encrypted attachments have mimetype application/octet-stream), and thus will not be imported when you use the import button in enigmail.
    
     This patch changes:
    -* detection of public keys: .asc.pgp is now detected as a public key;
    -* public keys are decrypted (if necessary) before trying to import them;
    -* fixes a bug where encrypted attachments with an accompying .sig detached signature are detected as just *signed* attachments instead of *signed and encrypted* attachments;
    -* correctly removes the tempfile after importing a key.
    +- detection of public keys: .asc.pgp is now detected as a public key;
    +- public keys are decrypted (if necessary) before trying to import them;
    +- fixes a bug where encrypted attachments with an accompying .sig detached signature are detected as just *signed* attachments instead of *signed and encrypted* attachments;
    +- correctly removes the tempfile after importing a key.
    
     
  • Patrick Brunschwig

    Thanks for the patch.

    There are two issues in onShowAttachmentContextMenu() on line 992:
    1. currentAttachments[i] doesn't exist, I think that should be selectedAttachments[0]
    2. the property .displayName may be undefined as you can see a little further down in the same method. This would lead to an exception. I have attached a sample mail that exhibits the error.

     
  • kluk

    kluk - 2018-03-20

    Thanks for the feedback, fixed :-)!

     

    Last edit: kluk 2018-03-20
  • Patrick Brunschwig

    • status: open --> fixed
    • Fixed in version: --- --> 2.0
     
  • Patrick Brunschwig

    Thanks, this looks a lot better :-)

    Committed on master and 2.0-branch.

     

Log in to post a comment.

MongoDB Logo MongoDB