Merge with default (fixes needed) keysync
authorDean
Mon, 03 Oct 2016 17:36:54 +0200
branchkeysync
changeset 1333e3e393923f86
parent 1332 f7b9bf65c9bc
parent 1331 6b1eda5e9d82
child 1334 557814ef9cd2
Merge with default (fixes needed)
MailItemExtensions.cs
MsgProcessor.cs
PEPMessage.cs
     1.1 --- a/MailItemExtensions.cs	Mon Oct 03 17:35:16 2016 +0200
     1.2 +++ b/MailItemExtensions.cs	Mon Oct 03 17:36:54 2016 +0200
     1.3 @@ -89,12 +89,20 @@
     1.4          /// <returns>True if the outlook mail item is considered incoming, otherwise false.</returns>
     1.5          public static bool GetIsIncoming(this Outlook.MailItem omi)
     1.6          {
     1.7 -            object property;
     1.8 +            object property = null;
     1.9              bool result = true; // Most emails are incoming/received
    1.10  
    1.11              if (omi != null)
    1.12              {
    1.13 -                property = omi.GetUserProperty(CryptableMailItem.USER_PROPERTY_KEY_IS_INCOMING);
    1.14 +                try
    1.15 +                {
    1.16 +                    property = omi.GetUserProperty(CryptableMailItem.USER_PROPERTY_KEY_IS_INCOMING);
    1.17 +                }
    1.18 +                catch
    1.19 +                {
    1.20 +                    property = null;
    1.21 +                    Log.Warning("GetIsIncoming: Failed to get IsIncoming user property.");
    1.22 +                }
    1.23  
    1.24                  if (property != null)
    1.25                  {
    1.26 @@ -346,13 +354,13 @@
    1.27          }
    1.28  
    1.29          /// <summary>
    1.30 -        /// Gets whether the mail item is secure.
    1.31 +        /// Gets whether the mail item is considered secure.
    1.32          /// </summary>
    1.33          /// <param name="omi">The outlook mail item to process with.</param>
    1.34          /// <returns>True if the mail item is secure, otherwise false.</returns>
    1.35          public static bool GetIsSecure(this Outlook.MailItem omi)
    1.36          {
    1.37 -            return (PEPMessage.GetIsEncrypted(omi));
    1.38 +            return (PEPMessage.GetIsSecure(omi));
    1.39          }
    1.40  
    1.41          /// <summary>
     2.1 --- a/PEPMessage.cs	Mon Oct 03 17:35:16 2016 +0200
     2.2 +++ b/PEPMessage.cs	Mon Oct 03 17:36:54 2016 +0200
     2.3 @@ -248,12 +248,12 @@
     2.4          }
     2.5  
     2.6          /// <summary>
     2.7 -        /// Gets whether this message is encrypted.
     2.8 +        /// Gets whether this message is considered secure.
     2.9          /// This will forward the call to the static method of the same purpose.
    2.10          /// </summary>
    2.11 -        public bool IsEncrypted
    2.12 +        public bool IsSecure
    2.13          {
    2.14 -            get { return (PEPMessage.GetIsEncrypted(this)); }
    2.15 +            get { return (PEPMessage.GetIsSecure(this)); }
    2.16          }
    2.17  
    2.18          /// <summary>
    2.19 @@ -2190,12 +2190,11 @@
    2.20          }
    2.21  
    2.22          /// <summary>
    2.23 -        /// Determines if the given message is encrypted.
    2.24 -        /// Currently, only PGP encrypted messages will be detected.
    2.25 +        /// Determines if the given message is considered secure.
    2.26          /// </summary>
    2.27 -        /// <param name="omi">The outlook mail item to check encryption for.</param>
    2.28 +        /// <param name="omi">The outlook mail item to check security for.</param>
    2.29          /// <returns>True if the given message is encrypted, otherwise false.</returns>
    2.30 -        public static bool GetIsEncrypted(Outlook.MailItem omi)
    2.31 +        public static bool GetIsSecure(Outlook.MailItem omi)
    2.32          {
    2.33              if (omi != null)
    2.34              {
    2.35 @@ -2285,12 +2284,12 @@
    2.36          }
    2.37  
    2.38          /// <summary>
    2.39 -        /// Determines if the given PEPMessage is encrypted.
    2.40 +        /// Determines if the given message is considered secure.
    2.41          /// Currently, only PGP encrypted messages will be detected.
    2.42          /// </summary>
    2.43 -        /// <param name="msg">The message to check encryption for.</param>
    2.44 +        /// <param name="msg">The message to check security for.</param>
    2.45          /// <returns>True if the given message is encrypted, otherwise false.</returns>
    2.46 -        public static bool GetIsEncrypted(PEPMessage msg)
    2.47 +        public static bool GetIsSecure(PEPMessage msg)
    2.48          {
    2.49              if (msg != null)
    2.50              {