Merge with default optimizations
authorThomas
Tue, 25 Sep 2018 13:22:55 +0200
branchoptimizations
changeset 23669f6de2f09992
parent 2363 21803747b944
parent 2365 d75593929899
child 2367 c13cacd3d707
Merge with default
     1.1 --- a/FPPMessage.cs	Tue Sep 25 12:34:41 2018 +0200
     1.2 +++ b/FPPMessage.cs	Tue Sep 25 13:22:55 2018 +0200
     1.3 @@ -28,13 +28,13 @@
     1.4                                                                            Globals.PEP_WEBSITE_UPGRADE_LINK + "\">p≡p here</a>." +
     1.5                                                                            "<br><br>This message can only be opened with p≡p for Outlook or p≡p Reader for Outlook.";
     1.6          public const string PEP_FPP_MESSAGE_BODY_PLAIN_PEP_INSTALLED    = "This message is protected by p≡p. \n\nTo read this message please do the following:" +
     1.7 -                                                                          "\n\n1. Click the Privacy Status button on the bottom of this message to open the Handshake dialog." +
     1.8 +                                                                          "\n\n1. Click the p≡p button above in the Outlook menu to open the Handshake dialog." +
     1.9                                                                            "\n2. Shortly after you opened the Handshake dialog on your computer, the same dialog will show up on the screen of the sender of the message as well (depending on the setup it might take 2-3 minutes). Contact the sender through another communication channel (e.g.phone call)." +
    1.10                                                                            "\n3. Compare the Trustwords with your communication partner. If the Trustwords match, confirm the Trustwords by clicking the green button." +
    1.11                                                                            "\n4. Shortly after, the protected message will automatically decrypt and you can read the message.";
    1.12          public const string PEP_FPP_MESSAGE_BODY_HTML_PEP_INSTALLED     = "<!DOCTYPE html><html><head><meta http-equiv='Content-Type' content='text/html;charset=UTF-8'></head><body>" +
    1.13                                                                            "This message is protected by <a style=\"color:#03AA4B; text-decoration: none\" href=\"" + Globals.PEP_WEBSITE_LINK + "\">p≡p</a>. <br><br>To read this message please do the following:" +
    1.14 -                                                                          "<br><br>1. Click the Privacy Status button on the bottom of this message to open the Handshake dialog." +
    1.15 +                                                                          "<br><br>1. Click the p≡p button above in the Outlook menu to open the Handshake dialog." +
    1.16                                                                            "<br>2. Shortly after you opened the Handshake dialog on your computer, the same dialog will show up on the screen of the sender of the message as well (depending on the setup it might take 2-3 minutes). Contact the sender through another communication channel (e.g.phone call)." +
    1.17                                                                            "<br>3. Compare the Trustwords with your communication partner. If the Trustwords match, confirm the Trustwords by clicking the green button." +
    1.18                                                                            "<br>4. Shortly after, the protected message will automatically decrypt and you can read the message.</body></html>";
     2.1 --- a/MsgProcessor.cs	Tue Sep 25 12:34:41 2018 +0200
     2.2 +++ b/MsgProcessor.cs	Tue Sep 25 13:22:55 2018 +0200
     2.3 @@ -702,7 +702,15 @@
     2.4                      // If no Sent date has been set, add it before encryption
     2.5                      if (src.Sent == 0)
     2.6                      {
     2.7 -                        src.Sent = DateTime.Now.ToFileTimeUtc();
     2.8 +                        try
     2.9 +                        {
    2.10 +                            src.Sent = (long)(DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds;
    2.11 +                        }
    2.12 +                        catch (Exception ex)
    2.13 +                        {
    2.14 +                            src.Sent = 0;
    2.15 +                            Log.Error("Encrypt: Error setting Sent time. " + ex.ToString());
    2.16 +                        }
    2.17                      }
    2.18  
    2.19                      ThisAddIn.PEPEngine.EncryptMessage(src, out dst, extraKeys, flags, encryptionFormat);