initial commit
authorvb
Wed, 25 Jun 2014 18:35:57 +0200
changeset 06dfec3b090d6
child 1 a6c2462cf5d2
initial commit
CryptableMailItem.cs
EncryptionStatusPanel.Designer.cs
EncryptionStatusPanel.cs
EncryptionStatusPanel.resx
Handshake.Designer.cs
Handshake.cs
Handshake.resx
Properties/AssemblyInfo.cs
Properties/Resources.Designer.cs
Properties/Resources.resx
Properties/Settings.Designer.cs
Properties/Settings.settings
ThisAddIn.cs
app.config
pEp.csproj
pEp_1_TemporaryKey.pfx
pEp_2_TemporaryKey.pfx
pEp_TemporaryKey.pfx
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/CryptableMailItem.cs	Wed Jun 25 18:35:57 2014 +0200
     1.3 @@ -0,0 +1,998 @@
     1.4 +using System;
     1.5 +using System.Collections;
     1.6 +using System.Collections.Generic;
     1.7 +using System.Collections.Concurrent;
     1.8 +using System.Linq;
     1.9 +using System.Text;
    1.10 +using System.IO;
    1.11 +using System.Windows.Forms;
    1.12 +using System.Runtime.InteropServices;
    1.13 +using Outlook = Microsoft.Office.Interop.Outlook;
    1.14 +using pEpComAdapterLib;
    1.15 +using MIME;
    1.16 +
    1.17 +namespace pEp
    1.18 +{
    1.19 +    public enum EncStatus
    1.20 +    {
    1.21 +        unknown,
    1.22 +        cannot_decrypt,
    1.23 +        forged,         // (will be shown red)
    1.24 +        unencrypted,    // not encrypted and not digitally signed
    1.25 +        authentic,      // not encrypted but digitally signed correctly
    1.26 +        encrypted,      // encrypted but not feasible, i.e. not signed
    1.27 +        could_be,       // encrypted, no handshake yet (will be shown yellow)
    1.28 +        secure          // encrypted, handshake done successfully (will be shown green)
    1.29 +    };
    1.30 +
    1.31 +    class CryptableMailItem
    1.32 +    {
    1.33 +        static void StopHere(string reason)
    1.34 +        {
    1.35 +            MessageBox.Show(reason);
    1.36 +        }
    1.37 +
    1.38 +        private Outlook.MailItem mailItem;
    1.39 +
    1.40 +        public CryptableMailItem(Outlook.MailItem mailItem)
    1.41 +        {
    1.42 +            this.mailItem = mailItem;
    1.43 +
    1.44 +            if (incoming)
    1.45 +                handleIncoming();
    1.46 +            else if (mailItem.Sent && isInlinePGP())
    1.47 +                decryptInlinePGP();
    1.48 +        }
    1.49 +
    1.50 +        protected bool is_pEp()
    1.51 +        {
    1.52 +            try
    1.53 +            {
    1.54 +                string pEp_version = (string)mailItem.PropertyAccessor.GetProperty(ThisAddIn.PR_X_PEP_VERSION);
    1.55 +                if (pEp_version != null && pEp_version != "")
    1.56 +                    return true;
    1.57 +                else
    1.58 +                    return false;
    1.59 +            }
    1.60 +            catch
    1.61 +            {
    1.62 +                return false;
    1.63 +            }
    1.64 +        }
    1.65 +        
    1.66 +        protected pEpEngine pEp
    1.67 +        {
    1.68 +            get
    1.69 +            {
    1.70 +                return ThisAddIn.pEp;
    1.71 +            }
    1.72 +        }
    1.73 +
    1.74 +        public HashSet<string> addresses
    1.75 +        {
    1.76 +            get
    1.77 +            {
    1.78 +                HashSet<string> addresses = new HashSet<string>();
    1.79 +
    1.80 +                foreach (Outlook.Recipient receipient in mailItem.Recipients)
    1.81 +                {
    1.82 +                    addresses.Add(receipient.AddressEntry.Address);
    1.83 +                }
    1.84 +
    1.85 +                return addresses;
    1.86 +            }
    1.87 +        }
    1.88 +
    1.89 +        public EncStatus possibleEncStatus
    1.90 +        {
    1.91 +            get
    1.92 +            {
    1.93 +                EncStatus result;
    1.94 +
    1.95 +                HashSet<string> _addresses = addresses;
    1.96 +
    1.97 +                _pEp_comm_type ct;
    1.98 +                if (_addresses.Count > 0)
    1.99 +                {
   1.100 +                    ct = pEp.outgoing_comm_type(_addresses.ToArray<string>());
   1.101 +                }
   1.102 +                else
   1.103 +                    ct = _pEp_comm_type.pEp_ct_unknown;
   1.104 +
   1.105 +                if (ct >= _pEp_comm_type.pEp_ct_confirmed_encryption)
   1.106 +                {
   1.107 +                    result = EncStatus.secure;
   1.108 +                }
   1.109 +                else if (ct >= _pEp_comm_type.pEp_ct_unconfirmed_encryption)
   1.110 +                {
   1.111 +                    result = EncStatus.could_be;
   1.112 +                }
   1.113 +                else if (ct == _pEp_comm_type.pEp_ct_unknown)
   1.114 +                {
   1.115 +                    result = EncStatus.unknown;
   1.116 +                }
   1.117 +                else
   1.118 +                {
   1.119 +                    result = EncStatus.unencrypted;
   1.120 +                }
   1.121 +
   1.122 +                return result;
   1.123 +            }
   1.124 +        }
   1.125 +
   1.126 +        public EncStatus encStatus
   1.127 +        {
   1.128 +            get
   1.129 +            {
   1.130 +                Outlook.UserProperty es = mailItem.UserProperties.Find("EncryptionState");
   1.131 +                if (es == null)
   1.132 +                {
   1.133 +                    return EncStatus.unknown;
   1.134 +                }
   1.135 +                else
   1.136 +                    return (EncStatus)mailItem.UserProperties["EncryptionState"].Value;
   1.137 +            }
   1.138 +
   1.139 +            set
   1.140 +            {
   1.141 +                if (mailItem.UserProperties.Find("EncryptionState") == null)
   1.142 +                    mailItem.UserProperties.Add("EncryptionState", Outlook.OlUserPropertyType.olInteger);
   1.143 +                
   1.144 +                mailItem.UserProperties["EncryptionState"].Value = (int) value;
   1.145 +            }
   1.146 +        }
   1.147 +
   1.148 +        public bool incoming
   1.149 +        {
   1.150 +            get
   1.151 +            {
   1.152 +                return mailItem.ReceivedByEntryID != null;
   1.153 +            }
   1.154 +        }
   1.155 +
   1.156 +        public string[] keylist
   1.157 +        {
   1.158 +            get
   1.159 +            {
   1.160 +                try
   1.161 +                {
   1.162 +                    string _key_list = mailItem.UserProperties["KeyList"].Value;
   1.163 +                    if (_key_list == "")
   1.164 +                        return new string[0];
   1.165 +                    else
   1.166 +                        return _key_list.Split(',');
   1.167 +                }
   1.168 +                catch
   1.169 +                {
   1.170 +                    return new string[0];
   1.171 +                }
   1.172 +            }
   1.173 +            set
   1.174 +            {
   1.175 +                if (mailItem.UserProperties.Find("KeyList") == null)
   1.176 +                    mailItem.UserProperties.Add("KeyList", Outlook.OlUserPropertyType.olText);
   1.177 +                
   1.178 +                string kl;
   1.179 +
   1.180 +                if (value == null)
   1.181 +                    kl = "";
   1.182 +                else
   1.183 +                    kl = String.Join(",", value);
   1.184 +
   1.185 +                mailItem.UserProperties["KeyList"].Value = kl;
   1.186 +            }
   1.187 +        }
   1.188 +
   1.189 +        public string from
   1.190 +        {
   1.191 +            get
   1.192 +            {
   1.193 +                return mailItem.Sender.Address;
   1.194 +            }
   1.195 +        }
   1.196 +
   1.197 +        protected void import_attached_keys()
   1.198 +        {
   1.199 +            foreach (Outlook.Attachment attachment in mailItem.Attachments)
   1.200 +            {
   1.201 +                string mime_tag = attachment.PropertyAccessor.GetProperty(ThisAddIn.PR_ATTACH_MIME_TAG);
   1.202 +                if (mime_tag == "application/pgp-keys")
   1.203 +                {
   1.204 +                    byte[] _ctext = attachment.PropertyAccessor.GetProperty(ThisAddIn.PR_ATTACH_DATA_BIN);
   1.205 +                    try
   1.206 +                    {
   1.207 +                        pEp.import_key_b(_ctext);
   1.208 +                    }
   1.209 +                    catch (COMException) { }
   1.210 +                }
   1.211 +                else if (mime_tag == "text/plain" && (
   1.212 +                           attachment.FileName.EndsWith(".asc", true, System.Globalization.CultureInfo.InvariantCulture)
   1.213 +                        || attachment.FileName.EndsWith(".key", true, System.Globalization.CultureInfo.InvariantCulture)
   1.214 +                        || attachment.FileName.EndsWith(".pgp", true, System.Globalization.CultureInfo.InvariantCulture)
   1.215 +                        || attachment.FileName.EndsWith(".gpg", true, System.Globalization.CultureInfo.InvariantCulture)
   1.216 +                    )
   1.217 +                )
   1.218 +                {
   1.219 +                    byte[] _ctext = attachment.PropertyAccessor.GetProperty(ThisAddIn.PR_ATTACH_DATA_BIN);
   1.220 +                    try
   1.221 +                    {
   1.222 +                        string ctext = System.Text.Encoding.ASCII.GetString(_ctext);
   1.223 +                        if (ctext.StartsWith("-----BEGIN PGP PUBLIC KEY BLOCK-----"))
   1.224 +                            pEp.import_key(ctext);
   1.225 +                    }
   1.226 +                    catch (COMException) { }
   1.227 +                }
   1.228 +                else if (mime_tag == "application/octet-stream" && (
   1.229 +                           attachment.FileName.EndsWith(".pgp", true, System.Globalization.CultureInfo.InvariantCulture)
   1.230 +                        || attachment.FileName.EndsWith(".gpg", true, System.Globalization.CultureInfo.InvariantCulture)
   1.231 +                        || attachment.FileName.EndsWith(".key", true, System.Globalization.CultureInfo.InvariantCulture)
   1.232 +                        || attachment.FileName == "key.asc"
   1.233 +                    )
   1.234 +                )
   1.235 +                {
   1.236 +                    byte[] _ctext = attachment.PropertyAccessor.GetProperty(ThisAddIn.PR_ATTACH_DATA_BIN);
   1.237 +                    try
   1.238 +                    {
   1.239 +                        pEp.import_key_b(_ctext);
   1.240 +                    }
   1.241 +                    catch (COMException) { }
   1.242 +                }
   1.243 +            }
   1.244 +        }
   1.245 +        //if (false && (ct == _pEp_comm_type.pEp_ct_pEp || ct == _pEp_comm_type.pEp_ct_pEp_unconfirmed))
   1.246 +        //{
   1.247 +        //    MimeMessage msg;
   1.248 +        //    //MimeBody body;
   1.249 +        //    //msg = new MimeMessage();
   1.250 +        //    //if (mailItem.BodyFormat == Outlook.OlBodyFormat.olFormatPlain)
   1.251 +        //    //{
   1.252 +        //    //    msg.SetText(mailItem.Body);
   1.253 +        //    //}
   1.254 +        //    //else
   1.255 +        //    //{
   1.256 +        //    //    msg.SetContentType("multipart/alternative");
   1.257 +        //    //    msg.SetBoundary(null);
   1.258 +        //    //    body = msg.CreatePart();
   1.259 +        //    //    body.SetContentType("text/plain");
   1.260 +        //    //    body.SetCharset("us-ascii");
   1.261 +        //    //    body.SetTransferEncoding("quoted-printable");
   1.262 +        //    //    body.SetText(mailItem.Body);
   1.263 +        //    //    body = msg.CreatePart();
   1.264 +        //    //    body.SetContentType("text/html");
   1.265 +        //    //    body.SetCharset("us-ascii");
   1.266 +        //    //    body.SetTransferEncoding("quoted-printable");
   1.267 +        //    //    body.SetText(mailItem.HTMLBody);
   1.268 +        //    //}
   1.269 +        //    //StringBuilder sb = new StringBuilder();
   1.270 +        //    //msg.StoreBody(sb);
   1.271 +        //    //string plain = sb.ToString().Replace("\r\n", "\n");
   1.272 +        //    string plain = "";
   1.273 +        //    if (mailItem.BodyFormat == Outlook.OlBodyFormat.olFormatPlain)
   1.274 +        //        plain = mailItem.Body;
   1.275 +        //    else
   1.276 +        //        plain = mailItem.HTMLBody;
   1.277 +        //    string cipher;
   1.278 +        //    string[] _key_list = key_list.ToArray();
   1.279 +        //    _pEp_STATUS status = pEp.encrypt(_key_list, plain, out cipher);
   1.280 +        //    if (status == _pEp_STATUS.pEp_STATUS_OK)
   1.281 +        //    {
   1.282 +        //        foreach (Outlook.Attachment attachment in mailItem.Attachments)
   1.283 +        //        {
   1.284 +        //            attachment.Delete();
   1.285 +        //        }
   1.286 +        //        mailItem.BodyFormat = Outlook.OlBodyFormat.olFormatPlain;
   1.287 +
   1.288 +        //        //msg = new MimeMessage();
   1.289 +        //        //msg.SetContentType("multipart/encrypted");
   1.290 +        //        //msg.SetBoundary(null);
   1.291 +        //        //msg.SetParameter("multipart/encrypted", "protocol", "\"application/pgp-encrypted\"");
   1.292 +        //        //MimeBody body1 = msg.CreatePart();
   1.293 +        //        //body1.SetContentType("application/pgp-encrypted");
   1.294 +        //        //body1.SetFieldValue("Version", "1", null);
   1.295 +        //        //MimeBody body2 = msg.CreatePart();
   1.296 +        //        //body2.SetText(cipher);
   1.297 +        //        //body2.SetContentType("application/octet-stream");
   1.298 +
   1.299 +        //        //StringBuilder sb2 = new StringBuilder();
   1.300 +        //        //msg.StoreBody(sb2);
   1.301 +
   1.302 +        //        mailItem.Body = cipher;
   1.303 +
   1.304 +        //        //string temp_name = Path.GetTempFileName();
   1.305 +        //        //File.Delete(temp_name);
   1.306 +        //        //string temp_dir = temp_name + ".dir";
   1.307 +        //        //Directory.CreateDirectory(temp_dir);
   1.308 +
   1.309 +        //        //string temp_file;
   1.310 +        //        //Outlook.Attachment a;
   1.311 +
   1.312 +        //        //try
   1.313 +        //        //{
   1.314 +        //        //    temp_file = temp_dir + "\\content.txt";
   1.315 +        //        //    File.WriteAllText(temp_file, sb2.ToString());
   1.316 +        //        //    a = mailItem.Attachments.Add(temp_file);
   1.317 +        //        //    File.Delete(temp_file);
   1.318 +        //        //    a.PropertyAccessor.SetProperty(PR_CONTENT_DISPOSITION, "inline");
   1.319 +        //        //}
   1.320 +        //        //catch (Exception ex)
   1.321 +        //        //{
   1.322 +        //        //    Stop(ex.ToString());
   1.323 +        //        //}
   1.324 +
   1.325 +        //        //temp_file = temp_dir + "\\cryptinfo.txt";
   1.326 +        //        //File.WriteAllText(temp_file, "Version: 1\r\n");
   1.327 +        //        //a = mailItem.Attachments.Add(temp_file);
   1.328 +        //        //File.Delete(temp_file);
   1.329 +        //        //a.PropertyAccessor.SetProperty(ThisAddIn.PR_ATTACH_MIME_TAG, "application/pgp-encrypted");
   1.330 +
   1.331 +        //        //temp_file = temp_dir + "\\mail.pgp";
   1.332 +        //        //File.WriteAllText(temp_file, cipher);
   1.333 +        //        //a = mailItem.Attachments.Add(temp_file);
   1.334 +        //        //File.Delete(temp_file);
   1.335 +        //        //a.PropertyAccessor.SetProperty(ThisAddIn.PR_ATTACH_MIME_TAG, "application/octet-stream");
   1.336 +
   1.337 +        //        //Directory.Delete(temp_dir);
   1.338 +        //        //mailItem.InternetCodepage = System.Text.Encoding.UTF8.CodePage;
   1.339 +        //    }
   1.340 +        //    else
   1.341 +        //    {
   1.342 +        //        DialogResult result = Stop("Cannot encrypt mail.\n\nencrypt() resulted in " + status.ToString() + "\n\nShould we send unencrypted instead?", "p≡p", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
   1.343 +        //        if (result == DialogResult.No)
   1.344 +        //            Cancel = true;
   1.345 +        //    }
   1.346 +        //}
   1.347 +        //else
   1.348 +
   1.349 +        public void encrypt()
   1.350 +        {
   1.351 +
   1.352 +            pEp_identity_s me = ThisAddIn.addIn.mySelf();
   1.353 +            pEp.log("me", "debug", me.address + ", " + me.fpr);
   1.354 +
   1.355 +            List<string> key_list = new List<string>();
   1.356 +            key_list.Add(me.fpr);
   1.357 +
   1.358 +            pEp.log("addresses", "debug", String.Join(",", addresses));
   1.359 +            foreach (string address in addresses)
   1.360 +            {
   1.361 +                try
   1.362 +                {
   1.363 +                    pEp.log("get_identity", "debug", address);
   1.364 +                    pEp_identity_s ident = pEp.get_identity(address);
   1.365 +                    pEp.log("ident", "debug", ident.fpr);
   1.366 +                    key_list.Add(ident.fpr);
   1.367 +                }
   1.368 +                catch (COMException ex)
   1.369 +                {
   1.370 +                    MessageBox.Show("cannot encrypt; key is missing for " + address + "; " + ex.ToString());
   1.371 +                    return;
   1.372 +                }
   1.373 +                catch (Exception ex2)
   1.374 +                {
   1.375 +                    MessageBox.Show(ex2.ToString());
   1.376 +                    return;
   1.377 +                }
   1.378 +            }
   1.379 +
   1.380 +            string plain;
   1.381 +            pEp.log("BodyFormat", "debug", mailItem.BodyFormat.ToString());
   1.382 +            if (mailItem.BodyFormat == Outlook.OlBodyFormat.olFormatPlain)
   1.383 +                plain = (mailItem.Body + "\n").Replace("\r\n", "\n");
   1.384 +            else
   1.385 +                plain = (mailItem.HTMLBody + "\n").Replace("\r\n", "\n");
   1.386 +            pEp.log("plain", "debug", plain);
   1.387 +
   1.388 +            string cipher;
   1.389 +            keylist = key_list.ToArray();
   1.390 +
   1.391 +            _pEp_STATUS status;
   1.392 +            try
   1.393 +            {
   1.394 +                pEp.log("pEp.encrypt", "debug");
   1.395 +                status = pEp.encrypt(keylist, plain, out cipher);
   1.396 +                pEp.log("pEp.encrypt done", "debug", cipher);
   1.397 +            }
   1.398 +            catch (COMException ex)
   1.399 +            {
   1.400 +                MessageBox.Show(ex.ToString());
   1.401 +                throw new COMException();
   1.402 +            }
   1.403 +
   1.404 +            pEp.log("status", "debug", status.ToString());
   1.405 +            if (status == _pEp_STATUS.pEp_STATUS_OK)
   1.406 +            {
   1.407 +                if (string.IsNullOrEmpty(mailItem.EntryID))
   1.408 +                    mailItem.Save();
   1.409 +
   1.410 +                string temp_name = Path.GetTempFileName();
   1.411 +                File.Delete(temp_name);
   1.412 +                string temp_dir = temp_name + ".dir";
   1.413 +                Directory.CreateDirectory(temp_dir);
   1.414 +
   1.415 +                List<string> filenames = new List<string>();
   1.416 +
   1.417 +                foreach (Outlook.Attachment attachment in mailItem.Attachments)
   1.418 +                {
   1.419 +                    byte[] _ptext = attachment.PropertyAccessor.GetProperty(ThisAddIn.PR_ATTACH_DATA_BIN);
   1.420 +                    string filename = attachment.FileName;
   1.421 +                    string temp_file = temp_dir + "\\" + filename;
   1.422 +                    attachment.SaveAsFile(temp_file);
   1.423 +                    filenames.Add(temp_file);
   1.424 +                    attachment.Delete();
   1.425 +                }
   1.426 +
   1.427 +                mailItem.BodyFormat = Outlook.OlBodyFormat.olFormatPlain;
   1.428 +                mailItem.Body = cipher;
   1.429 +
   1.430 +                foreach (string filename in filenames)
   1.431 +                {
   1.432 +                    byte[] _plain = File.ReadAllBytes(filename);
   1.433 +                    File.Delete(filename);
   1.434 +                    try
   1.435 +                    {
   1.436 +                        cipher = null;
   1.437 +                        status = pEp.encrypt_b(keylist, _plain, out cipher);
   1.438 +                    }
   1.439 +                    catch (COMException ce)
   1.440 +                    {
   1.441 +                        StopHere(ce.ToString());
   1.442 +                    }
   1.443 +                    File.WriteAllText(filename + ".asc", cipher);
   1.444 +                    mailItem.Attachments.Add(filename + ".asc");
   1.445 +                    File.Delete(filename + ".asc");
   1.446 +                }
   1.447 +
   1.448 +                string my_key = pEp.export_key(me.fpr);
   1.449 +                string keyfile = temp_dir + "\\key.asc";
   1.450 +                File.WriteAllText(keyfile, my_key);
   1.451 +                Outlook.Attachment a = mailItem.Attachments.Add(keyfile);
   1.452 +                a.PropertyAccessor.SetProperty(ThisAddIn.PR_ATTACH_MIME_TAG, "text/plain");
   1.453 +                File.Delete(keyfile);
   1.454 +
   1.455 +                Directory.Delete(temp_dir);
   1.456 +                mailItem.InternetCodepage = System.Text.Encoding.UTF8.CodePage;
   1.457 +            }
   1.458 +        }
   1.459 +
   1.460 +        private const string pgp_begin_message = "-----BEGIN PGP MESSAGE-----";
   1.461 +
   1.462 +        protected bool isInlinePGP()
   1.463 +        {
   1.464 +            string body_beginning = "";
   1.465 +            try
   1.466 +            {
   1.467 +                string body = mailItem.Body.Trim();
   1.468 +                body_beginning = body.Substring(0, pgp_begin_message.Length);
   1.469 +                if (body_beginning == pgp_begin_message)
   1.470 +                {
   1.471 +                    mailItem.Body = body;
   1.472 +                    return true;
   1.473 +                }
   1.474 +            }
   1.475 +            catch
   1.476 +            {
   1.477 +            }
   1.478 +
   1.479 +            return false;
   1.480 +        }
   1.481 +
   1.482 +        protected bool isMIMESecurityWithOpenPGP()
   1.483 +        {
   1.484 +            // BUG: we cannot check the MIME type of the body, so that's all we have
   1.485 +
   1.486 +            return mailItem.Attachments.Count == 2
   1.487 +                    && mailItem.Attachments[1].PropertyAccessor.GetProperty(ThisAddIn.PR_ATTACH_MIME_TAG)
   1.488 +                        == "application/pgp-encrypted";
   1.489 +        }
   1.490 +
   1.491 +        public _pEp_STATUS decryptInlinePGP()
   1.492 +        {
   1.493 +            string plain;
   1.494 +            string ctext = mailItem.Body;
   1.495 +            _pEp_STATUS result;
   1.496 +            System.Array key_list;
   1.497 +
   1.498 +            try
   1.499 +            {
   1.500 +                result = pEp.decrypt(ctext, out plain, out key_list);
   1.501 +
   1.502 +                mailItem.HTMLBody = plain;
   1.503 +                keylist = (string[])key_list;
   1.504 +                mailItem.Save();
   1.505 +            }
   1.506 +            catch (COMException)
   1.507 +            {
   1.508 +                result = _pEp_STATUS.pEp_KEY_NOT_FOUND;
   1.509 +            }
   1.510 +
   1.511 +            if (mailItem.Attachments.Count > 0)
   1.512 +            {
   1.513 +                string temp_name = Path.GetTempFileName();
   1.514 +
   1.515 +                File.Delete(temp_name);
   1.516 +                string dir_name = temp_name + ".dir";
   1.517 +                Directory.CreateDirectory(dir_name);
   1.518 +
   1.519 +                List<string> filenames = new List<string>();
   1.520 +                List<Outlook.Attachment> attachments = new List<Outlook.Attachment>();
   1.521 +
   1.522 +                foreach (Outlook.Attachment attachment in mailItem.Attachments)
   1.523 +                {
   1.524 +                    try
   1.525 +                    {
   1.526 +                        if (attachment.PropertyAccessor.GetProperty(ThisAddIn.PR_ATTACH_MIME_TAG) == "application/octet-stream")
   1.527 +                        {
   1.528 +                            string file_path = dir_name + "\\" + attachment.FileName;
   1.529 +                            string extension = file_path.Substring(file_path.Length - 4, 4).ToLower();
   1.530 +                            if (extension == ".pgp" || extension == ".gpg")
   1.531 +                            {
   1.532 +                                file_path = file_path.Substring(0, file_path.Length - 4);
   1.533 +                                attachment.SaveAsFile(file_path + ".asc");
   1.534 +                                attachments.Add(attachment);
   1.535 +                                filenames.Add(file_path);
   1.536 +                            }
   1.537 +                        }
   1.538 +                        if (attachment.PropertyAccessor.GetProperty(ThisAddIn.PR_ATTACH_MIME_TAG) == "text/plain")
   1.539 +                        {
   1.540 +                            string file_path = dir_name + "\\" + attachment.FileName;
   1.541 +                            string extension = file_path.Substring(file_path.Length - 4, 4).ToLower();
   1.542 +                            if (extension == ".asc")
   1.543 +                            {
   1.544 +                                file_path = file_path.Substring(0, file_path.Length - 4);
   1.545 +                                attachment.SaveAsFile(file_path + ".asc");
   1.546 +                                attachments.Add(attachment);
   1.547 +                                filenames.Add(file_path);
   1.548 +                            }
   1.549 +                        }
   1.550 +                    }
   1.551 +                    catch { }
   1.552 +                }
   1.553 +
   1.554 +                List<string> dont_delete = new List<string>();
   1.555 +
   1.556 +                foreach (string filename in filenames)
   1.557 +                {
   1.558 +                    string cipher = File.ReadAllText(filename + ".asc");
   1.559 +                    System.Array _plain;
   1.560 +                    System.Array _key_list;
   1.561 +                    try
   1.562 +                    {
   1.563 +                        _pEp_STATUS status = pEp.decrypt_b(cipher, out _plain, out _key_list);
   1.564 +                        if (status != _pEp_STATUS.pEp_DECRYPTED_AND_VERIFIED)
   1.565 +                            result = _pEp_STATUS.pEp_DECRYPTED;
   1.566 +                        File.WriteAllBytes(filename, (byte[])_plain);
   1.567 +                    }
   1.568 +                    catch (COMException)
   1.569 +                    {
   1.570 +                        if (result != _pEp_STATUS.pEp_KEY_NOT_FOUND)
   1.571 +                            result = _pEp_STATUS.pEp_DECRYPTED;
   1.572 +                        dont_delete.Add(filename);
   1.573 +                    }
   1.574 +                }
   1.575 +
   1.576 +                foreach (Outlook.Attachment attachment in attachments)
   1.577 +                {
   1.578 +                    string file_path = dir_name + "\\" + attachment.FileName;
   1.579 +                    if (file_path.Substring(file_path.Length - 4, 4).ToLower() == ".asc")
   1.580 +                    {
   1.581 +                        file_path = file_path.Substring(0, file_path.Length - 4);
   1.582 +                    }
   1.583 +
   1.584 +                    if (!dont_delete.Exists(x => x == file_path))
   1.585 +                    {
   1.586 +                        attachment.Delete();
   1.587 +                        mailItem.Attachments.Add(file_path);
   1.588 +                        File.Delete(file_path);
   1.589 +                    }
   1.590 +
   1.591 +                    File.Delete(file_path + ".asc");
   1.592 +                }
   1.593 +
   1.594 +                Directory.Delete(dir_name);
   1.595 +            }
   1.596 +
   1.597 +            return result;
   1.598 +        }
   1.599 +
   1.600 +        _pEp_STATUS decryptMIMESecurityWithOpenPGP()
   1.601 +        {
   1.602 +            _pEp_STATUS result;
   1.603 +            string plain = "";
   1.604 +            byte[] _ctext = mailItem.Attachments[2].PropertyAccessor.GetProperty(ThisAddIn.PR_ATTACH_DATA_BIN);
   1.605 +            string ctext = System.Text.Encoding.ASCII.GetString(_ctext);
   1.606 +            System.Array key_list;
   1.607 +            bool decrypted = false;
   1.608 +
   1.609 +            try
   1.610 +            {
   1.611 +                result = ThisAddIn.pEp.decrypt(ctext, out plain, out key_list);
   1.612 +                if (result == _pEp_STATUS.pEp_DECRYPTED_AND_VERIFIED || result == _pEp_STATUS.pEp_DECRYPTED)
   1.613 +                {
   1.614 +                    decrypted = true;
   1.615 +                    mailItem.Attachments[2].Delete();
   1.616 +                    mailItem.Attachments[1].Delete();
   1.617 +                    keylist = (string[])key_list;
   1.618 +                    mailItem.Save();
   1.619 +                }
   1.620 +            }
   1.621 +            catch (COMException)
   1.622 +            {
   1.623 +                result = _pEp_STATUS.pEp_KEY_NOT_FOUND;
   1.624 +            }
   1.625 +
   1.626 +            if (decrypted)
   1.627 +            {
   1.628 +                MimeMessage aMimeMessage = new MimeMessage();
   1.629 +                aMimeMessage.LoadBody(plain);
   1.630 +                ArrayList bodylist = new ArrayList();
   1.631 +                aMimeMessage.GetBodyPartList(bodylist);
   1.632 +
   1.633 +                foreach (MimeBody b in bodylist)
   1.634 +                {
   1.635 +                    if (b.IsMultiPart())
   1.636 +                    {
   1.637 +                        // do nothing
   1.638 +                    }
   1.639 +                    else
   1.640 +                    {
   1.641 +                        string filename = b.GetFilename();
   1.642 +                        if (filename == null && b.IsText())
   1.643 +                        {
   1.644 +                            mailItem.Body = b.GetText();
   1.645 +                        }
   1.646 +                        else
   1.647 +                        {
   1.648 +                            if (filename == null)
   1.649 +                                filename = "noname.bin";
   1.650 +                            string temp_name = Path.GetTempFileName();
   1.651 +                            File.Delete(temp_name);
   1.652 +                            string temp_dir = temp_name + ".dir";
   1.653 +                            Directory.CreateDirectory(temp_dir);
   1.654 +                            string temp_file = temp_dir + "\\" + filename;
   1.655 +                            b.WriteToFile(temp_file);
   1.656 +                            var a = mailItem.Attachments.Add(temp_file);
   1.657 +                            File.Delete(temp_file);
   1.658 +                            Directory.Delete(temp_dir);
   1.659 +                        }
   1.660 +                    }
   1.661 +                }
   1.662 +                mailItem.Save();
   1.663 +                import_attached_keys();
   1.664 +            }
   1.665 +
   1.666 +            return result;
   1.667 +        }
   1.668 +
   1.669 +        public _pEp_STATUS checkSignature()
   1.670 +        {
   1.671 +            _pEp_STATUS result = _pEp_STATUS.pEp_STATUS_OK;
   1.672 +
   1.673 +            foreach (Outlook.Attachment attachment in mailItem.Attachments)
   1.674 +            {
   1.675 +                string mime_tag = attachment.PropertyAccessor.GetProperty(ThisAddIn.PR_ATTACH_MIME_TAG);
   1.676 +                if (mime_tag == "application/pgp-signature")
   1.677 +                {
   1.678 +                    byte[] data = attachment.PropertyAccessor.GetProperty(ThisAddIn.PR_ATTACH_DATA_BIN);
   1.679 +                    string signature = Encoding.UTF8.GetString(data);
   1.680 +
   1.681 +                    try
   1.682 +                    {
   1.683 +                        if (mailItem.BodyFormat == Outlook.OlBodyFormat.olFormatHTML)
   1.684 +                        {
   1.685 +                            System.Array key_list;
   1.686 +                            result = pEp.verify(mailItem.HTMLBody, signature, out key_list);
   1.687 +                            keylist = (string[])key_list;
   1.688 +                        }
   1.689 +                        else if (mailItem.BodyFormat == Outlook.OlBodyFormat.olFormatPlain)
   1.690 +                        {
   1.691 +                            System.Array key_list;
   1.692 +                            result = pEp.verify(mailItem.Body, signature, out key_list);
   1.693 +                            keylist = (string[])key_list;
   1.694 +                        }
   1.695 +                        else
   1.696 +                            result = _pEp_STATUS.pEp_STATUS_OK;
   1.697 +
   1.698 +                        if (result == _pEp_STATUS.pEp_DECRYPT_SIGNATURE_DOES_NOT_MATCH)
   1.699 +                            result = _pEp_STATUS.pEp_STATUS_OK; // BUG: this should be real;
   1.700 +
   1.701 +                        mailItem.Save();
   1.702 +                    }
   1.703 +                    catch (COMException)
   1.704 +                    {
   1.705 +                    }
   1.706 +
   1.707 +                    break;
   1.708 +                }
   1.709 +            }
   1.710 +
   1.711 +            return result;
   1.712 +        }
   1.713 +
   1.714 +        private bool in_handle = false;
   1.715 +
   1.716 +        public void handleIncoming()
   1.717 +        {
   1.718 +            if (!incoming)
   1.719 +                return;
   1.720 +
   1.721 +            if (in_handle)
   1.722 +                return;
   1.723 +
   1.724 +            pEp_identity_s identity = new pEp_identity_s();
   1.725 +            bool identity_found = false;
   1.726 +
   1.727 +            switch (encStatus)
   1.728 +            {
   1.729 +                case EncStatus.authentic:
   1.730 +                    return;
   1.731 +                case EncStatus.forged:
   1.732 +                    return;
   1.733 +                case EncStatus.secure:
   1.734 +                    return;
   1.735 +                case EncStatus.unencrypted:
   1.736 +                    return;
   1.737 +                case EncStatus.encrypted:
   1.738 +                    return;
   1.739 +                case EncStatus.could_be:
   1.740 +                    in_handle = true;
   1.741 +                    try
   1.742 +                    {
   1.743 +                        identity = pEp.get_identity(from);
   1.744 +                        if (identity.comm_type >= _pEp_comm_type.pEp_ct_confirmed_encryption)
   1.745 +                        {
   1.746 +                            encStatus = EncStatus.secure;
   1.747 +                            mailItem.Save();
   1.748 +                            identity_found = true;
   1.749 +                        }
   1.750 +                        in_handle = false;
   1.751 +                        return;
   1.752 +                    }
   1.753 +                    catch (COMException)
   1.754 +                    {
   1.755 +                        break;
   1.756 +                    }
   1.757 +                default: // unknown
   1.758 +                    in_handle = true;
   1.759 +                    try
   1.760 +                    {
   1.761 +                        identity = pEp.get_identity(from);
   1.762 +                        identity_found = true;
   1.763 +                    }
   1.764 +                    catch (COMException)
   1.765 +                    { }
   1.766 +                    break;
   1.767 +            }
   1.768 +
   1.769 +            encStatus = EncStatus.unknown;
   1.770 +
   1.771 +            try
   1.772 +            {
   1.773 +                import_attached_keys();
   1.774 +
   1.775 +                identity.username = mailItem.Sender.Name;
   1.776 +                identity.user_id = mailItem.Sender.ID;
   1.777 +
   1.778 +                if (!identity_found)
   1.779 +                {
   1.780 +                    identity.address = from;
   1.781 +                    identity.comm_type = _pEp_comm_type.pEp_ct_unknown;
   1.782 +
   1.783 +                    try
   1.784 +                    {
   1.785 +                        string[] keys = (string[]) pEp.find_keys(identity.address);
   1.786 +                        if (keys != null && keys.Length > 0)
   1.787 +                            if (is_pEp())
   1.788 +                                identity.comm_type = _pEp_comm_type.pEp_ct_pEp_unconfirmed;
   1.789 +                            else
   1.790 +                                identity.comm_type = _pEp_comm_type.pEp_ct_OpenPGP_unconfirmed;
   1.791 +                        identity.fpr = keys[0];
   1.792 +                        pEp.set_identity(ref identity);
   1.793 +                        identity_found = true;
   1.794 +                    }
   1.795 +                    catch (COMException)
   1.796 +                    { }
   1.797 +                }
   1.798 +
   1.799 +                _pEp_STATUS result = _pEp_STATUS.pEp_UNKNOWN_ERROR;
   1.800 +
   1.801 +                if (isInlinePGP())
   1.802 +                {
   1.803 +                    result = decryptInlinePGP();
   1.804 +                }
   1.805 +                else if (isMIMESecurityWithOpenPGP())
   1.806 +                {
   1.807 +                    result = decryptMIMESecurityWithOpenPGP();
   1.808 +                }
   1.809 +                else // unencrypted
   1.810 +                {
   1.811 +                    result = checkSignature();
   1.812 +                }
   1.813 +
   1.814 +                switch (result)
   1.815 +                {
   1.816 +                    case _pEp_STATUS.pEp_DECRYPT_SIGNATURE_DOES_NOT_MATCH:
   1.817 +                        encStatus = EncStatus.forged;
   1.818 +                        mailItem.Save();
   1.819 +                        break;
   1.820 +
   1.821 +                    case _pEp_STATUS.pEp_VERIFIED:
   1.822 +                        goto case _pEp_STATUS.pEp_VERIFIED_AND_TRUSTED;
   1.823 +
   1.824 +                    case _pEp_STATUS.pEp_VERIFIED_AND_TRUSTED:
   1.825 +                        if (identity_found)
   1.826 +                        {
   1.827 +                            if (identity.comm_type >= _pEp_comm_type.pEp_ct_confirmed_encryption)
   1.828 +                            {
   1.829 +                                encStatus = EncStatus.authentic;
   1.830 +                            }
   1.831 +                            else
   1.832 +                            {
   1.833 +                                encStatus = EncStatus.unencrypted;
   1.834 +                            }
   1.835 +                            mailItem.Save();
   1.836 +                        }
   1.837 +                        else // identity not found
   1.838 +                        {
   1.839 +                            encStatus = EncStatus.unencrypted;
   1.840 +                            mailItem.Save();
   1.841 +
   1.842 +                            if (keylist.Length > 0)
   1.843 +                            {
   1.844 +                                try
   1.845 +                                {
   1.846 +                                    identity.comm_type = _pEp_comm_type.pEp_ct_OpenPGP_unconfirmed;
   1.847 +                                    identity.fpr = keylist[0]; // BUG: check for other keys
   1.848 +                                    pEp.set_identity(identity);
   1.849 +                                }
   1.850 +                                catch (COMException)
   1.851 +                                { }
   1.852 +                            }
   1.853 +                        }
   1.854 +                        break;
   1.855 +
   1.856 +                    case _pEp_STATUS.pEp_STATUS_OK: // BUG: key is there but verification wasn't possible
   1.857 +                        if (identity_found)
   1.858 +                        {
   1.859 +                            encStatus = EncStatus.unencrypted;
   1.860 +                            mailItem.Save();
   1.861 +                        }
   1.862 +                        else // identity not found
   1.863 +                        {
   1.864 +                            encStatus = EncStatus.unencrypted;
   1.865 +                            mailItem.Save();
   1.866 +
   1.867 +                            if (keylist.Length > 0)
   1.868 +                            {
   1.869 +                                try
   1.870 +                                {
   1.871 +                                    identity.comm_type = _pEp_comm_type.pEp_ct_OpenPGP_unconfirmed;
   1.872 +                                    identity.fpr = keylist[0]; // BUG: check for other keys
   1.873 +                                    pEp.set_identity(identity);
   1.874 +                                }
   1.875 +                                catch (COMException)
   1.876 +                                { }
   1.877 +                            }
   1.878 +                        }
   1.879 +                        break;
   1.880 +
   1.881 +                    case _pEp_STATUS.pEp_VERIFY_NO_KEY:
   1.882 +                        pEp.examine_identity(identity);
   1.883 +                        encStatus = EncStatus.unknown;
   1.884 +                        mailItem.Save();
   1.885 +                        break;
   1.886 +
   1.887 +                    case _pEp_STATUS.pEp_DECRYPTED_AND_VERIFIED:
   1.888 +                        if (identity.comm_type == _pEp_comm_type.pEp_ct_unknown)
   1.889 +                            identity.comm_type = _pEp_comm_type.pEp_ct_OpenPGP_unconfirmed; // BUG: key size should be checked
   1.890 +
   1.891 +                        if (identity_found)
   1.892 +                        {
   1.893 +                            if (keylist.Contains(identity.fpr))
   1.894 +                            {
   1.895 +                                if (identity.comm_type >= _pEp_comm_type.pEp_ct_confirmed_encryption)
   1.896 +                                {
   1.897 +                                    encStatus = EncStatus.secure;
   1.898 +                                }
   1.899 +                                else
   1.900 +                                {
   1.901 +                                    encStatus = EncStatus.could_be;
   1.902 +                                }
   1.903 +                                mailItem.Save();
   1.904 +                            }
   1.905 +                        }
   1.906 +                        else // identity not found yet
   1.907 +                        {
   1.908 +                            if (keylist.Length >= 1)
   1.909 +                            {
   1.910 +                                identity.fpr = keylist[0]; // BUG: should not only work with the first key
   1.911 +
   1.912 +                                if (identity.comm_type >= _pEp_comm_type.pEp_ct_unconfirmed_encryption)
   1.913 +                                {
   1.914 +                                    encStatus = EncStatus.could_be;
   1.915 +                                }
   1.916 +                                else
   1.917 +                                {
   1.918 +                                    encStatus = EncStatus.unencrypted;
   1.919 +                                }
   1.920 +
   1.921 +                                pEp.set_identity(identity);
   1.922 +                                mailItem.Save();
   1.923 +                            }
   1.924 +                            else
   1.925 +                            {
   1.926 +                                pEp.examine_identity(identity);
   1.927 +                            }
   1.928 +                        }
   1.929 +                        break;
   1.930 +
   1.931 +                    case _pEp_STATUS.pEp_DECRYPTED:
   1.932 +                        pEp.examine_identity(identity);
   1.933 +
   1.934 +                        if (identity.comm_type == _pEp_comm_type.pEp_ct_unknown)
   1.935 +                            identity.comm_type = _pEp_comm_type.pEp_ct_OpenPGP_unconfirmed; // BUG: key size should be checked
   1.936 +
   1.937 +                        if (identity_found)
   1.938 +                        {
   1.939 +                            if (identity.comm_type >= _pEp_comm_type.pEp_ct_unconfirmed_encryption)
   1.940 +                            {
   1.941 +                                encStatus = EncStatus.encrypted;
   1.942 +                            }
   1.943 +                            else
   1.944 +                            {
   1.945 +                                encStatus = EncStatus.unencrypted;
   1.946 +                            }
   1.947 +                            mailItem.Save();
   1.948 +                        }
   1.949 +                        else // identity not found yet
   1.950 +                        {
   1.951 +                            encStatus = EncStatus.encrypted;
   1.952 +                            mailItem.Save();
   1.953 +
   1.954 +                            if (keylist.Length >= 1)
   1.955 +                            {
   1.956 +                                identity.fpr = keylist[0]; // BUG: should not only work with the first key
   1.957 +                                pEp.set_identity(identity);
   1.958 +                            }
   1.959 +                            else
   1.960 +                            {
   1.961 +                                pEp.examine_identity(identity);
   1.962 +                            }
   1.963 +                        }
   1.964 +                        break;
   1.965 +
   1.966 +                    case _pEp_STATUS.pEp_KEY_NOT_FOUND:
   1.967 +                        encStatus = EncStatus.cannot_decrypt;
   1.968 +                        mailItem.Save();
   1.969 +                        break;
   1.970 +                }
   1.971 +            }
   1.972 +            catch (COMException ce)
   1.973 +            {
   1.974 +                StopHere(ce.ToString());
   1.975 +            }
   1.976 +            catch (Exception ex)
   1.977 +            {
   1.978 +                StopHere(ex.ToString());
   1.979 +            }
   1.980 +            in_handle = false;
   1.981 +        }
   1.982 +
   1.983 +        public void addKey()
   1.984 +        {
   1.985 +            string temp_name = Path.GetTempFileName();
   1.986 +            string temp_dir = temp_name + ".dir";
   1.987 +            Directory.CreateDirectory(temp_dir);
   1.988 +
   1.989 +            pEp_identity_s me = ThisAddIn.addIn.mySelf();
   1.990 +
   1.991 +            string my_key = pEp.export_key(me.fpr);
   1.992 +            string keyfile = temp_dir + "\\key.asc";
   1.993 +            File.WriteAllText(keyfile, my_key);
   1.994 +            Outlook.Attachment a = mailItem.Attachments.Add(keyfile);
   1.995 +            a.PropertyAccessor.SetProperty(ThisAddIn.PR_ATTACH_MIME_TAG, "text/plain");
   1.996 +            File.Delete(keyfile);
   1.997 +
   1.998 +            Directory.Delete(temp_dir);
   1.999 +        }
  1.1000 +    }
  1.1001 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/EncryptionStatusPanel.Designer.cs	Wed Jun 25 18:35:57 2014 +0200
     2.3 @@ -0,0 +1,199 @@
     2.4 +namespace pEp
     2.5 +{
     2.6 +    [System.ComponentModel.ToolboxItemAttribute(false)]
     2.7 +    partial class EncryptionStatusPanel : Microsoft.Office.Tools.Outlook.FormRegionBase
     2.8 +    {
     2.9 +        public EncryptionStatusPanel(Microsoft.Office.Interop.Outlook.FormRegion formRegion)
    2.10 +            : base(Globals.Factory, formRegion)
    2.11 +        {
    2.12 +            this.InitializeComponent();
    2.13 +        }
    2.14 +
    2.15 +        /// <summary> 
    2.16 +        /// Required designer variable.
    2.17 +        /// </summary>
    2.18 +        private System.ComponentModel.IContainer components = null;
    2.19 +
    2.20 +        /// <summary> 
    2.21 +        /// Clean up any resources being used.
    2.22 +        /// </summary>
    2.23 +        protected override void Dispose(bool disposing)
    2.24 +        {
    2.25 +            if (disposing && (components != null))
    2.26 +            {
    2.27 +                components.Dispose();
    2.28 +            }
    2.29 +            base.Dispose(disposing);
    2.30 +        }
    2.31 +
    2.32 +        #region Component Designer generated code
    2.33 +
    2.34 +        /// <summary> 
    2.35 +        /// Required method for Designer support - do not modify 
    2.36 +        /// the contents of this method with the code editor.
    2.37 +        /// </summary>
    2.38 +        private void InitializeComponent()
    2.39 +        {
    2.40 +            this.EncryptionStatus = new System.Windows.Forms.Button();
    2.41 +            this.linkExplanation = new System.Windows.Forms.LinkLabel();
    2.42 +            this.lblLogo = new System.Windows.Forms.Label();
    2.43 +            this.SuspendLayout();
    2.44 +            // 
    2.45 +            // EncryptionStatus
    2.46 +            // 
    2.47 +            this.EncryptionStatus.BackColor = System.Drawing.Color.Gainsboro;
    2.48 +            this.EncryptionStatus.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
    2.49 +            this.EncryptionStatus.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
    2.50 +            this.EncryptionStatus.Location = new System.Drawing.Point(4, 4);
    2.51 +            this.EncryptionStatus.Margin = new System.Windows.Forms.Padding(0);
    2.52 +            this.EncryptionStatus.Name = "EncryptionStatus";
    2.53 +            this.EncryptionStatus.Size = new System.Drawing.Size(105, 29);
    2.54 +            this.EncryptionStatus.TabIndex = 0;
    2.55 +            this.EncryptionStatus.Text = "unknown";
    2.56 +            this.EncryptionStatus.UseVisualStyleBackColor = false;
    2.57 +            this.EncryptionStatus.Click += new System.EventHandler(this.EncryptionStatus_Click);
    2.58 +            // 
    2.59 +            // linkExplanation
    2.60 +            // 
    2.61 +            this.linkExplanation.AutoSize = true;
    2.62 +            this.linkExplanation.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
    2.63 +            this.linkExplanation.Location = new System.Drawing.Point(117, 11);
    2.64 +            this.linkExplanation.Name = "linkExplanation";
    2.65 +            this.linkExplanation.Size = new System.Drawing.Size(448, 15);
    2.66 +            this.linkExplanation.TabIndex = 1;
    2.67 +            this.linkExplanation.TabStop = true;
    2.68 +            this.linkExplanation.Text = "There is not enough information to ensure if this communication is secure or not." +
    2.69 +    "";
    2.70 +            this.linkExplanation.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkExplanation_LinkClicked);
    2.71 +            // 
    2.72 +            // lblLogo
    2.73 +            // 
    2.74 +            this.lblLogo.AutoSize = true;
    2.75 +            this.lblLogo.Dock = System.Windows.Forms.DockStyle.Right;
    2.76 +            this.lblLogo.Font = new System.Drawing.Font("Arial", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
    2.77 +            this.lblLogo.ForeColor = System.Drawing.Color.Silver;
    2.78 +            this.lblLogo.Location = new System.Drawing.Point(541, 0);
    2.79 +            this.lblLogo.Name = "lblLogo";
    2.80 +            this.lblLogo.Size = new System.Drawing.Size(54, 27);
    2.81 +            this.lblLogo.TabIndex = 2;
    2.82 +            this.lblLogo.Text = "p≡p";
    2.83 +            this.lblLogo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
    2.84 +            // 
    2.85 +            // EncryptionStatusPanel
    2.86 +            // 
    2.87 +            this.AccessibleName = "";
    2.88 +            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    2.89 +            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    2.90 +            this.BackColor = System.Drawing.SystemColors.Window;
    2.91 +            this.Controls.Add(this.lblLogo);
    2.92 +            this.Controls.Add(this.linkExplanation);
    2.93 +            this.Controls.Add(this.EncryptionStatus);
    2.94 +            this.Name = "EncryptionStatusPanel";
    2.95 +            this.Size = new System.Drawing.Size(595, 38);
    2.96 +            this.FormRegionShowing += new System.EventHandler(this.FormRegion1_FormRegionShowing);
    2.97 +            this.FormRegionClosed += new System.EventHandler(this.FormRegion1_FormRegionClosed);
    2.98 +            this.ResumeLayout(false);
    2.99 +            this.PerformLayout();
   2.100 +
   2.101 +        }
   2.102 +
   2.103 +        #endregion
   2.104 +
   2.105 +        #region Form Region Designer generated code
   2.106 +
   2.107 +        /// <summary> 
   2.108 +        /// Required method for Designer support - do not modify 
   2.109 +        /// the contents of this method with the code editor.
   2.110 +        /// </summary>
   2.111 +        private static void InitializeManifest(Microsoft.Office.Tools.Outlook.FormRegionManifest manifest, Microsoft.Office.Tools.Outlook.Factory factory)
   2.112 +        {
   2.113 +            manifest.FormRegionName = "Encryption Status";
   2.114 +            manifest.FormRegionType = Microsoft.Office.Tools.Outlook.FormRegionType.Adjoining;
   2.115 +
   2.116 +        }
   2.117 +
   2.118 +        #endregion
   2.119 +
   2.120 +        private System.Windows.Forms.Button EncryptionStatus;
   2.121 +        private System.Windows.Forms.LinkLabel linkExplanation;
   2.122 +        private System.Windows.Forms.Label lblLogo;
   2.123 +
   2.124 +        public partial class FormRegion1Factory : Microsoft.Office.Tools.Outlook.IFormRegionFactory
   2.125 +        {
   2.126 +            public event Microsoft.Office.Tools.Outlook.FormRegionInitializingEventHandler FormRegionInitializing;
   2.127 +
   2.128 +            private Microsoft.Office.Tools.Outlook.FormRegionManifest _Manifest;
   2.129 +
   2.130 +            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
   2.131 +            public FormRegion1Factory()
   2.132 +            {
   2.133 +                this._Manifest = Globals.Factory.CreateFormRegionManifest();
   2.134 +                EncryptionStatusPanel.InitializeManifest(this._Manifest, Globals.Factory);
   2.135 +                this.FormRegionInitializing += new Microsoft.Office.Tools.Outlook.FormRegionInitializingEventHandler(this.FormRegion1Factory_FormRegionInitializing);
   2.136 +            }
   2.137 +
   2.138 +            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
   2.139 +            public Microsoft.Office.Tools.Outlook.FormRegionManifest Manifest
   2.140 +            {
   2.141 +                get
   2.142 +                {
   2.143 +                    return this._Manifest;
   2.144 +                }
   2.145 +            }
   2.146 +
   2.147 +            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
   2.148 +            Microsoft.Office.Tools.Outlook.IFormRegion Microsoft.Office.Tools.Outlook.IFormRegionFactory.CreateFormRegion(Microsoft.Office.Interop.Outlook.FormRegion formRegion)
   2.149 +            {
   2.150 +                EncryptionStatusPanel form = new EncryptionStatusPanel(formRegion);
   2.151 +                form.Factory = this;
   2.152 +                return form;
   2.153 +            }
   2.154 +
   2.155 +            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
   2.156 +            byte[] Microsoft.Office.Tools.Outlook.IFormRegionFactory.GetFormRegionStorage(object outlookItem, Microsoft.Office.Interop.Outlook.OlFormRegionMode formRegionMode, Microsoft.Office.Interop.Outlook.OlFormRegionSize formRegionSize)
   2.157 +            {
   2.158 +                throw new System.NotSupportedException();
   2.159 +            }
   2.160 +
   2.161 +            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
   2.162 +            bool Microsoft.Office.Tools.Outlook.IFormRegionFactory.IsDisplayedForItem(object outlookItem, Microsoft.Office.Interop.Outlook.OlFormRegionMode formRegionMode, Microsoft.Office.Interop.Outlook.OlFormRegionSize formRegionSize)
   2.163 +            {
   2.164 +                if (this.FormRegionInitializing != null)
   2.165 +                {
   2.166 +                    Microsoft.Office.Tools.Outlook.FormRegionInitializingEventArgs cancelArgs = Globals.Factory.CreateFormRegionInitializingEventArgs(outlookItem, formRegionMode, formRegionSize, false);
   2.167 +                    this.FormRegionInitializing(this, cancelArgs);
   2.168 +                    return !cancelArgs.Cancel;
   2.169 +                }
   2.170 +                else
   2.171 +                {
   2.172 +                    return true;
   2.173 +                }
   2.174 +            }
   2.175 +
   2.176 +            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
   2.177 +            Microsoft.Office.Tools.Outlook.FormRegionKindConstants Microsoft.Office.Tools.Outlook.IFormRegionFactory.Kind
   2.178 +            {
   2.179 +                get
   2.180 +                {
   2.181 +                    return Microsoft.Office.Tools.Outlook.FormRegionKindConstants.WindowsForms;
   2.182 +                }
   2.183 +            }
   2.184 +        }
   2.185 +    }
   2.186 +
   2.187 +    partial class WindowFormRegionCollection
   2.188 +    {
   2.189 +        internal EncryptionStatusPanel FormRegion1
   2.190 +        {
   2.191 +            get
   2.192 +            {
   2.193 +                foreach (var item in this)
   2.194 +                {
   2.195 +                    if (item.GetType() == typeof(EncryptionStatusPanel))
   2.196 +                        return (EncryptionStatusPanel)item;
   2.197 +                }
   2.198 +                return null;
   2.199 +            }
   2.200 +        }
   2.201 +    }
   2.202 +}
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/EncryptionStatusPanel.cs	Wed Jun 25 18:35:57 2014 +0200
     3.3 @@ -0,0 +1,377 @@
     3.4 +using System;
     3.5 +using System.Collections;
     3.6 +using System.Collections.Generic;
     3.7 +using System.Linq;
     3.8 +using System.Text;
     3.9 +using System.IO;
    3.10 +using System.Windows.Forms;
    3.11 +using System.Threading;
    3.12 +using System.Runtime.InteropServices;
    3.13 +using Office = Microsoft.Office.Core;
    3.14 +using Outlook = Microsoft.Office.Interop.Outlook;
    3.15 +using MessageBox = System.Windows.Forms.MessageBox;
    3.16 +using MessageBoxButtons = System.Windows.Forms.MessageBoxButtons;
    3.17 +using MessageBoxIcon = System.Windows.Forms.MessageBoxIcon;
    3.18 +using Color = System.Drawing.Color;
    3.19 +using pEpComAdapterLib;
    3.20 +using MIME;
    3.21 +
    3.22 +namespace pEp
    3.23 +{
    3.24 +    partial class EncryptionStatusPanel
    3.25 +    {
    3.26 +        #region Form Region Factory
    3.27 +
    3.28 +        [Microsoft.Office.Tools.Outlook.FormRegionMessageClass(Microsoft.Office.Tools.Outlook.FormRegionMessageClassAttribute.Note)]
    3.29 +        [Microsoft.Office.Tools.Outlook.FormRegionName("pEp.FormRegion1")]
    3.30 +        public partial class FormRegion1Factory
    3.31 +        {
    3.32 +            // Occurs before the form region is initialized.
    3.33 +            // To prevent the form region from appearing, set e.Cancel to true.
    3.34 +            // Use e.OutlookItem to get a reference to the current Outlook item.
    3.35 +            private void FormRegion1Factory_FormRegionInitializing(object sender, Microsoft.Office.Tools.Outlook.FormRegionInitializingEventArgs e)
    3.36 +            {
    3.37 +            }
    3.38 +        }
    3.39 +
    3.40 +        #endregion
    3.41 +
    3.42 +        static void StopHere(string reason)
    3.43 +        {
    3.44 +            MessageBox.Show(reason);
    3.45 +        }
    3.46 +
    3.47 +        private object _outlookItem = null;
    3.48 +        private CryptableMailItem _mailItem = null;
    3.49 +
    3.50 +        CryptableMailItem mailItem
    3.51 +        {
    3.52 +            get
    3.53 +            {
    3.54 +                bool found = false;
    3.55 +
    3.56 +                for (int i = 0; i<20; i++)
    3.57 +                {
    3.58 +                    Application.DoEvents();
    3.59 +
    3.60 +                    try
    3.61 +                    {
    3.62 +                        object my_outlookItem = this.OutlookItem;
    3.63 +
    3.64 +                        if (_outlookItem != my_outlookItem)
    3.65 +                        {
    3.66 +                            _outlookItem = my_outlookItem;
    3.67 +                            _mailItem = new CryptableMailItem((Outlook.MailItem)my_outlookItem);
    3.68 +                        }
    3.69 +                        found = true;
    3.70 +                    }
    3.71 +                    catch (COMException)
    3.72 +                    {
    3.73 +                    }
    3.74 +                }
    3.75 +
    3.76 +                if (!found)
    3.77 +                    throw new InvalidComObjectException("cannot find mailItem; giving up after 20 tries");
    3.78 +
    3.79 +                return _mailItem;
    3.80 +            }
    3.81 +        }
    3.82 +
    3.83 +        // Occurs before the form region is displayed.
    3.84 +        // Use this.OutlookItem to get a reference to the current Outlook item.
    3.85 +        // Use this.OutlookFormRegion to get a reference to the form region.
    3.86 +        private void FormRegion1_FormRegionShowing(object sender, System.EventArgs e)
    3.87 +        {
    3.88 +            try
    3.89 +            {
    3.90 +                if (ThisAddIn.pEp == null || mailItem == null)
    3.91 +                {
    3.92 +                    Hide();
    3.93 +                }
    3.94 +                else
    3.95 +                {
    3.96 +                    ((Outlook.MailItem)this.OutlookItem).PropertyChange += new Outlook.ItemEvents_10_PropertyChangeEventHandler(mailItem_PropertyChange);
    3.97 +
    3.98 +                    enc_status = EncStatus.unknown;
    3.99 +                    reset_enc_status();
   3.100 +                }
   3.101 +            }
   3.102 +            catch (COMException ex)
   3.103 +            {
   3.104 +                StopHere(ex.ToString());
   3.105 +            }
   3.106 +            catch (Exception ex)
   3.107 +            {
   3.108 +                StopHere(ex.ToString());
   3.109 +            }
   3.110 +        }
   3.111 +
   3.112 +        private void reset_enc_status()
   3.113 +        {
   3.114 +            // don't ask, it's Outlook :-/
   3.115 +
   3.116 +            if (mailItem != null)
   3.117 +            {
   3.118 +                if (mailItem.incoming)
   3.119 +                    enc_status = mailItem.encStatus;
   3.120 +                else // outgoing
   3.121 +                    enc_status = mailItem.possibleEncStatus;
   3.122 +            }
   3.123 +        }
   3.124 +
   3.125 +        void mailItem_PropertyChange(string Name)
   3.126 +        {
   3.127 +            switch (Name)
   3.128 +            {
   3.129 +                case "To":
   3.130 +                    reset_enc_status();
   3.131 +                    break;
   3.132 +                case "CC":
   3.133 +                    reset_enc_status();
   3.134 +                    break;
   3.135 +            }
   3.136 +        }
   3.137 +
   3.138 +
   3.139 +        // Occurs when the form region is closed.
   3.140 +        // Use this.OutlookItem to get a reference to the current Outlook item.
   3.141 +        // Use this.OutlookFormRegion to get a reference to the form region.
   3.142 +        private void FormRegion1_FormRegionClosed(object sender, System.EventArgs e)
   3.143 +        {
   3.144 +        }
   3.145 +
   3.146 +        private struct EncStatusData
   3.147 +        {
   3.148 +            public string title;
   3.149 +            public string explanation;
   3.150 +            public string suggestion;
   3.151 +            public Color background;
   3.152 +            public Color foreground;
   3.153 +            public string button_text;
   3.154 +        };
   3.155 +
   3.156 +        private EncStatusData enc_status_data;
   3.157 +        private EncStatus _enc_status;
   3.158 +
   3.159 +        public EncStatus enc_status {
   3.160 +            get
   3.161 +            {
   3.162 +                return _enc_status;
   3.163 +            }
   3.164 +            set
   3.165 +            {
   3.166 +                if (value != _enc_status || value == EncStatus.unknown)
   3.167 +                {
   3.168 +                    _enc_status = value;
   3.169 +                    ThisAddIn.last_enc_status = _enc_status;
   3.170 +
   3.171 +                    switch (value)
   3.172 +                    {
   3.173 +                        case EncStatus.secure:
   3.174 +                            enc_status_data.explanation = "A handshake with the communication partner was done already.";
   3.175 +                            enc_status_data.suggestion = "The results make sure that each communication with this partner is secure.";
   3.176 +                            enc_status_data.title = "p≡p – This communication is private and authentic.";
   3.177 +                            enc_status_data.background = Color.Green;
   3.178 +                            enc_status_data.foreground = Color.White;
   3.179 +                            enc_status_data.button_text = "Secure";
   3.180 +                            break;
   3.181 +
   3.182 +                        case EncStatus.could_be:
   3.183 +                            enc_status_data.explanation = "To ensure a private and authentic communication please do a handshake with the communication partner. To do so, just press the Handshake button.";
   3.184 +                            enc_status_data.suggestion = "A handshake is needed only once per communication partner. After successfully doing a handshake each communication with that partner will be private and reliable for sure.";
   3.185 +                            enc_status_data.title = "p≡p – This communication could be secure.";
   3.186 +                            enc_status_data.background = Color.Gold;
   3.187 +                            enc_status_data.foreground = Color.Black;
   3.188 +                            enc_status_data.button_text = "Handshake...";
   3.189 +                            break;
   3.190 +
   3.191 +                        case EncStatus.encrypted:
   3.192 +                            enc_status_data.explanation = "The message was encrypted but not in a feasible way or it wasn't signed.";
   3.193 +                            enc_status_data.suggestion = "There is no credible encryption for this message, so you should be aware that there may be eavesdroppers and the message could be forged. It could be OK just as well.";
   3.194 +                            enc_status_data.title = "p≡p – This communication is unreliable.";
   3.195 +                            enc_status_data.background = Color.Gainsboro;
   3.196 +                            enc_status_data.foreground = Color.Black;
   3.197 +                            enc_status_data.button_text = "Unreliable";
   3.198 +                            break;
   3.199 +
   3.200 +                        case EncStatus.authentic:
   3.201 +                            enc_status_data.explanation = "The message has a valid signature, but is unencrypted.";
   3.202 +                            enc_status_data.suggestion = "You should be aware that there may be eavesdroppers.";
   3.203 +                            enc_status_data.title = "p≡p – This communication is authentic, but it is not private.";
   3.204 +                            enc_status_data.background = Color.White;
   3.205 +                            enc_status_data.foreground = Color.Black;
   3.206 +                            enc_status_data.button_text = "Authentic";
   3.207 +                            break;
   3.208 +
   3.209 +                        case EncStatus.unencrypted:
   3.210 +                            enc_status_data.explanation = "This communication is insecure.";
   3.211 +                            enc_status_data.suggestion = "You should be aware that there may be eavesdroppers and the message could be forged. It could be OK just as well.";
   3.212 +                            enc_status_data.title = "p≡p – This communication is unencrypted.";
   3.213 +                            enc_status_data.background = Color.Gainsboro;
   3.214 +                            enc_status_data.foreground = Color.Black;
   3.215 +                            enc_status_data.button_text = "Unencrypted";
   3.216 +                            break;
   3.217 +
   3.218 +                        case EncStatus.forged:
   3.219 +                            enc_status_data.explanation = "The encryption data is not matching. This probably is a forged message.";
   3.220 +                            enc_status_data.suggestion = "Do not trust this message! It probably is not from the communication partner indicated.";
   3.221 +                            enc_status_data.title = "p≡p – This communication is forged!";
   3.222 +                            enc_status_data.background = Color.Red;
   3.223 +                            enc_status_data.foreground = Color.White;
   3.224 +                            enc_status_data.button_text = "Forged";
   3.225 +                            break;
   3.226 +
   3.227 +                        case EncStatus.unknown:
   3.228 +                            enc_status_data.explanation = "There is not enough information to ensure if this communication is secure or not.";
   3.229 +                            enc_status_data.suggestion = "There is no credible encryption for this message, so you should be aware that there may be eavesdroppers and the message could be forged. It could be OK just as well.";
   3.230 +                            enc_status_data.title = "p≡p – This communication is unreliable.";
   3.231 +                            enc_status_data.background = Color.Gainsboro;
   3.232 +                            enc_status_data.foreground = Color.Black;
   3.233 +                            enc_status_data.button_text = "Unreliable";
   3.234 +                            break;
   3.235 +
   3.236 +                        case EncStatus.cannot_decrypt:
   3.237 +                            enc_status_data.explanation = "The key to decrypt this message is not available.";
   3.238 +                            enc_status_data.suggestion = "If this message was addressed to you, please inform the sender that you don't have the key.";
   3.239 +                            enc_status_data.title = "p≡p – Cannot decrypt message";
   3.240 +                            enc_status_data.background = Color.Gainsboro;
   3.241 +                            enc_status_data.foreground = Color.Black;
   3.242 +                            enc_status_data.button_text = "Cannot decrypt";
   3.243 +                            break;
   3.244 +                    }
   3.245 +
   3.246 +                    linkExplanation.Text = enc_status_data.title;
   3.247 +                    EncryptionStatus.BackColor = enc_status_data.background;
   3.248 +                    EncryptionStatus.ForeColor = enc_status_data.foreground;
   3.249 +                    EncryptionStatus.Text = enc_status_data.button_text;
   3.250 +                }
   3.251 +            }
   3.252 +        }
   3.253 +
   3.254 +        public static string quadruple(string text)
   3.255 +        {
   3.256 +            List<string> result = new List<string>();
   3.257 +            for (int i=0; i<text.Length; i+=4)
   3.258 +            {
   3.259 +                try
   3.260 +                {
   3.261 +                    result.Add(text.Substring(i, 4));
   3.262 +                }
   3.263 +                catch (ArgumentOutOfRangeException)
   3.264 +                {
   3.265 +                    result.Add(text.Substring(i));
   3.266 +                    break;
   3.267 +                }
   3.268 +            }
   3.269 +            return String.Join(" ", result);
   3.270 +        }
   3.271 +
   3.272 +        private void EncryptionStatus_Click(object sender, EventArgs e)
   3.273 +        {
   3.274 +            switch (enc_status)
   3.275 +            {
   3.276 +                case EncStatus.secure:
   3.277 +                    try
   3.278 +                    {
   3.279 +                        string[] key_list = mailItem.keylist;
   3.280 +                        string msg;
   3.281 +                        if (key_list.Length > 1)
   3.282 +                            msg = String.Format("This message is encrypted and signed with keys {0}.", String.Join(", ", key_list));
   3.283 +                        else
   3.284 +                            msg = String.Format("This message is encrypted and signed with key {0}.", key_list[0]);
   3.285 +                        MessageBox.Show(msg, "p≡p – Key information", MessageBoxButtons.OK, MessageBoxIcon.Information);
   3.286 +                    }
   3.287 +                    catch (Exception ex)
   3.288 +                    {
   3.289 +                        StopHere(ex.ToString());
   3.290 +                    }
   3.291 +                    break;
   3.292 +                case EncStatus.could_be:
   3.293 +                    try
   3.294 +                    {
   3.295 +                        Handshake handshakeDialog = new Handshake();
   3.296 +
   3.297 +                        Label lblPartner = (Label)handshakeDialog.Controls.Find("lblPartner", true).First();
   3.298 +                        TextBox txtPartnersSafewordsShort = (TextBox)handshakeDialog.Controls.Find("txtPartnersSafewordsShort", true).First();
   3.299 +                        TextBox txtPartnersSafewordsFull = (TextBox)handshakeDialog.Controls.Find("txtPartnersSafewordsFull", true).First();
   3.300 +                        TextBox txtPartnersFpr = (TextBox)handshakeDialog.Controls.Find("txtPartnersFpr", true).First();
   3.301 +
   3.302 +                        string addressPartner;
   3.303 +                        if (mailItem.incoming)
   3.304 +                            addressPartner = mailItem.from;
   3.305 +                        else // outgoing
   3.306 +                            addressPartner = mailItem.addresses.First(); // BUG: this is not true for all cases
   3.307 +
   3.308 +                        pEp_identity_s identityPartner;
   3.309 +                        try
   3.310 +                        {
   3.311 +                            identityPartner = ThisAddIn.pEp.get_identity(addressPartner);
   3.312 +                        }
   3.313 +                        catch
   3.314 +                        {
   3.315 +                            enc_status = EncStatus.unknown;
   3.316 +                            return;
   3.317 +                        }
   3.318 +
   3.319 +                        lblPartner.Text = addressPartner + ":";
   3.320 +                        txtPartnersSafewordsShort.Text = ThisAddIn.pEp.safewords(identityPartner.fpr, max_words: 5).ToLower();
   3.321 +                        txtPartnersSafewordsFull.Text = ThisAddIn.pEp.safewords(identityPartner.fpr).ToLower();
   3.322 +                        txtPartnersFpr.Text = quadruple(identityPartner.fpr);
   3.323 +
   3.324 +                        Label lblOwn = (Label)handshakeDialog.Controls.Find("lblOwn", true).First();
   3.325 +                        TextBox txtOwnSafewordsShort = (TextBox)handshakeDialog.Controls.Find("txtOwnSafewordsShort", true).First();
   3.326 +                        TextBox txtOwnSafewordsFull = (TextBox)handshakeDialog.Controls.Find("txtOwnSafewordsFull", true).First();
   3.327 +                        TextBox txtOwnFpr = (TextBox)handshakeDialog.Controls.Find("txtOwnFpr", true).First();
   3.328 +
   3.329 +                        pEp_identity_s me;
   3.330 +
   3.331 +                        // BUG: this does not work for all cases
   3.332 +
   3.333 +                        me = ThisAddIn.addIn.mySelf();
   3.334 +
   3.335 +                        lblOwn.Text = me.address + ":";
   3.336 +                        txtOwnSafewordsShort.Text = ThisAddIn.pEp.safewords(me.fpr, max_words: 5).ToLower();
   3.337 +                        txtOwnSafewordsFull.Text = ThisAddIn.pEp.safewords(me.fpr).ToLower();
   3.338 +                        txtOwnFpr.Text = quadruple(me.fpr);
   3.339 +
   3.340 +                        DialogResult result = handshakeDialog.ShowDialog(this);
   3.341 +                        switch (result)
   3.342 +                        {
   3.343 +                            case DialogResult.Yes:
   3.344 +                                if ((int)identityPartner.comm_type < 0x80)
   3.345 +                                    identityPartner.comm_type = (_pEp_comm_type)((int)identityPartner.comm_type + 0x80);
   3.346 +                                ThisAddIn.pEp.set_identity(identityPartner);
   3.347 +                                enc_status = EncStatus.secure;
   3.348 +                                break;
   3.349 +                            case DialogResult.No:
   3.350 +                                identityPartner.comm_type = _pEp_comm_type.pEp_ct_COMPROMIZED;
   3.351 +                                ThisAddIn.pEp.set_identity(identityPartner);
   3.352 +                                enc_status = EncStatus.forged;
   3.353 +                                break;
   3.354 +                        }
   3.355 +                    }
   3.356 +                    catch (COMException ex)
   3.357 +                    {
   3.358 +                        StopHere(ex.ToString());
   3.359 +                    }
   3.360 +                    catch (Exception ex)
   3.361 +                    {
   3.362 +                        StopHere(ex.ToString());
   3.363 +                    }
   3.364 +                    break;
   3.365 +            }
   3.366 +        }
   3.367 +
   3.368 +        private void linkExplanation_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
   3.369 +        {
   3.370 +            var result = MessageBox.Show(
   3.371 +                            enc_status_data.explanation + "\n\n" + enc_status_data.suggestion,
   3.372 +                            enc_status_data.title,
   3.373 +                            MessageBoxButtons.OK,
   3.374 +                            enc_status == EncStatus.forged
   3.375 +                                ? MessageBoxIcon.Stop
   3.376 +                                : MessageBoxIcon.Information
   3.377 +                        );
   3.378 +        }
   3.379 +    }
   3.380 +}
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/EncryptionStatusPanel.resx	Wed Jun 25 18:35:57 2014 +0200
     4.3 @@ -0,0 +1,120 @@
     4.4 +<?xml version="1.0" encoding="utf-8"?>
     4.5 +<root>
     4.6 +  <!-- 
     4.7 +    Microsoft ResX Schema 
     4.8 +    
     4.9 +    Version 2.0
    4.10 +    
    4.11 +    The primary goals of this format is to allow a simple XML format 
    4.12 +    that is mostly human readable. The generation and parsing of the 
    4.13 +    various data types are done through the TypeConverter classes 
    4.14 +    associated with the data types.
    4.15 +    
    4.16 +    Example:
    4.17 +    
    4.18 +    ... ado.net/XML headers & schema ...
    4.19 +    <resheader name="resmimetype">text/microsoft-resx</resheader>
    4.20 +    <resheader name="version">2.0</resheader>
    4.21 +    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    4.22 +    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    4.23 +    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    4.24 +    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    4.25 +    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
    4.26 +        <value>[base64 mime encoded serialized .NET Framework object]</value>
    4.27 +    </data>
    4.28 +    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    4.29 +        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
    4.30 +        <comment>This is a comment</comment>
    4.31 +    </data>
    4.32 +                
    4.33 +    There are any number of "resheader" rows that contain simple 
    4.34 +    name/value pairs.
    4.35 +    
    4.36 +    Each data row contains a name, and value. The row also contains a 
    4.37 +    type or mimetype. Type corresponds to a .NET class that support 
    4.38 +    text/value conversion through the TypeConverter architecture. 
    4.39 +    Classes that don't support this are serialized and stored with the 
    4.40 +    mimetype set.
    4.41 +    
    4.42 +    The mimetype is used for serialized objects, and tells the 
    4.43 +    ResXResourceReader how to depersist the object. This is currently not 
    4.44 +    extensible. For a given mimetype the value must be set accordingly:
    4.45 +    
    4.46 +    Note - application/x-microsoft.net.object.binary.base64 is the format 
    4.47 +    that the ResXResourceWriter will generate, however the reader can 
    4.48 +    read any of the formats listed below.
    4.49 +    
    4.50 +    mimetype: application/x-microsoft.net.object.binary.base64
    4.51 +    value   : The object must be serialized with 
    4.52 +            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
    4.53 +            : and then encoded with base64 encoding.
    4.54 +    
    4.55 +    mimetype: application/x-microsoft.net.object.soap.base64
    4.56 +    value   : The object must be serialized with 
    4.57 +            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
    4.58 +            : and then encoded with base64 encoding.
    4.59 +
    4.60 +    mimetype: application/x-microsoft.net.object.bytearray.base64
    4.61 +    value   : The object must be serialized into a byte array 
    4.62 +            : using a System.ComponentModel.TypeConverter
    4.63 +            : and then encoded with base64 encoding.
    4.64 +    -->
    4.65 +  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    4.66 +    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    4.67 +    <xsd:element name="root" msdata:IsDataSet="true">
    4.68 +      <xsd:complexType>
    4.69 +        <xsd:choice maxOccurs="unbounded">
    4.70 +          <xsd:element name="metadata">
    4.71 +            <xsd:complexType>
    4.72 +              <xsd:sequence>
    4.73 +                <xsd:element name="value" type="xsd:string" minOccurs="0" />
    4.74 +              </xsd:sequence>
    4.75 +              <xsd:attribute name="name" use="required" type="xsd:string" />
    4.76 +              <xsd:attribute name="type" type="xsd:string" />
    4.77 +              <xsd:attribute name="mimetype" type="xsd:string" />
    4.78 +              <xsd:attribute ref="xml:space" />
    4.79 +            </xsd:complexType>
    4.80 +          </xsd:element>
    4.81 +          <xsd:element name="assembly">
    4.82 +            <xsd:complexType>
    4.83 +              <xsd:attribute name="alias" type="xsd:string" />
    4.84 +              <xsd:attribute name="name" type="xsd:string" />
    4.85 +            </xsd:complexType>
    4.86 +          </xsd:element>
    4.87 +          <xsd:element name="data">
    4.88 +            <xsd:complexType>
    4.89 +              <xsd:sequence>
    4.90 +                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
    4.91 +                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
    4.92 +              </xsd:sequence>
    4.93 +              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
    4.94 +              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
    4.95 +              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
    4.96 +              <xsd:attribute ref="xml:space" />
    4.97 +            </xsd:complexType>
    4.98 +          </xsd:element>
    4.99 +          <xsd:element name="resheader">
   4.100 +            <xsd:complexType>
   4.101 +              <xsd:sequence>
   4.102 +                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
   4.103 +              </xsd:sequence>
   4.104 +              <xsd:attribute name="name" type="xsd:string" use="required" />
   4.105 +            </xsd:complexType>
   4.106 +          </xsd:element>
   4.107 +        </xsd:choice>
   4.108 +      </xsd:complexType>
   4.109 +    </xsd:element>
   4.110 +  </xsd:schema>
   4.111 +  <resheader name="resmimetype">
   4.112 +    <value>text/microsoft-resx</value>
   4.113 +  </resheader>
   4.114 +  <resheader name="version">
   4.115 +    <value>2.0</value>
   4.116 +  </resheader>
   4.117 +  <resheader name="reader">
   4.118 +    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   4.119 +  </resheader>
   4.120 +  <resheader name="writer">
   4.121 +    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   4.122 +  </resheader>
   4.123 +</root>
   4.124 \ No newline at end of file
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/Handshake.Designer.cs	Wed Jun 25 18:35:57 2014 +0200
     5.3 @@ -0,0 +1,295 @@
     5.4 +namespace pEp
     5.5 +{
     5.6 +    partial class Handshake
     5.7 +    {
     5.8 +        /// <summary>
     5.9 +        /// Required designer variable.
    5.10 +        /// </summary>
    5.11 +        private System.ComponentModel.IContainer components = null;
    5.12 +
    5.13 +        /// <summary>
    5.14 +        /// Clean up any resources being used.
    5.15 +        /// </summary>
    5.16 +        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    5.17 +        protected override void Dispose(bool disposing)
    5.18 +        {
    5.19 +            if (disposing && (components != null))
    5.20 +            {
    5.21 +                components.Dispose();
    5.22 +            }
    5.23 +            base.Dispose(disposing);
    5.24 +        }
    5.25 +
    5.26 +        #region Windows Form Designer generated code
    5.27 +
    5.28 +        /// <summary>
    5.29 +        /// Required method for Designer support - do not modify
    5.30 +        /// the contents of this method with the code editor.
    5.31 +        /// </summary>
    5.32 +        private void InitializeComponent()
    5.33 +        {
    5.34 +            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Handshake));
    5.35 +            this.tabControl = new System.Windows.Forms.TabControl();
    5.36 +            this.tabSafewords = new System.Windows.Forms.TabPage();
    5.37 +            this.label2 = new System.Windows.Forms.Label();
    5.38 +            this.label1 = new System.Windows.Forms.Label();
    5.39 +            this.panel1 = new System.Windows.Forms.Panel();
    5.40 +            this.btnWrong = new System.Windows.Forms.Button();
    5.41 +            this.btnCancel = new System.Windows.Forms.Button();
    5.42 +            this.btnConfirm = new System.Windows.Forms.Button();
    5.43 +            this.tabVariant = new System.Windows.Forms.TabControl();
    5.44 +            this.tabShort = new System.Windows.Forms.TabPage();
    5.45 +            this.lblQuestion1 = new System.Windows.Forms.Label();
    5.46 +            this.txtPartnersSafewordsShort = new System.Windows.Forms.TextBox();
    5.47 +            this.txtOwnSafewordsShort = new System.Windows.Forms.TextBox();
    5.48 +            this.Full = new System.Windows.Forms.TabPage();
    5.49 +            this.lblQuestion2 = new System.Windows.Forms.Label();
    5.50 +            this.txtPartnersSafewordsFull = new System.Windows.Forms.TextBox();
    5.51 +            this.txtOwnSafewordsFull = new System.Windows.Forms.TextBox();
    5.52 +            this.tabFpr = new System.Windows.Forms.TabPage();
    5.53 +            this.lblQuestion3 = new System.Windows.Forms.Label();
    5.54 +            this.txtPartnersFpr = new System.Windows.Forms.TextBox();
    5.55 +            this.txtOwnFpr = new System.Windows.Forms.TextBox();
    5.56 +            this.lblPartner = new System.Windows.Forms.Label();
    5.57 +            this.lblOwn = new System.Windows.Forms.Label();
    5.58 +            this.lblExplanation = new System.Windows.Forms.Label();
    5.59 +            this.tabControl.SuspendLayout();
    5.60 +            this.tabSafewords.SuspendLayout();
    5.61 +            this.panel1.SuspendLayout();
    5.62 +            this.tabVariant.SuspendLayout();
    5.63 +            this.tabShort.SuspendLayout();
    5.64 +            this.Full.SuspendLayout();
    5.65 +            this.tabFpr.SuspendLayout();
    5.66 +            this.SuspendLayout();
    5.67 +            // 
    5.68 +            // tabControl
    5.69 +            // 
    5.70 +            this.tabControl.Controls.Add(this.tabSafewords);
    5.71 +            resources.ApplyResources(this.tabControl, "tabControl");
    5.72 +            this.tabControl.Name = "tabControl";
    5.73 +            this.tabControl.SelectedIndex = 0;
    5.74 +            // 
    5.75 +            // tabSafewords
    5.76 +            // 
    5.77 +            this.tabSafewords.Controls.Add(this.label2);
    5.78 +            this.tabSafewords.Controls.Add(this.label1);
    5.79 +            this.tabSafewords.Controls.Add(this.panel1);
    5.80 +            this.tabSafewords.Controls.Add(this.tabVariant);
    5.81 +            this.tabSafewords.Controls.Add(this.lblPartner);
    5.82 +            this.tabSafewords.Controls.Add(this.lblOwn);
    5.83 +            this.tabSafewords.Controls.Add(this.lblExplanation);
    5.84 +            resources.ApplyResources(this.tabSafewords, "tabSafewords");
    5.85 +            this.tabSafewords.Name = "tabSafewords";
    5.86 +            this.tabSafewords.UseVisualStyleBackColor = true;
    5.87 +            // 
    5.88 +            // label2
    5.89 +            // 
    5.90 +            resources.ApplyResources(this.label2, "label2");
    5.91 +            this.label2.Name = "label2";
    5.92 +            // 
    5.93 +            // label1
    5.94 +            // 
    5.95 +            resources.ApplyResources(this.label1, "label1");
    5.96 +            this.label1.Name = "label1";
    5.97 +            // 
    5.98 +            // panel1
    5.99 +            // 
   5.100 +            this.panel1.Controls.Add(this.btnWrong);
   5.101 +            this.panel1.Controls.Add(this.btnCancel);
   5.102 +            this.panel1.Controls.Add(this.btnConfirm);
   5.103 +            resources.ApplyResources(this.panel1, "panel1");
   5.104 +            this.panel1.Name = "panel1";
   5.105 +            // 
   5.106 +            // btnWrong
   5.107 +            // 
   5.108 +            this.btnWrong.BackColor = System.Drawing.Color.Red;
   5.109 +            this.btnWrong.DialogResult = System.Windows.Forms.DialogResult.No;
   5.110 +            this.btnWrong.ForeColor = System.Drawing.Color.White;
   5.111 +            resources.ApplyResources(this.btnWrong, "btnWrong");
   5.112 +            this.btnWrong.Name = "btnWrong";
   5.113 +            this.btnWrong.UseVisualStyleBackColor = false;
   5.114 +            // 
   5.115 +            // btnCancel
   5.116 +            // 
   5.117 +            this.btnCancel.CausesValidation = false;
   5.118 +            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
   5.119 +            resources.ApplyResources(this.btnCancel, "btnCancel");
   5.120 +            this.btnCancel.Name = "btnCancel";
   5.121 +            this.btnCancel.UseVisualStyleBackColor = true;
   5.122 +            // 
   5.123 +            // btnConfirm
   5.124 +            // 
   5.125 +            this.btnConfirm.BackColor = System.Drawing.Color.Green;
   5.126 +            this.btnConfirm.DialogResult = System.Windows.Forms.DialogResult.Yes;
   5.127 +            this.btnConfirm.ForeColor = System.Drawing.Color.White;
   5.128 +            resources.ApplyResources(this.btnConfirm, "btnConfirm");
   5.129 +            this.btnConfirm.Name = "btnConfirm";
   5.130 +            this.btnConfirm.UseVisualStyleBackColor = false;
   5.131 +            // 
   5.132 +            // tabVariant
   5.133 +            // 
   5.134 +            this.tabVariant.Controls.Add(this.tabShort);
   5.135 +            this.tabVariant.Controls.Add(this.Full);
   5.136 +            this.tabVariant.Controls.Add(this.tabFpr);
   5.137 +            resources.ApplyResources(this.tabVariant, "tabVariant");
   5.138 +            this.tabVariant.Name = "tabVariant";
   5.139 +            this.tabVariant.SelectedIndex = 0;
   5.140 +            // 
   5.141 +            // tabShort
   5.142 +            // 
   5.143 +            this.tabShort.Controls.Add(this.lblQuestion1);
   5.144 +            this.tabShort.Controls.Add(this.txtPartnersSafewordsShort);
   5.145 +            this.tabShort.Controls.Add(this.txtOwnSafewordsShort);
   5.146 +            resources.ApplyResources(this.tabShort, "tabShort");
   5.147 +            this.tabShort.Name = "tabShort";
   5.148 +            this.tabShort.UseVisualStyleBackColor = true;
   5.149 +            // 
   5.150 +            // lblQuestion1
   5.151 +            // 
   5.152 +            resources.ApplyResources(this.lblQuestion1, "lblQuestion1");
   5.153 +            this.lblQuestion1.Name = "lblQuestion1";
   5.154 +            // 
   5.155 +            // txtPartnersSafewordsShort
   5.156 +            // 
   5.157 +            this.txtPartnersSafewordsShort.BackColor = System.Drawing.Color.Gold;
   5.158 +            this.txtPartnersSafewordsShort.BorderStyle = System.Windows.Forms.BorderStyle.None;
   5.159 +            resources.ApplyResources(this.txtPartnersSafewordsShort, "txtPartnersSafewordsShort");
   5.160 +            this.txtPartnersSafewordsShort.Name = "txtPartnersSafewordsShort";
   5.161 +            this.txtPartnersSafewordsShort.ReadOnly = true;
   5.162 +            // 
   5.163 +            // txtOwnSafewordsShort
   5.164 +            // 
   5.165 +            this.txtOwnSafewordsShort.BackColor = System.Drawing.SystemColors.Control;
   5.166 +            this.txtOwnSafewordsShort.BorderStyle = System.Windows.Forms.BorderStyle.None;
   5.167 +            resources.ApplyResources(this.txtOwnSafewordsShort, "txtOwnSafewordsShort");
   5.168 +            this.txtOwnSafewordsShort.Name = "txtOwnSafewordsShort";
   5.169 +            this.txtOwnSafewordsShort.ReadOnly = true;
   5.170 +            // 
   5.171 +            // Full
   5.172 +            // 
   5.173 +            this.Full.Controls.Add(this.lblQuestion2);
   5.174 +            this.Full.Controls.Add(this.txtPartnersSafewordsFull);
   5.175 +            this.Full.Controls.Add(this.txtOwnSafewordsFull);
   5.176 +            resources.ApplyResources(this.Full, "Full");
   5.177 +            this.Full.Name = "Full";
   5.178 +            this.Full.UseVisualStyleBackColor = true;
   5.179 +            // 
   5.180 +            // lblQuestion2
   5.181 +            // 
   5.182 +            resources.ApplyResources(this.lblQuestion2, "lblQuestion2");
   5.183 +            this.lblQuestion2.Name = "lblQuestion2";
   5.184 +            // 
   5.185 +            // txtPartnersSafewordsFull
   5.186 +            // 
   5.187 +            this.txtPartnersSafewordsFull.BackColor = System.Drawing.Color.Gold;
   5.188 +            this.txtPartnersSafewordsFull.BorderStyle = System.Windows.Forms.BorderStyle.None;
   5.189 +            resources.ApplyResources(this.txtPartnersSafewordsFull, "txtPartnersSafewordsFull");
   5.190 +            this.txtPartnersSafewordsFull.Name = "txtPartnersSafewordsFull";
   5.191 +            this.txtPartnersSafewordsFull.ReadOnly = true;
   5.192 +            // 
   5.193 +            // txtOwnSafewordsFull
   5.194 +            // 
   5.195 +            this.txtOwnSafewordsFull.BackColor = System.Drawing.SystemColors.Control;
   5.196 +            this.txtOwnSafewordsFull.BorderStyle = System.Windows.Forms.BorderStyle.None;
   5.197 +            resources.ApplyResources(this.txtOwnSafewordsFull, "txtOwnSafewordsFull");
   5.198 +            this.txtOwnSafewordsFull.Name = "txtOwnSafewordsFull";
   5.199 +            this.txtOwnSafewordsFull.ReadOnly = true;
   5.200 +            // 
   5.201 +            // tabFpr
   5.202 +            // 
   5.203 +            this.tabFpr.Controls.Add(this.lblQuestion3);
   5.204 +            this.tabFpr.Controls.Add(this.txtPartnersFpr);
   5.205 +            this.tabFpr.Controls.Add(this.txtOwnFpr);
   5.206 +            resources.ApplyResources(this.tabFpr, "tabFpr");
   5.207 +            this.tabFpr.Name = "tabFpr";
   5.208 +            this.tabFpr.UseVisualStyleBackColor = true;
   5.209 +            // 
   5.210 +            // lblQuestion3
   5.211 +            // 
   5.212 +            resources.ApplyResources(this.lblQuestion3, "lblQuestion3");
   5.213 +            this.lblQuestion3.Name = "lblQuestion3";
   5.214 +            // 
   5.215 +            // txtPartnersFpr
   5.216 +            // 
   5.217 +            this.txtPartnersFpr.BackColor = System.Drawing.Color.Gold;
   5.218 +            this.txtPartnersFpr.BorderStyle = System.Windows.Forms.BorderStyle.None;
   5.219 +            resources.ApplyResources(this.txtPartnersFpr, "txtPartnersFpr");
   5.220 +            this.txtPartnersFpr.Name = "txtPartnersFpr";
   5.221 +            this.txtPartnersFpr.ReadOnly = true;
   5.222 +            // 
   5.223 +            // txtOwnFpr
   5.224 +            // 
   5.225 +            this.txtOwnFpr.BackColor = System.Drawing.SystemColors.Control;
   5.226 +            this.txtOwnFpr.BorderStyle = System.Windows.Forms.BorderStyle.None;
   5.227 +            resources.ApplyResources(this.txtOwnFpr, "txtOwnFpr");
   5.228 +            this.txtOwnFpr.Name = "txtOwnFpr";
   5.229 +            this.txtOwnFpr.ReadOnly = true;
   5.230 +            // 
   5.231 +            // lblPartner
   5.232 +            // 
   5.233 +            resources.ApplyResources(this.lblPartner, "lblPartner");
   5.234 +            this.lblPartner.Name = "lblPartner";
   5.235 +            // 
   5.236 +            // lblOwn
   5.237 +            // 
   5.238 +            resources.ApplyResources(this.lblOwn, "lblOwn");
   5.239 +            this.lblOwn.Name = "lblOwn";
   5.240 +            // 
   5.241 +            // lblExplanation
   5.242 +            // 
   5.243 +            resources.ApplyResources(this.lblExplanation, "lblExplanation");
   5.244 +            this.lblExplanation.Name = "lblExplanation";
   5.245 +            // 
   5.246 +            // Handshake
   5.247 +            // 
   5.248 +            resources.ApplyResources(this, "$this");
   5.249 +            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
   5.250 +            this.Controls.Add(this.tabControl);
   5.251 +            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
   5.252 +            this.MaximizeBox = false;
   5.253 +            this.MinimizeBox = false;
   5.254 +            this.Name = "Handshake";
   5.255 +            this.tabControl.ResumeLayout(false);
   5.256 +            this.tabSafewords.ResumeLayout(false);
   5.257 +            this.tabSafewords.PerformLayout();
   5.258 +            this.panel1.ResumeLayout(false);
   5.259 +            this.tabVariant.ResumeLayout(false);
   5.260 +            this.tabShort.ResumeLayout(false);
   5.261 +            this.tabShort.PerformLayout();
   5.262 +            this.Full.ResumeLayout(false);
   5.263 +            this.Full.PerformLayout();
   5.264 +            this.tabFpr.ResumeLayout(false);
   5.265 +            this.tabFpr.PerformLayout();
   5.266 +            this.ResumeLayout(false);
   5.267 +
   5.268 +        }
   5.269 +
   5.270 +        #endregion
   5.271 +
   5.272 +        private System.Windows.Forms.TabControl tabControl;
   5.273 +        private System.Windows.Forms.TabPage tabSafewords;
   5.274 +        private System.Windows.Forms.Label lblOwn;
   5.275 +        private System.Windows.Forms.Label lblExplanation;
   5.276 +        private System.Windows.Forms.Label lblPartner;
   5.277 +        private System.Windows.Forms.TabControl tabVariant;
   5.278 +        private System.Windows.Forms.TabPage tabShort;
   5.279 +        private System.Windows.Forms.TextBox txtPartnersSafewordsShort;
   5.280 +        private System.Windows.Forms.TextBox txtOwnSafewordsShort;
   5.281 +        private System.Windows.Forms.TabPage Full;
   5.282 +        private System.Windows.Forms.TabPage tabFpr;
   5.283 +        private System.Windows.Forms.TextBox txtPartnersSafewordsFull;
   5.284 +        private System.Windows.Forms.TextBox txtOwnSafewordsFull;
   5.285 +        private System.Windows.Forms.TextBox txtPartnersFpr;
   5.286 +        private System.Windows.Forms.TextBox txtOwnFpr;
   5.287 +        private System.Windows.Forms.Label lblQuestion1;
   5.288 +        private System.Windows.Forms.Label lblQuestion2;
   5.289 +        private System.Windows.Forms.Label lblQuestion3;
   5.290 +        private System.Windows.Forms.Panel panel1;
   5.291 +        private System.Windows.Forms.Button btnWrong;
   5.292 +        private System.Windows.Forms.Button btnCancel;
   5.293 +        private System.Windows.Forms.Button btnConfirm;
   5.294 +        private System.Windows.Forms.Label label1;
   5.295 +        private System.Windows.Forms.Label label2;
   5.296 +
   5.297 +    }
   5.298 +}
   5.299 \ No newline at end of file
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/Handshake.cs	Wed Jun 25 18:35:57 2014 +0200
     6.3 @@ -0,0 +1,20 @@
     6.4 +using System;
     6.5 +using System.Collections.Generic;
     6.6 +using System.ComponentModel;
     6.7 +using System.Data;
     6.8 +using System.Drawing;
     6.9 +using System.Linq;
    6.10 +using System.Text;
    6.11 +using System.Windows.Forms;
    6.12 +
    6.13 +namespace pEp
    6.14 +{
    6.15 +    public partial class Handshake : Form
    6.16 +    {
    6.17 +        public Handshake()
    6.18 +        {
    6.19 +            InitializeComponent();
    6.20 +        }
    6.21 +
    6.22 +    }
    6.23 +}
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/Handshake.resx	Wed Jun 25 18:35:57 2014 +0200
     7.3 @@ -0,0 +1,824 @@
     7.4 +<?xml version="1.0" encoding="utf-8"?>
     7.5 +<root>
     7.6 +  <!-- 
     7.7 +    Microsoft ResX Schema 
     7.8 +    
     7.9 +    Version 2.0
    7.10 +    
    7.11 +    The primary goals of this format is to allow a simple XML format 
    7.12 +    that is mostly human readable. The generation and parsing of the 
    7.13 +    various data types are done through the TypeConverter classes 
    7.14 +    associated with the data types.
    7.15 +    
    7.16 +    Example:
    7.17 +    
    7.18 +    ... ado.net/XML headers & schema ...
    7.19 +    <resheader name="resmimetype">text/microsoft-resx</resheader>
    7.20 +    <resheader name="version">2.0</resheader>
    7.21 +    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    7.22 +    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    7.23 +    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    7.24 +    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    7.25 +    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
    7.26 +        <value>[base64 mime encoded serialized .NET Framework object]</value>
    7.27 +    </data>
    7.28 +    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    7.29 +        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
    7.30 +        <comment>This is a comment</comment>
    7.31 +    </data>
    7.32 +                
    7.33 +    There are any number of "resheader" rows that contain simple 
    7.34 +    name/value pairs.
    7.35 +    
    7.36 +    Each data row contains a name, and value. The row also contains a 
    7.37 +    type or mimetype. Type corresponds to a .NET class that support 
    7.38 +    text/value conversion through the TypeConverter architecture. 
    7.39 +    Classes that don't support this are serialized and stored with the 
    7.40 +    mimetype set.
    7.41 +    
    7.42 +    The mimetype is used for serialized objects, and tells the 
    7.43 +    ResXResourceReader how to depersist the object. This is currently not 
    7.44 +    extensible. For a given mimetype the value must be set accordingly:
    7.45 +    
    7.46 +    Note - application/x-microsoft.net.object.binary.base64 is the format 
    7.47 +    that the ResXResourceWriter will generate, however the reader can 
    7.48 +    read any of the formats listed below.
    7.49 +    
    7.50 +    mimetype: application/x-microsoft.net.object.binary.base64
    7.51 +    value   : The object must be serialized with 
    7.52 +            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
    7.53 +            : and then encoded with base64 encoding.
    7.54 +    
    7.55 +    mimetype: application/x-microsoft.net.object.soap.base64
    7.56 +    value   : The object must be serialized with 
    7.57 +            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
    7.58 +            : and then encoded with base64 encoding.
    7.59 +
    7.60 +    mimetype: application/x-microsoft.net.object.bytearray.base64
    7.61 +    value   : The object must be serialized into a byte array 
    7.62 +            : using a System.ComponentModel.TypeConverter
    7.63 +            : and then encoded with base64 encoding.
    7.64 +    -->
    7.65 +  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    7.66 +    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    7.67 +    <xsd:element name="root" msdata:IsDataSet="true">
    7.68 +      <xsd:complexType>
    7.69 +        <xsd:choice maxOccurs="unbounded">
    7.70 +          <xsd:element name="metadata">
    7.71 +            <xsd:complexType>
    7.72 +              <xsd:sequence>
    7.73 +                <xsd:element name="value" type="xsd:string" minOccurs="0" />
    7.74 +              </xsd:sequence>
    7.75 +              <xsd:attribute name="name" use="required" type="xsd:string" />
    7.76 +              <xsd:attribute name="type" type="xsd:string" />
    7.77 +              <xsd:attribute name="mimetype" type="xsd:string" />
    7.78 +              <xsd:attribute ref="xml:space" />
    7.79 +            </xsd:complexType>
    7.80 +          </xsd:element>
    7.81 +          <xsd:element name="assembly">
    7.82 +            <xsd:complexType>
    7.83 +              <xsd:attribute name="alias" type="xsd:string" />
    7.84 +              <xsd:attribute name="name" type="xsd:string" />
    7.85 +            </xsd:complexType>
    7.86 +          </xsd:element>
    7.87 +          <xsd:element name="data">
    7.88 +            <xsd:complexType>
    7.89 +              <xsd:sequence>
    7.90 +                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
    7.91 +                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
    7.92 +              </xsd:sequence>
    7.93 +              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
    7.94 +              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
    7.95 +              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
    7.96 +              <xsd:attribute ref="xml:space" />
    7.97 +            </xsd:complexType>
    7.98 +          </xsd:element>
    7.99 +          <xsd:element name="resheader">
   7.100 +            <xsd:complexType>
   7.101 +              <xsd:sequence>
   7.102 +                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
   7.103 +              </xsd:sequence>
   7.104 +              <xsd:attribute name="name" type="xsd:string" use="required" />
   7.105 +            </xsd:complexType>
   7.106 +          </xsd:element>
   7.107 +        </xsd:choice>
   7.108 +      </xsd:complexType>
   7.109 +    </xsd:element>
   7.110 +  </xsd:schema>
   7.111 +  <resheader name="resmimetype">
   7.112 +    <value>text/microsoft-resx</value>
   7.113 +  </resheader>
   7.114 +  <resheader name="version">
   7.115 +    <value>2.0</value>
   7.116 +  </resheader>
   7.117 +  <resheader name="reader">
   7.118 +    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.119 +  </resheader>
   7.120 +  <resheader name="writer">
   7.121 +    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.122 +  </resheader>
   7.123 +  <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   7.124 +  <data name="label2.AutoSize" type="System.Boolean, mscorlib">
   7.125 +    <value>True</value>
   7.126 +  </data>
   7.127 +  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   7.128 +  <data name="label2.Font" type="System.Drawing.Font, System.Drawing">
   7.129 +    <value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
   7.130 +  </data>
   7.131 +  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   7.132 +  <data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
   7.133 +    <value>NoControl</value>
   7.134 +  </data>
   7.135 +  <data name="label2.Location" type="System.Drawing.Point, System.Drawing">
   7.136 +    <value>3, 181</value>
   7.137 +  </data>
   7.138 +  <data name="label2.Size" type="System.Drawing.Size, System.Drawing">
   7.139 +    <value>90, 13</value>
   7.140 +  </data>
   7.141 +  <data name="label2.TabIndex" type="System.Int32, mscorlib">
   7.142 +    <value>18</value>
   7.143 +  </data>
   7.144 +  <data name="label2.Text" xml:space="preserve">
   7.145 +    <value>Your partner's:</value>
   7.146 +  </data>
   7.147 +  <data name="&gt;&gt;label2.Name" xml:space="preserve">
   7.148 +    <value>label2</value>
   7.149 +  </data>
   7.150 +  <data name="&gt;&gt;label2.Type" xml:space="preserve">
   7.151 +    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.152 +  </data>
   7.153 +  <data name="&gt;&gt;label2.Parent" xml:space="preserve">
   7.154 +    <value>tabSafewords</value>
   7.155 +  </data>
   7.156 +  <data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
   7.157 +    <value>0</value>
   7.158 +  </data>
   7.159 +  <data name="label1.AutoSize" type="System.Boolean, mscorlib">
   7.160 +    <value>True</value>
   7.161 +  </data>
   7.162 +  <data name="label1.Font" type="System.Drawing.Font, System.Drawing">
   7.163 +    <value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
   7.164 +  </data>
   7.165 +  <data name="label1.Location" type="System.Drawing.Point, System.Drawing">
   7.166 +    <value>3, 108</value>
   7.167 +  </data>
   7.168 +  <data name="label1.Size" type="System.Drawing.Size, System.Drawing">
   7.169 +    <value>64, 13</value>
   7.170 +  </data>
   7.171 +  <data name="label1.TabIndex" type="System.Int32, mscorlib">
   7.172 +    <value>17</value>
   7.173 +  </data>
   7.174 +  <data name="label1.Text" xml:space="preserve">
   7.175 +    <value>Your own:</value>
   7.176 +  </data>
   7.177 +  <data name="&gt;&gt;label1.Name" xml:space="preserve">
   7.178 +    <value>label1</value>
   7.179 +  </data>
   7.180 +  <data name="&gt;&gt;label1.Type" xml:space="preserve">
   7.181 +    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.182 +  </data>
   7.183 +  <data name="&gt;&gt;label1.Parent" xml:space="preserve">
   7.184 +    <value>tabSafewords</value>
   7.185 +  </data>
   7.186 +  <data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
   7.187 +    <value>1</value>
   7.188 +  </data>
   7.189 +  <data name="btnWrong.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
   7.190 +    <value>NoControl</value>
   7.191 +  </data>
   7.192 +  <data name="btnWrong.Location" type="System.Drawing.Point, System.Drawing">
   7.193 +    <value>470, 36</value>
   7.194 +  </data>
   7.195 +  <data name="btnWrong.Size" type="System.Drawing.Size, System.Drawing">
   7.196 +    <value>108, 28</value>
   7.197 +  </data>
   7.198 +  <data name="btnWrong.TabIndex" type="System.Int32, mscorlib">
   7.199 +    <value>14</value>
   7.200 +  </data>
   7.201 +  <data name="btnWrong.Text" xml:space="preserve">
   7.202 +    <value>&amp;Wrong Safewords</value>
   7.203 +  </data>
   7.204 +  <data name="&gt;&gt;btnWrong.Name" xml:space="preserve">
   7.205 +    <value>btnWrong</value>
   7.206 +  </data>
   7.207 +  <data name="&gt;&gt;btnWrong.Type" xml:space="preserve">
   7.208 +    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.209 +  </data>
   7.210 +  <data name="&gt;&gt;btnWrong.Parent" xml:space="preserve">
   7.211 +    <value>panel1</value>
   7.212 +  </data>
   7.213 +  <data name="&gt;&gt;btnWrong.ZOrder" xml:space="preserve">
   7.214 +    <value>0</value>
   7.215 +  </data>
   7.216 +  <data name="btnCancel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
   7.217 +    <value>NoControl</value>
   7.218 +  </data>
   7.219 +  <data name="btnCancel.Location" type="System.Drawing.Point, System.Drawing">
   7.220 +    <value>356, 36</value>
   7.221 +  </data>
   7.222 +  <data name="btnCancel.Size" type="System.Drawing.Size, System.Drawing">
   7.223 +    <value>108, 28</value>
   7.224 +  </data>
   7.225 +  <data name="btnCancel.TabIndex" type="System.Int32, mscorlib">
   7.226 +    <value>13</value>
   7.227 +  </data>
   7.228 +  <data name="btnCancel.Text" xml:space="preserve">
   7.229 +    <value>Not &amp;Confirmed</value>
   7.230 +  </data>
   7.231 +  <data name="&gt;&gt;btnCancel.Name" xml:space="preserve">
   7.232 +    <value>btnCancel</value>
   7.233 +  </data>
   7.234 +  <data name="&gt;&gt;btnCancel.Type" xml:space="preserve">
   7.235 +    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.236 +  </data>
   7.237 +  <data name="&gt;&gt;btnCancel.Parent" xml:space="preserve">
   7.238 +    <value>panel1</value>
   7.239 +  </data>
   7.240 +  <data name="&gt;&gt;btnCancel.ZOrder" xml:space="preserve">
   7.241 +    <value>1</value>
   7.242 +  </data>
   7.243 +  <data name="btnConfirm.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
   7.244 +    <value>NoControl</value>
   7.245 +  </data>
   7.246 +  <data name="btnConfirm.Location" type="System.Drawing.Point, System.Drawing">
   7.247 +    <value>242, 36</value>
   7.248 +  </data>
   7.249 +  <data name="btnConfirm.Size" type="System.Drawing.Size, System.Drawing">
   7.250 +    <value>108, 28</value>
   7.251 +  </data>
   7.252 +  <data name="btnConfirm.TabIndex" type="System.Int32, mscorlib">
   7.253 +    <value>12</value>
   7.254 +  </data>
   7.255 +  <data name="btnConfirm.Text" xml:space="preserve">
   7.256 +    <value>&amp;Yes – confirm</value>
   7.257 +  </data>
   7.258 +  <data name="&gt;&gt;btnConfirm.Name" xml:space="preserve">
   7.259 +    <value>btnConfirm</value>
   7.260 +  </data>
   7.261 +  <data name="&gt;&gt;btnConfirm.Type" xml:space="preserve">
   7.262 +    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.263 +  </data>
   7.264 +  <data name="&gt;&gt;btnConfirm.Parent" xml:space="preserve">
   7.265 +    <value>panel1</value>
   7.266 +  </data>
   7.267 +  <data name="&gt;&gt;btnConfirm.ZOrder" xml:space="preserve">
   7.268 +    <value>2</value>
   7.269 +  </data>
   7.270 +  <data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
   7.271 +    <value>Bottom</value>
   7.272 +  </data>
   7.273 +  <data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
   7.274 +    <value>3, 284</value>
   7.275 +  </data>
   7.276 +  <data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
   7.277 +    <value>588, 69</value>
   7.278 +  </data>
   7.279 +  <data name="panel1.TabIndex" type="System.Int32, mscorlib">
   7.280 +    <value>16</value>
   7.281 +  </data>
   7.282 +  <data name="&gt;&gt;panel1.Name" xml:space="preserve">
   7.283 +    <value>panel1</value>
   7.284 +  </data>
   7.285 +  <data name="&gt;&gt;panel1.Type" xml:space="preserve">
   7.286 +    <value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.287 +  </data>
   7.288 +  <data name="&gt;&gt;panel1.Parent" xml:space="preserve">
   7.289 +    <value>tabSafewords</value>
   7.290 +  </data>
   7.291 +  <data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
   7.292 +    <value>2</value>
   7.293 +  </data>
   7.294 +  <data name="lblQuestion1.AutoSize" type="System.Boolean, mscorlib">
   7.295 +    <value>True</value>
   7.296 +  </data>
   7.297 +  <data name="lblQuestion1.Font" type="System.Drawing.Font, System.Drawing">
   7.298 +    <value>Microsoft Sans Serif, 9pt, style=Bold</value>
   7.299 +  </data>
   7.300 +  <data name="lblQuestion1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
   7.301 +    <value>NoControl</value>
   7.302 +  </data>
   7.303 +  <data name="lblQuestion1.Location" type="System.Drawing.Point, System.Drawing">
   7.304 +    <value>6, 139</value>
   7.305 +  </data>
   7.306 +  <data name="lblQuestion1.Size" type="System.Drawing.Size, System.Drawing">
   7.307 +    <value>245, 15</value>
   7.308 +  </data>
   7.309 +  <data name="lblQuestion1.TabIndex" type="System.Int32, mscorlib">
   7.310 +    <value>18</value>
   7.311 +  </data>
   7.312 +  <data name="lblQuestion1.Text" xml:space="preserve">
   7.313 +    <value>Are your partner's safewords correct?</value>
   7.314 +  </data>
   7.315 +  <data name="&gt;&gt;lblQuestion1.Name" xml:space="preserve">
   7.316 +    <value>lblQuestion1</value>
   7.317 +  </data>
   7.318 +  <data name="&gt;&gt;lblQuestion1.Type" xml:space="preserve">
   7.319 +    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.320 +  </data>
   7.321 +  <data name="&gt;&gt;lblQuestion1.Parent" xml:space="preserve">
   7.322 +    <value>tabShort</value>
   7.323 +  </data>
   7.324 +  <data name="&gt;&gt;lblQuestion1.ZOrder" xml:space="preserve">
   7.325 +    <value>0</value>
   7.326 +  </data>
   7.327 +  <data name="txtPartnersSafewordsShort.Font" type="System.Drawing.Font, System.Drawing">
   7.328 +    <value>Microsoft Sans Serif, 12pt</value>
   7.329 +  </data>
   7.330 +  <data name="txtPartnersSafewordsShort.Location" type="System.Drawing.Point, System.Drawing">
   7.331 +    <value>6, 74</value>
   7.332 +  </data>
   7.333 +  <data name="txtPartnersSafewordsShort.Multiline" type="System.Boolean, mscorlib">
   7.334 +    <value>True</value>
   7.335 +  </data>
   7.336 +  <data name="txtPartnersSafewordsShort.Size" type="System.Drawing.Size, System.Drawing">
   7.337 +    <value>399, 62</value>
   7.338 +  </data>
   7.339 +  <data name="txtPartnersSafewordsShort.TabIndex" type="System.Int32, mscorlib">
   7.340 +    <value>17</value>
   7.341 +  </data>
   7.342 +  <data name="txtPartnersSafewordsShort.Text" xml:space="preserve">
   7.343 +    <value>correct horse battery staple</value>
   7.344 +  </data>
   7.345 +  <data name="&gt;&gt;txtPartnersSafewordsShort.Name" xml:space="preserve">
   7.346 +    <value>txtPartnersSafewordsShort</value>
   7.347 +  </data>
   7.348 +  <data name="&gt;&gt;txtPartnersSafewordsShort.Type" xml:space="preserve">
   7.349 +    <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.350 +  </data>
   7.351 +  <data name="&gt;&gt;txtPartnersSafewordsShort.Parent" xml:space="preserve">
   7.352 +    <value>tabShort</value>
   7.353 +  </data>
   7.354 +  <data name="&gt;&gt;txtPartnersSafewordsShort.ZOrder" xml:space="preserve">
   7.355 +    <value>1</value>
   7.356 +  </data>
   7.357 +  <data name="txtOwnSafewordsShort.Font" type="System.Drawing.Font, System.Drawing">
   7.358 +    <value>Microsoft Sans Serif, 12pt</value>
   7.359 +  </data>
   7.360 +  <data name="txtOwnSafewordsShort.Location" type="System.Drawing.Point, System.Drawing">
   7.361 +    <value>6, 6</value>
   7.362 +  </data>
   7.363 +  <data name="txtOwnSafewordsShort.Multiline" type="System.Boolean, mscorlib">
   7.364 +    <value>True</value>
   7.365 +  </data>
   7.366 +  <data name="txtOwnSafewordsShort.Size" type="System.Drawing.Size, System.Drawing">
   7.367 +    <value>398, 62</value>
   7.368 +  </data>
   7.369 +  <data name="txtOwnSafewordsShort.TabIndex" type="System.Int32, mscorlib">
   7.370 +    <value>16</value>
   7.371 +  </data>
   7.372 +  <data name="txtOwnSafewordsShort.Text" xml:space="preserve">
   7.373 +    <value>correct horse battery staple</value>
   7.374 +  </data>
   7.375 +  <data name="&gt;&gt;txtOwnSafewordsShort.Name" xml:space="preserve">
   7.376 +    <value>txtOwnSafewordsShort</value>
   7.377 +  </data>
   7.378 +  <data name="&gt;&gt;txtOwnSafewordsShort.Type" xml:space="preserve">
   7.379 +    <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.380 +  </data>
   7.381 +  <data name="&gt;&gt;txtOwnSafewordsShort.Parent" xml:space="preserve">
   7.382 +    <value>tabShort</value>
   7.383 +  </data>
   7.384 +  <data name="&gt;&gt;txtOwnSafewordsShort.ZOrder" xml:space="preserve">
   7.385 +    <value>2</value>
   7.386 +  </data>
   7.387 +  <data name="tabShort.Location" type="System.Drawing.Point, System.Drawing">
   7.388 +    <value>4, 22</value>
   7.389 +  </data>
   7.390 +  <data name="tabShort.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
   7.391 +    <value>3, 3, 3, 3</value>
   7.392 +  </data>
   7.393 +  <data name="tabShort.Size" type="System.Drawing.Size, System.Drawing">
   7.394 +    <value>411, 162</value>
   7.395 +  </data>
   7.396 +  <data name="tabShort.TabIndex" type="System.Int32, mscorlib">
   7.397 +    <value>0</value>
   7.398 +  </data>
   7.399 +  <data name="tabShort.Text" xml:space="preserve">
   7.400 +    <value>Short</value>
   7.401 +  </data>
   7.402 +  <data name="&gt;&gt;tabShort.Name" xml:space="preserve">
   7.403 +    <value>tabShort</value>
   7.404 +  </data>
   7.405 +  <data name="&gt;&gt;tabShort.Type" xml:space="preserve">
   7.406 +    <value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.407 +  </data>
   7.408 +  <data name="&gt;&gt;tabShort.Parent" xml:space="preserve">
   7.409 +    <value>tabVariant</value>
   7.410 +  </data>
   7.411 +  <data name="&gt;&gt;tabShort.ZOrder" xml:space="preserve">
   7.412 +    <value>0</value>
   7.413 +  </data>
   7.414 +  <data name="lblQuestion2.AutoSize" type="System.Boolean, mscorlib">
   7.415 +    <value>True</value>
   7.416 +  </data>
   7.417 +  <data name="lblQuestion2.Font" type="System.Drawing.Font, System.Drawing">
   7.418 +    <value>Microsoft Sans Serif, 9pt, style=Bold</value>
   7.419 +  </data>
   7.420 +  <data name="lblQuestion2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
   7.421 +    <value>NoControl</value>
   7.422 +  </data>
   7.423 +  <data name="lblQuestion2.Location" type="System.Drawing.Point, System.Drawing">
   7.424 +    <value>6, 139</value>
   7.425 +  </data>
   7.426 +  <data name="lblQuestion2.Size" type="System.Drawing.Size, System.Drawing">
   7.427 +    <value>245, 15</value>
   7.428 +  </data>
   7.429 +  <data name="lblQuestion2.TabIndex" type="System.Int32, mscorlib">
   7.430 +    <value>19</value>
   7.431 +  </data>
   7.432 +  <data name="lblQuestion2.Text" xml:space="preserve">
   7.433 +    <value>Are your partner's safewords correct?</value>
   7.434 +  </data>
   7.435 +  <data name="&gt;&gt;lblQuestion2.Name" xml:space="preserve">
   7.436 +    <value>lblQuestion2</value>
   7.437 +  </data>
   7.438 +  <data name="&gt;&gt;lblQuestion2.Type" xml:space="preserve">
   7.439 +    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.440 +  </data>
   7.441 +  <data name="&gt;&gt;lblQuestion2.Parent" xml:space="preserve">
   7.442 +    <value>Full</value>
   7.443 +  </data>
   7.444 +  <data name="&gt;&gt;lblQuestion2.ZOrder" xml:space="preserve">
   7.445 +    <value>0</value>
   7.446 +  </data>
   7.447 +  <data name="txtPartnersSafewordsFull.Font" type="System.Drawing.Font, System.Drawing">
   7.448 +    <value>Microsoft Sans Serif, 12pt</value>
   7.449 +  </data>
   7.450 +  <data name="txtPartnersSafewordsFull.Location" type="System.Drawing.Point, System.Drawing">
   7.451 +    <value>6, 74</value>
   7.452 +  </data>
   7.453 +  <data name="txtPartnersSafewordsFull.Multiline" type="System.Boolean, mscorlib">
   7.454 +    <value>True</value>
   7.455 +  </data>
   7.456 +  <data name="txtPartnersSafewordsFull.Size" type="System.Drawing.Size, System.Drawing">
   7.457 +    <value>399, 62</value>
   7.458 +  </data>
   7.459 +  <data name="txtPartnersSafewordsFull.TabIndex" type="System.Int32, mscorlib">
   7.460 +    <value>18</value>
   7.461 +  </data>
   7.462 +  <data name="txtPartnersSafewordsFull.Text" xml:space="preserve">
   7.463 +    <value>correct horse battery staple</value>
   7.464 +  </data>
   7.465 +  <data name="&gt;&gt;txtPartnersSafewordsFull.Name" xml:space="preserve">
   7.466 +    <value>txtPartnersSafewordsFull</value>
   7.467 +  </data>
   7.468 +  <data name="&gt;&gt;txtPartnersSafewordsFull.Type" xml:space="preserve">
   7.469 +    <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.470 +  </data>
   7.471 +  <data name="&gt;&gt;txtPartnersSafewordsFull.Parent" xml:space="preserve">
   7.472 +    <value>Full</value>
   7.473 +  </data>
   7.474 +  <data name="&gt;&gt;txtPartnersSafewordsFull.ZOrder" xml:space="preserve">
   7.475 +    <value>1</value>
   7.476 +  </data>
   7.477 +  <data name="txtOwnSafewordsFull.Font" type="System.Drawing.Font, System.Drawing">
   7.478 +    <value>Microsoft Sans Serif, 12pt</value>
   7.479 +  </data>
   7.480 +  <data name="txtOwnSafewordsFull.Location" type="System.Drawing.Point, System.Drawing">
   7.481 +    <value>6, 6</value>
   7.482 +  </data>
   7.483 +  <data name="txtOwnSafewordsFull.Multiline" type="System.Boolean, mscorlib">
   7.484 +    <value>True</value>
   7.485 +  </data>
   7.486 +  <data name="txtOwnSafewordsFull.Size" type="System.Drawing.Size, System.Drawing">
   7.487 +    <value>398, 62</value>
   7.488 +  </data>
   7.489 +  <data name="txtOwnSafewordsFull.TabIndex" type="System.Int32, mscorlib">
   7.490 +    <value>17</value>
   7.491 +  </data>
   7.492 +  <data name="txtOwnSafewordsFull.Text" xml:space="preserve">
   7.493 +    <value>correct horse battery staple</value>
   7.494 +  </data>
   7.495 +  <data name="&gt;&gt;txtOwnSafewordsFull.Name" xml:space="preserve">
   7.496 +    <value>txtOwnSafewordsFull</value>
   7.497 +  </data>
   7.498 +  <data name="&gt;&gt;txtOwnSafewordsFull.Type" xml:space="preserve">
   7.499 +    <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.500 +  </data>
   7.501 +  <data name="&gt;&gt;txtOwnSafewordsFull.Parent" xml:space="preserve">
   7.502 +    <value>Full</value>
   7.503 +  </data>
   7.504 +  <data name="&gt;&gt;txtOwnSafewordsFull.ZOrder" xml:space="preserve">
   7.505 +    <value>2</value>
   7.506 +  </data>
   7.507 +  <data name="Full.Location" type="System.Drawing.Point, System.Drawing">
   7.508 +    <value>4, 22</value>
   7.509 +  </data>
   7.510 +  <data name="Full.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
   7.511 +    <value>3, 3, 3, 3</value>
   7.512 +  </data>
   7.513 +  <data name="Full.Size" type="System.Drawing.Size, System.Drawing">
   7.514 +    <value>411, 162</value>
   7.515 +  </data>
   7.516 +  <data name="Full.TabIndex" type="System.Int32, mscorlib">
   7.517 +    <value>1</value>
   7.518 +  </data>
   7.519 +  <data name="Full.Text" xml:space="preserve">
   7.520 +    <value>Full</value>
   7.521 +  </data>
   7.522 +  <data name="&gt;&gt;Full.Name" xml:space="preserve">
   7.523 +    <value>Full</value>
   7.524 +  </data>
   7.525 +  <data name="&gt;&gt;Full.Type" xml:space="preserve">
   7.526 +    <value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.527 +  </data>
   7.528 +  <data name="&gt;&gt;Full.Parent" xml:space="preserve">
   7.529 +    <value>tabVariant</value>
   7.530 +  </data>
   7.531 +  <data name="&gt;&gt;Full.ZOrder" xml:space="preserve">
   7.532 +    <value>1</value>
   7.533 +  </data>
   7.534 +  <data name="lblQuestion3.AutoSize" type="System.Boolean, mscorlib">
   7.535 +    <value>True</value>
   7.536 +  </data>
   7.537 +  <data name="lblQuestion3.Font" type="System.Drawing.Font, System.Drawing">
   7.538 +    <value>Microsoft Sans Serif, 9pt, style=Bold</value>
   7.539 +  </data>
   7.540 +  <data name="lblQuestion3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
   7.541 +    <value>NoControl</value>
   7.542 +  </data>
   7.543 +  <data name="lblQuestion3.Location" type="System.Drawing.Point, System.Drawing">
   7.544 +    <value>6, 139</value>
   7.545 +  </data>
   7.546 +  <data name="lblQuestion3.Size" type="System.Drawing.Size, System.Drawing">
   7.547 +    <value>236, 15</value>
   7.548 +  </data>
   7.549 +  <data name="lblQuestion3.TabIndex" type="System.Int32, mscorlib">
   7.550 +    <value>20</value>
   7.551 +  </data>
   7.552 +  <data name="lblQuestion3.Text" xml:space="preserve">
   7.553 +    <value>Is your partner's fingerprint correct?</value>
   7.554 +  </data>
   7.555 +  <data name="&gt;&gt;lblQuestion3.Name" xml:space="preserve">
   7.556 +    <value>lblQuestion3</value>
   7.557 +  </data>
   7.558 +  <data name="&gt;&gt;lblQuestion3.Type" xml:space="preserve">
   7.559 +    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.560 +  </data>
   7.561 +  <data name="&gt;&gt;lblQuestion3.Parent" xml:space="preserve">
   7.562 +    <value>tabFpr</value>
   7.563 +  </data>
   7.564 +  <data name="&gt;&gt;lblQuestion3.ZOrder" xml:space="preserve">
   7.565 +    <value>0</value>
   7.566 +  </data>
   7.567 +  <data name="txtPartnersFpr.Font" type="System.Drawing.Font, System.Drawing">
   7.568 +    <value>Courier New, 15.75pt</value>
   7.569 +  </data>
   7.570 +  <data name="txtPartnersFpr.Location" type="System.Drawing.Point, System.Drawing">
   7.571 +    <value>6, 74</value>
   7.572 +  </data>
   7.573 +  <data name="txtPartnersFpr.Multiline" type="System.Boolean, mscorlib">
   7.574 +    <value>True</value>
   7.575 +  </data>
   7.576 +  <data name="txtPartnersFpr.Size" type="System.Drawing.Size, System.Drawing">
   7.577 +    <value>398, 62</value>
   7.578 +  </data>
   7.579 +  <data name="txtPartnersFpr.TabIndex" type="System.Int32, mscorlib">
   7.580 +    <value>19</value>
   7.581 +  </data>
   7.582 +  <data name="txtPartnersFpr.Text" xml:space="preserve">
   7.583 +    <value>4942 2235 FC99 585B 891C
   7.584 +6653 0C7B 109B FA72 61F7
   7.585 +</value>
   7.586 +  </data>
   7.587 +  <data name="&gt;&gt;txtPartnersFpr.Name" xml:space="preserve">
   7.588 +    <value>txtPartnersFpr</value>
   7.589 +  </data>
   7.590 +  <data name="&gt;&gt;txtPartnersFpr.Type" xml:space="preserve">
   7.591 +    <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.592 +  </data>
   7.593 +  <data name="&gt;&gt;txtPartnersFpr.Parent" xml:space="preserve">
   7.594 +    <value>tabFpr</value>
   7.595 +  </data>
   7.596 +  <data name="&gt;&gt;txtPartnersFpr.ZOrder" xml:space="preserve">
   7.597 +    <value>1</value>
   7.598 +  </data>
   7.599 +  <data name="txtOwnFpr.Font" type="System.Drawing.Font, System.Drawing">
   7.600 +    <value>Courier New, 15.75pt</value>
   7.601 +  </data>
   7.602 +  <data name="txtOwnFpr.Location" type="System.Drawing.Point, System.Drawing">
   7.603 +    <value>6, 6</value>
   7.604 +  </data>
   7.605 +  <data name="txtOwnFpr.Multiline" type="System.Boolean, mscorlib">
   7.606 +    <value>True</value>
   7.607 +  </data>
   7.608 +  <data name="txtOwnFpr.Size" type="System.Drawing.Size, System.Drawing">
   7.609 +    <value>398, 62</value>
   7.610 +  </data>
   7.611 +  <data name="txtOwnFpr.TabIndex" type="System.Int32, mscorlib">
   7.612 +    <value>18</value>
   7.613 +  </data>
   7.614 +  <data name="txtOwnFpr.Text" xml:space="preserve">
   7.615 +    <value>4942 2235 FC99 585B 891C
   7.616 +6653 0C7B 109B FA72 61F7</value>
   7.617 +  </data>
   7.618 +  <data name="&gt;&gt;txtOwnFpr.Name" xml:space="preserve">
   7.619 +    <value>txtOwnFpr</value>
   7.620 +  </data>
   7.621 +  <data name="&gt;&gt;txtOwnFpr.Type" xml:space="preserve">
   7.622 +    <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.623 +  </data>
   7.624 +  <data name="&gt;&gt;txtOwnFpr.Parent" xml:space="preserve">
   7.625 +    <value>tabFpr</value>
   7.626 +  </data>
   7.627 +  <data name="&gt;&gt;txtOwnFpr.ZOrder" xml:space="preserve">
   7.628 +    <value>2</value>
   7.629 +  </data>
   7.630 +  <data name="tabFpr.Location" type="System.Drawing.Point, System.Drawing">
   7.631 +    <value>4, 22</value>
   7.632 +  </data>
   7.633 +  <data name="tabFpr.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
   7.634 +    <value>3, 3, 3, 3</value>
   7.635 +  </data>
   7.636 +  <data name="tabFpr.Size" type="System.Drawing.Size, System.Drawing">
   7.637 +    <value>411, 162</value>
   7.638 +  </data>
   7.639 +  <data name="tabFpr.TabIndex" type="System.Int32, mscorlib">
   7.640 +    <value>2</value>
   7.641 +  </data>
   7.642 +  <data name="tabFpr.Text" xml:space="preserve">
   7.643 +    <value>Fingerprint</value>
   7.644 +  </data>
   7.645 +  <data name="&gt;&gt;tabFpr.Name" xml:space="preserve">
   7.646 +    <value>tabFpr</value>
   7.647 +  </data>
   7.648 +  <data name="&gt;&gt;tabFpr.Type" xml:space="preserve">
   7.649 +    <value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.650 +  </data>
   7.651 +  <data name="&gt;&gt;tabFpr.Parent" xml:space="preserve">
   7.652 +    <value>tabVariant</value>
   7.653 +  </data>
   7.654 +  <data name="&gt;&gt;tabFpr.ZOrder" xml:space="preserve">
   7.655 +    <value>2</value>
   7.656 +  </data>
   7.657 +  <data name="tabVariant.Location" type="System.Drawing.Point, System.Drawing">
   7.658 +    <value>173, 80</value>
   7.659 +  </data>
   7.660 +  <data name="tabVariant.Size" type="System.Drawing.Size, System.Drawing">
   7.661 +    <value>419, 188</value>
   7.662 +  </data>
   7.663 +  <data name="tabVariant.TabIndex" type="System.Int32, mscorlib">
   7.664 +    <value>15</value>
   7.665 +  </data>
   7.666 +  <data name="&gt;&gt;tabVariant.Name" xml:space="preserve">
   7.667 +    <value>tabVariant</value>
   7.668 +  </data>
   7.669 +  <data name="&gt;&gt;tabVariant.Type" xml:space="preserve">
   7.670 +    <value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.671 +  </data>
   7.672 +  <data name="&gt;&gt;tabVariant.Parent" xml:space="preserve">
   7.673 +    <value>tabSafewords</value>
   7.674 +  </data>
   7.675 +  <data name="&gt;&gt;tabVariant.ZOrder" xml:space="preserve">
   7.676 +    <value>3</value>
   7.677 +  </data>
   7.678 +  <data name="lblPartner.Location" type="System.Drawing.Point, System.Drawing">
   7.679 +    <value>3, 205</value>
   7.680 +  </data>
   7.681 +  <data name="lblPartner.Size" type="System.Drawing.Size, System.Drawing">
   7.682 +    <value>137, 59</value>
   7.683 +  </data>
   7.684 +  <data name="lblPartner.TabIndex" type="System.Int32, mscorlib">
   7.685 +    <value>5</value>
   7.686 +  </data>
   7.687 +  <data name="lblPartner.Text" xml:space="preserve">
   7.688 +    <value>Partner's:</value>
   7.689 +  </data>
   7.690 +  <data name="&gt;&gt;lblPartner.Name" xml:space="preserve">
   7.691 +    <value>lblPartner</value>
   7.692 +  </data>
   7.693 +  <data name="&gt;&gt;lblPartner.Type" xml:space="preserve">
   7.694 +    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.695 +  </data>
   7.696 +  <data name="&gt;&gt;lblPartner.Parent" xml:space="preserve">
   7.697 +    <value>tabSafewords</value>
   7.698 +  </data>
   7.699 +  <data name="&gt;&gt;lblPartner.ZOrder" xml:space="preserve">
   7.700 +    <value>4</value>
   7.701 +  </data>
   7.702 +  <data name="lblOwn.Location" type="System.Drawing.Point, System.Drawing">
   7.703 +    <value>3, 131</value>
   7.704 +  </data>
   7.705 +  <data name="lblOwn.Size" type="System.Drawing.Size, System.Drawing">
   7.706 +    <value>164, 39</value>
   7.707 +  </data>
   7.708 +  <data name="lblOwn.TabIndex" type="System.Int32, mscorlib">
   7.709 +    <value>2</value>
   7.710 +  </data>
   7.711 +  <data name="lblOwn.Text" xml:space="preserve">
   7.712 +    <value>Your own:</value>
   7.713 +  </data>
   7.714 +  <data name="&gt;&gt;lblOwn.Name" xml:space="preserve">
   7.715 +    <value>lblOwn</value>
   7.716 +  </data>
   7.717 +  <data name="&gt;&gt;lblOwn.Type" xml:space="preserve">
   7.718 +    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.719 +  </data>
   7.720 +  <data name="&gt;&gt;lblOwn.Parent" xml:space="preserve">
   7.721 +    <value>tabSafewords</value>
   7.722 +  </data>
   7.723 +  <data name="&gt;&gt;lblOwn.ZOrder" xml:space="preserve">
   7.724 +    <value>5</value>
   7.725 +  </data>
   7.726 +  <data name="lblExplanation.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
   7.727 +    <value>Top</value>
   7.728 +  </data>
   7.729 +  <data name="lblExplanation.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
   7.730 +    <value>NoControl</value>
   7.731 +  </data>
   7.732 +  <data name="lblExplanation.Location" type="System.Drawing.Point, System.Drawing">
   7.733 +    <value>3, 3</value>
   7.734 +  </data>
   7.735 +  <data name="lblExplanation.Size" type="System.Drawing.Size, System.Drawing">
   7.736 +    <value>588, 74</value>
   7.737 +  </data>
   7.738 +  <data name="lblExplanation.TabIndex" type="System.Int32, mscorlib">
   7.739 +    <value>1</value>
   7.740 +  </data>
   7.741 +  <data name="lblExplanation.Text" xml:space="preserve">
   7.742 +    <value>The communcation with this contact could be more secure. This can be achieved by initiating a handshake.
   7.743 +
   7.744 +A handshake can be done by checking if your communication partner can see your safe words correctly, and if you can see your communication partner's safewords correctly.</value>
   7.745 +  </data>
   7.746 +  <data name="&gt;&gt;lblExplanation.Name" xml:space="preserve">
   7.747 +    <value>lblExplanation</value>
   7.748 +  </data>
   7.749 +  <data name="&gt;&gt;lblExplanation.Type" xml:space="preserve">
   7.750 +    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.751 +  </data>
   7.752 +  <data name="&gt;&gt;lblExplanation.Parent" xml:space="preserve">
   7.753 +    <value>tabSafewords</value>
   7.754 +  </data>
   7.755 +  <data name="&gt;&gt;lblExplanation.ZOrder" xml:space="preserve">
   7.756 +    <value>6</value>
   7.757 +  </data>
   7.758 +  <data name="tabSafewords.Location" type="System.Drawing.Point, System.Drawing">
   7.759 +    <value>4, 22</value>
   7.760 +  </data>
   7.761 +  <data name="tabSafewords.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
   7.762 +    <value>3, 3, 3, 3</value>
   7.763 +  </data>
   7.764 +  <data name="tabSafewords.Size" type="System.Drawing.Size, System.Drawing">
   7.765 +    <value>594, 356</value>
   7.766 +  </data>
   7.767 +  <data name="tabSafewords.TabIndex" type="System.Int32, mscorlib">
   7.768 +    <value>0</value>
   7.769 +  </data>
   7.770 +  <data name="tabSafewords.Text" xml:space="preserve">
   7.771 +    <value>Safewords</value>
   7.772 +  </data>
   7.773 +  <data name="&gt;&gt;tabSafewords.Name" xml:space="preserve">
   7.774 +    <value>tabSafewords</value>
   7.775 +  </data>
   7.776 +  <data name="&gt;&gt;tabSafewords.Type" xml:space="preserve">
   7.777 +    <value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.778 +  </data>
   7.779 +  <data name="&gt;&gt;tabSafewords.Parent" xml:space="preserve">
   7.780 +    <value>tabControl</value>
   7.781 +  </data>
   7.782 +  <data name="&gt;&gt;tabSafewords.ZOrder" xml:space="preserve">
   7.783 +    <value>0</value>
   7.784 +  </data>
   7.785 +  <data name="tabControl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
   7.786 +    <value>Fill</value>
   7.787 +  </data>
   7.788 +  <data name="tabControl.Location" type="System.Drawing.Point, System.Drawing">
   7.789 +    <value>0, 0</value>
   7.790 +  </data>
   7.791 +  <data name="tabControl.Size" type="System.Drawing.Size, System.Drawing">
   7.792 +    <value>602, 382</value>
   7.793 +  </data>
   7.794 +  <data name="tabControl.TabIndex" type="System.Int32, mscorlib">
   7.795 +    <value>0</value>
   7.796 +  </data>
   7.797 +  <data name="&gt;&gt;tabControl.Name" xml:space="preserve">
   7.798 +    <value>tabControl</value>
   7.799 +  </data>
   7.800 +  <data name="&gt;&gt;tabControl.Type" xml:space="preserve">
   7.801 +    <value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.802 +  </data>
   7.803 +  <data name="&gt;&gt;tabControl.Parent" xml:space="preserve">
   7.804 +    <value>$this</value>
   7.805 +  </data>
   7.806 +  <data name="&gt;&gt;tabControl.ZOrder" xml:space="preserve">
   7.807 +    <value>0</value>
   7.808 +  </data>
   7.809 +  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   7.810 +    <value>True</value>
   7.811 +  </metadata>
   7.812 +  <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
   7.813 +    <value>6, 13</value>
   7.814 +  </data>
   7.815 +  <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
   7.816 +    <value>602, 382</value>
   7.817 +  </data>
   7.818 +  <data name="$this.Text" xml:space="preserve">
   7.819 +    <value>p≡p – Handshake</value>
   7.820 +  </data>
   7.821 +  <data name="&gt;&gt;$this.Name" xml:space="preserve">
   7.822 +    <value>Handshake</value>
   7.823 +  </data>
   7.824 +  <data name="&gt;&gt;$this.Type" xml:space="preserve">
   7.825 +    <value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   7.826 +  </data>
   7.827 +</root>
   7.828 \ No newline at end of file
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/Properties/AssemblyInfo.cs	Wed Jun 25 18:35:57 2014 +0200
     8.3 @@ -0,0 +1,37 @@
     8.4 +using System.Reflection;
     8.5 +using System.Runtime.CompilerServices;
     8.6 +using System.Runtime.InteropServices;
     8.7 +using System.Security;
     8.8 +
     8.9 +// General Information about an assembly is controlled through the following 
    8.10 +// set of attributes. Change these attribute values to modify the information
    8.11 +// associated with an assembly.
    8.12 +[assembly: AssemblyTitle("p≡p")]
    8.13 +[assembly: AssemblyDescription("p≡p Outlook")]
    8.14 +[assembly: AssemblyConfiguration("")]
    8.15 +[assembly: AssemblyCompany("")]
    8.16 +[assembly: AssemblyProduct("p≡p")]
    8.17 +[assembly: AssemblyCopyright("Copyright © 2014 p≡p security AG")]
    8.18 +[assembly: AssemblyTrademark("")]
    8.19 +[assembly: AssemblyCulture("")]
    8.20 +
    8.21 +// Setting ComVisible to false makes the types in this assembly not visible 
    8.22 +// to COM components.  If you need to access a type in this assembly from 
    8.23 +// COM, set the ComVisible attribute to true on that type.
    8.24 +[assembly: ComVisible(false)]
    8.25 +
    8.26 +// The following GUID is for the ID of the typelib if this project is exposed to COM
    8.27 +[assembly: Guid("e7283d3e-bbf7-44d5-b64e-09c091f86a25")]
    8.28 +
    8.29 +// Version information for an assembly consists of the following four values:
    8.30 +//
    8.31 +//      Major Version
    8.32 +//      Minor Version 
    8.33 +//      Build Number
    8.34 +//      Revision
    8.35 +//
    8.36 +// You can specify all the values or you can default the Build and Revision Numbers 
    8.37 +// by using the '*' as shown below:
    8.38 +// [assembly: AssemblyVersion("1.0.*")]
    8.39 +[assembly: AssemblyVersion("1.0.0.0")]
    8.40 +[assembly: AssemblyFileVersion("1.0.0.0")]
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/Properties/Resources.Designer.cs	Wed Jun 25 18:35:57 2014 +0200
     9.3 @@ -0,0 +1,63 @@
     9.4 +//------------------------------------------------------------------------------
     9.5 +// <auto-generated>
     9.6 +//     This code was generated by a tool.
     9.7 +//     Runtime Version:4.0.30319.34014
     9.8 +//
     9.9 +//     Changes to this file may cause incorrect behavior and will be lost if
    9.10 +//     the code is regenerated.
    9.11 +// </auto-generated>
    9.12 +//------------------------------------------------------------------------------
    9.13 +
    9.14 +namespace pEp.Properties {
    9.15 +    using System;
    9.16 +    
    9.17 +    
    9.18 +    /// <summary>
    9.19 +    ///   A strongly-typed resource class, for looking up localized strings, etc.
    9.20 +    /// </summary>
    9.21 +    // This class was auto-generated by the StronglyTypedResourceBuilder
    9.22 +    // class via a tool like ResGen or Visual Studio.
    9.23 +    // To add or remove a member, edit your .ResX file then rerun ResGen
    9.24 +    // with the /str option, or rebuild your VS project.
    9.25 +    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    9.26 +    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    9.27 +    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    9.28 +    internal class Resources {
    9.29 +        
    9.30 +        private static global::System.Resources.ResourceManager resourceMan;
    9.31 +        
    9.32 +        private static global::System.Globalization.CultureInfo resourceCulture;
    9.33 +        
    9.34 +        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
    9.35 +        internal Resources() {
    9.36 +        }
    9.37 +        
    9.38 +        /// <summary>
    9.39 +        ///   Returns the cached ResourceManager instance used by this class.
    9.40 +        /// </summary>
    9.41 +        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
    9.42 +        internal static global::System.Resources.ResourceManager ResourceManager {
    9.43 +            get {
    9.44 +                if (object.ReferenceEquals(resourceMan, null)) {
    9.45 +                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("pEp.Properties.Resources", typeof(Resources).Assembly);
    9.46 +                    resourceMan = temp;
    9.47 +                }
    9.48 +                return resourceMan;
    9.49 +            }
    9.50 +        }
    9.51 +        
    9.52 +        /// <summary>
    9.53 +        ///   Overrides the current thread's CurrentUICulture property for all
    9.54 +        ///   resource lookups using this strongly typed resource class.
    9.55 +        /// </summary>
    9.56 +        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
    9.57 +        internal static global::System.Globalization.CultureInfo Culture {
    9.58 +            get {
    9.59 +                return resourceCulture;
    9.60 +            }
    9.61 +            set {
    9.62 +                resourceCulture = value;
    9.63 +            }
    9.64 +        }
    9.65 +    }
    9.66 +}
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/Properties/Resources.resx	Wed Jun 25 18:35:57 2014 +0200
    10.3 @@ -0,0 +1,117 @@
    10.4 +<?xml version="1.0" encoding="utf-8"?>
    10.5 +<root>
    10.6 +  <!-- 
    10.7 +    Microsoft ResX Schema 
    10.8 +    
    10.9 +    Version 2.0
   10.10 +    
   10.11 +    The primary goals of this format is to allow a simple XML format 
   10.12 +    that is mostly human readable. The generation and parsing of the 
   10.13 +    various data types are done through the TypeConverter classes 
   10.14 +    associated with the data types.
   10.15 +    
   10.16 +    Example:
   10.17 +    
   10.18 +    ... ado.net/XML headers & schema ...
   10.19 +    <resheader name="resmimetype">text/microsoft-resx</resheader>
   10.20 +    <resheader name="version">2.0</resheader>
   10.21 +    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
   10.22 +    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
   10.23 +    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
   10.24 +    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
   10.25 +    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
   10.26 +        <value>[base64 mime encoded serialized .NET Framework object]</value>
   10.27 +    </data>
   10.28 +    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
   10.29 +        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
   10.30 +        <comment>This is a comment</comment>
   10.31 +    </data>
   10.32 +                
   10.33 +    There are any number of "resheader" rows that contain simple 
   10.34 +    name/value pairs.
   10.35 +    
   10.36 +    Each data row contains a name, and value. The row also contains a 
   10.37 +    type or mimetype. Type corresponds to a .NET class that support 
   10.38 +    text/value conversion through the TypeConverter architecture. 
   10.39 +    Classes that don't support this are serialized and stored with the 
   10.40 +    mimetype set.
   10.41 +    
   10.42 +    The mimetype is used for serialized objects, and tells the 
   10.43 +    ResXResourceReader how to depersist the object. This is currently not 
   10.44 +    extensible. For a given mimetype the value must be set accordingly:
   10.45 +    
   10.46 +    Note - application/x-microsoft.net.object.binary.base64 is the format 
   10.47 +    that the ResXResourceWriter will generate, however the reader can 
   10.48 +    read any of the formats listed below.
   10.49 +    
   10.50 +    mimetype: application/x-microsoft.net.object.binary.base64
   10.51 +    value   : The object must be serialized with 
   10.52 +            : System.Serialization.Formatters.Binary.BinaryFormatter
   10.53 +            : and then encoded with base64 encoding.
   10.54 +    
   10.55 +    mimetype: application/x-microsoft.net.object.soap.base64
   10.56 +    value   : The object must be serialized with 
   10.57 +            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
   10.58 +            : and then encoded with base64 encoding.
   10.59 +
   10.60 +    mimetype: application/x-microsoft.net.object.bytearray.base64
   10.61 +    value   : The object must be serialized into a byte array 
   10.62 +            : using a System.ComponentModel.TypeConverter
   10.63 +            : and then encoded with base64 encoding.
   10.64 +    -->
   10.65 +  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
   10.66 +    <xsd:element name="root" msdata:IsDataSet="true">
   10.67 +      <xsd:complexType>
   10.68 +        <xsd:choice maxOccurs="unbounded">
   10.69 +          <xsd:element name="metadata">
   10.70 +            <xsd:complexType>
   10.71 +              <xsd:sequence>
   10.72 +                <xsd:element name="value" type="xsd:string" minOccurs="0" />
   10.73 +              </xsd:sequence>
   10.74 +              <xsd:attribute name="name" type="xsd:string" />
   10.75 +              <xsd:attribute name="type" type="xsd:string" />
   10.76 +              <xsd:attribute name="mimetype" type="xsd:string" />
   10.77 +            </xsd:complexType>
   10.78 +          </xsd:element>
   10.79 +          <xsd:element name="assembly">
   10.80 +            <xsd:complexType>
   10.81 +              <xsd:attribute name="alias" type="xsd:string" />
   10.82 +              <xsd:attribute name="name" type="xsd:string" />
   10.83 +            </xsd:complexType>
   10.84 +          </xsd:element>
   10.85 +          <xsd:element name="data">
   10.86 +            <xsd:complexType>
   10.87 +              <xsd:sequence>
   10.88 +                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
   10.89 +                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
   10.90 +              </xsd:sequence>
   10.91 +              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
   10.92 +              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
   10.93 +              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
   10.94 +            </xsd:complexType>
   10.95 +          </xsd:element>
   10.96 +          <xsd:element name="resheader">
   10.97 +            <xsd:complexType>
   10.98 +              <xsd:sequence>
   10.99 +                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
  10.100 +              </xsd:sequence>
  10.101 +              <xsd:attribute name="name" type="xsd:string" use="required" />
  10.102 +            </xsd:complexType>
  10.103 +          </xsd:element>
  10.104 +        </xsd:choice>
  10.105 +      </xsd:complexType>
  10.106 +    </xsd:element>
  10.107 +  </xsd:schema>
  10.108 +  <resheader name="resmimetype">
  10.109 +    <value>text/microsoft-resx</value>
  10.110 +  </resheader>
  10.111 +  <resheader name="version">
  10.112 +    <value>2.0</value>
  10.113 +  </resheader>
  10.114 +  <resheader name="reader">
  10.115 +    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  10.116 +  </resheader>
  10.117 +  <resheader name="writer">
  10.118 +    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  10.119 +  </resheader>
  10.120 +</root>
  10.121 \ No newline at end of file
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/Properties/Settings.Designer.cs	Wed Jun 25 18:35:57 2014 +0200
    11.3 @@ -0,0 +1,26 @@
    11.4 +//------------------------------------------------------------------------------
    11.5 +// <auto-generated>
    11.6 +//     This code was generated by a tool.
    11.7 +//     Runtime Version:4.0.30319.34014
    11.8 +//
    11.9 +//     Changes to this file may cause incorrect behavior and will be lost if
   11.10 +//     the code is regenerated.
   11.11 +// </auto-generated>
   11.12 +//------------------------------------------------------------------------------
   11.13 +
   11.14 +namespace pEp.Properties {
   11.15 +    
   11.16 +    
   11.17 +    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
   11.18 +    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
   11.19 +    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
   11.20 +        
   11.21 +        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
   11.22 +        
   11.23 +        public static Settings Default {
   11.24 +            get {
   11.25 +                return defaultInstance;
   11.26 +            }
   11.27 +        }
   11.28 +    }
   11.29 +}
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/Properties/Settings.settings	Wed Jun 25 18:35:57 2014 +0200
    12.3 @@ -0,0 +1,7 @@
    12.4 +<?xml version='1.0' encoding='utf-8'?>
    12.5 +<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
    12.6 +  <Profiles>
    12.7 +    <Profile Name="(Default)" />
    12.8 +  </Profiles>
    12.9 +  <Settings />
   12.10 +</SettingsFile>
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/ThisAddIn.cs	Wed Jun 25 18:35:57 2014 +0200
    13.3 @@ -0,0 +1,190 @@
    13.4 +using System;
    13.5 +using System.Collections;
    13.6 +using System.Collections.Generic;
    13.7 +using System.Collections.Concurrent;
    13.8 +using System.Linq;
    13.9 +using System.Text;
   13.10 +using System.Xml.Linq;
   13.11 +using System.IO;
   13.12 +using System.Runtime.InteropServices;
   13.13 +using System.Threading;
   13.14 +using Outlook = Microsoft.Office.Interop.Outlook;
   13.15 +using Office = Microsoft.Office.Core;
   13.16 +using pEpComAdapterLib;
   13.17 +using System.Windows.Forms;
   13.18 +using MIME;
   13.19 +
   13.20 +namespace pEp
   13.21 +{
   13.22 +    public partial class ThisAddIn
   13.23 +    {
   13.24 +        public static pEpEngine pEp;
   13.25 +        public static ThisAddIn addIn;
   13.26 +        public static EncStatus last_enc_status = EncStatus.unknown;
   13.27 +
   13.28 +        public const string PR_X_PEP_VERSION        = "http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/X-pEp-Version";
   13.29 +        public const string PR_CONTENT_DISPOSITION = "http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/Content-Disposition";
   13.30 +        public const string PR_ATTACH_DATA_BIN = "http://schemas.microsoft.com/mapi/proptag/0x37010102";
   13.31 +        public const string PR_ATTACH_MIME_TAG      = "http://schemas.microsoft.com/mapi/proptag/0x370E001F";
   13.32 +
   13.33 +        public const string disclaimer = "This mail was encrypted using p≡p.\n\nYou need p≡p or a software for decrypting OpenPGP messages to read it.";
   13.34 +
   13.35 +        static void StopHere(string reason)
   13.36 +        {
   13.37 +            MessageBox.Show(reason);
   13.38 +        }
   13.39 +
   13.40 +        private void ThisAddIn_Startup(object sender, System.EventArgs e)
   13.41 +        {
   13.42 +            addIn = this;
   13.43 +
   13.44 +            try
   13.45 +            {
   13.46 +                pEp = new pEpEngine();
   13.47 +            }
   13.48 +            catch (COMException ce)
   13.49 +            {
   13.50 +                MessageBox.Show("Cannot initialize p≡p engine:\n\n" + ce.ToString() + "\n\nIt will not be possible to encrypt or decrypt mail. pEp has to be reinstalled.", "pEp AddIn", MessageBoxButtons.OK, MessageBoxIcon.Stop);
   13.51 +                return;
   13.52 +            }
   13.53 +
   13.54 +            ((Microsoft.Office.Interop.Outlook.ApplicationEvents_11_Event) this.Application).Quit += new Outlook.ApplicationEvents_11_QuitEventHandler(ThisAddIn_Quit);
   13.55 +            this.Application.ItemSend += new Outlook.ApplicationEvents_11_ItemSendEventHandler(Application_ItemSend);
   13.56 +            this.Application.NewMail += new Outlook.ApplicationEvents_11_NewMailEventHandler(Application_NewMail);
   13.57 +            pEp.log("main program started", "pEp Outlook");
   13.58 +
   13.59 +            examine_myself();
   13.60 +        }
   13.61 +
   13.62 +        void ThisAddIn_Quit()
   13.63 +        {
   13.64 +            if (pEp != null)
   13.65 +            {
   13.66 +                Marshal.FinalReleaseComObject(pEp);
   13.67 +                pEp = null;
   13.68 +            }
   13.69 +        }
   13.70 +
   13.71 +        void Application_NewMail()
   13.72 +        {
   13.73 +            Outlook.Folder inbox = this.Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox) as Outlook.Folder;
   13.74 +            Outlook.Items unread_items = inbox.Items.Restrict("[UnRead] = True");
   13.75 +            foreach (Outlook.MailItem item in unread_items)
   13.76 +            {
   13.77 +                new CryptableMailItem(item);
   13.78 +            }
   13.79 +        }
   13.80 +
   13.81 +        pEp_identity_s _me()
   13.82 +        {
   13.83 +            string email = "";
   13.84 +
   13.85 +            Outlook.Recipient current_user = Application.Session.CurrentUser;
   13.86 +            if (current_user == null)
   13.87 +            {
   13.88 +                throw new System.FieldAccessException();
   13.89 +            }
   13.90 +
   13.91 +            foreach (Microsoft.Office.Interop.Outlook.Account acct in Application.Session.Accounts)
   13.92 +            {
   13.93 +                if (acct.CurrentUser.Address == current_user.AddressEntry.Address)
   13.94 +                {
   13.95 +                    email = acct.SmtpAddress;
   13.96 +                    break;
   13.97 +                }
   13.98 +            }
   13.99 +
  13.100 +            if (email == "")
  13.101 +                throw new System.FormatException();
  13.102 +
  13.103 +            pEp_identity_s result = new pEp_identity_s();
  13.104 +            
  13.105 +            result.address = email;
  13.106 +            result.user_id = current_user.EntryID;
  13.107 +            result.username = current_user.Name;
  13.108 +
  13.109 +            return result;
  13.110 +        }
  13.111 +
  13.112 +        public pEp_identity_s mySelf()
  13.113 +        {
  13.114 +            pEp_identity_s me = _me();
  13.115 +            try
  13.116 +            {
  13.117 +                me = pEp.myself(me);
  13.118 +            }
  13.119 +            catch (COMException ex)
  13.120 +            {
  13.121 +                StopHere(ex.ToString());
  13.122 +            }
  13.123 +
  13.124 +            return me;
  13.125 +        }
  13.126 +
  13.127 +        public void examine_myself()
  13.128 +        {
  13.129 +            pEp_identity_s me = _me();
  13.130 +
  13.131 +            try
  13.132 +            {
  13.133 +                pEp.examine_myself(me);
  13.134 +            }
  13.135 +            catch (COMException ex)
  13.136 +            {
  13.137 +                StopHere(ex.ToString());
  13.138 +            }
  13.139 +        }
  13.140 +
  13.141 +        void Application_ItemSend(object Item, ref bool Cancel)
  13.142 +        {
  13.143 +            Outlook.MailItem _mailItem;
  13.144 +            try
  13.145 +            {
  13.146 +                _mailItem = (Outlook.MailItem)Item;
  13.147 +            }
  13.148 +            catch (InvalidCastException)
  13.149 +            {
  13.150 +                return;
  13.151 +            }
  13.152 +
  13.153 +            _mailItem.PropertyAccessor.SetProperty(PR_X_PEP_VERSION, "1.0");
  13.154 +
  13.155 +            CryptableMailItem mailItem = new CryptableMailItem(_mailItem);
  13.156 +            if (mailItem.possibleEncStatus == EncStatus.could_be || mailItem.possibleEncStatus == EncStatus.secure)
  13.157 +            {
  13.158 +                try
  13.159 +                {
  13.160 +                    mailItem.encrypt();
  13.161 +                }
  13.162 +                catch
  13.163 +                {
  13.164 +                    DialogResult result = MessageBox.Show("Cannot encrypt mail.\n\nShould we send unencrypted instead?", "p≡p", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
  13.165 +                    if (result == DialogResult.No)
  13.166 +                        Cancel = true;
  13.167 +                }
  13.168 +            }
  13.169 +            else
  13.170 +            {
  13.171 +                mailItem.addKey();
  13.172 +            }
  13.173 +        }
  13.174 +
  13.175 +        private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
  13.176 +        {
  13.177 +        }
  13.178 +    
  13.179 +        #region VSTO generated code
  13.180 +
  13.181 +        /// <summary>
  13.182 +        /// Required method for Designer support - do not modify
  13.183 +        /// the contents of this method with the code editor.
  13.184 +        /// </summary>
  13.185 +        private void InternalStartup()
  13.186 +        {
  13.187 +            this.Startup += new System.EventHandler(ThisAddIn_Startup);
  13.188 +            this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
  13.189 +        }
  13.190 +        
  13.191 +        #endregion
  13.192 +    }
  13.193 +}
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/app.config	Wed Jun 25 18:35:57 2014 +0200
    14.3 @@ -0,0 +1,3 @@
    14.4 +<?xml version="1.0" encoding="utf-8" ?>
    14.5 +<configuration>
    14.6 +</configuration>
    14.7 \ No newline at end of file
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/pEp.csproj	Wed Jun 25 18:35:57 2014 +0200
    15.3 @@ -0,0 +1,331 @@
    15.4 +<?xml version="1.0" encoding="utf-8"?>
    15.5 +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    15.6 +  <!--
    15.7 +    This section defines project-level properties.
    15.8 +
    15.9 +    AssemblyName
   15.10 +      Name of the output assembly.
   15.11 +    Configuration
   15.12 +      Specifies a default value for debug.
   15.13 +    OutputType
   15.14 +      Must be "Library" for VSTO.
   15.15 +    Platform
   15.16 +      Specifies what CPU the output of this project can run on.
   15.17 +    NoStandardLibraries
   15.18 +      Set to "false" for VSTO.
   15.19 +    RootNamespace
   15.20 +      In C#, this specifies the namespace given to new files. In VB, all objects are
   15.21 +      wrapped in this namespace at runtime.
   15.22 +  -->
   15.23 +  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   15.24 +  <PropertyGroup>
   15.25 +    <ProjectTypeGuids>{BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
   15.26 +    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
   15.27 +    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
   15.28 +    <ProjectGuid>{7242DFFB-7B80-49F1-A5A7-E486DFFD4425}</ProjectGuid>
   15.29 +    <OutputType>Library</OutputType>
   15.30 +    <NoStandardLibraries>false</NoStandardLibraries>
   15.31 +    <RootNamespace>pEp</RootNamespace>
   15.32 +    <AssemblyName>pEp</AssemblyName>
   15.33 +    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
   15.34 +    <TargetFrameworkProfile>Client</TargetFrameworkProfile>
   15.35 +    <DefineConstants>VSTO40</DefineConstants>
   15.36 +    <IsWebBootstrapper>True</IsWebBootstrapper>
   15.37 +    <FileUpgradeFlags>
   15.38 +    </FileUpgradeFlags>
   15.39 +    <UpgradeBackupLocation>
   15.40 +    </UpgradeBackupLocation>
   15.41 +    <OldToolsVersion>4.0</OldToolsVersion>
   15.42 +    <VSTO_TrustAssembliesLocation>true</VSTO_TrustAssembliesLocation>
   15.43 +    <BootstrapperEnabled>true</BootstrapperEnabled>
   15.44 +    <PublishUrl>publish\</PublishUrl>
   15.45 +    <InstallUrl>http://fdik.org/</InstallUrl>
   15.46 +    <TargetCulture>en</TargetCulture>
   15.47 +    <ApplicationVersion>1.0.0.26</ApplicationVersion>
   15.48 +    <AutoIncrementApplicationRevision>true</AutoIncrementApplicationRevision>
   15.49 +    <UpdateEnabled>true</UpdateEnabled>
   15.50 +    <UpdateInterval>0</UpdateInterval>
   15.51 +    <UpdateIntervalUnits>days</UpdateIntervalUnits>
   15.52 +    <ProductName>pEp</ProductName>
   15.53 +    <PublisherName />
   15.54 +    <SupportUrl />
   15.55 +    <FriendlyName>pEp</FriendlyName>
   15.56 +    <OfficeApplicationDescription />
   15.57 +    <LoadBehavior>3</LoadBehavior>
   15.58 +  </PropertyGroup>
   15.59 +  <ItemGroup>
   15.60 +    <BootstrapperPackage Include=".NETFramework,Version=v4.0">
   15.61 +      <Visible>False</Visible>
   15.62 +      <ProductName>Microsoft .NET Framework 4 %28x86 und x64%29</ProductName>
   15.63 +      <Install>true</Install>
   15.64 +    </BootstrapperPackage>
   15.65 +    <BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
   15.66 +      <Visible>False</Visible>
   15.67 +      <ProductName>Microsoft .NET Framework 4 Client Profile %28x86 und x64%29</ProductName>
   15.68 +      <Install>true</Install>
   15.69 +    </BootstrapperPackage>
   15.70 +    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
   15.71 +      <Visible>False</Visible>
   15.72 +      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
   15.73 +      <Install>false</Install>
   15.74 +    </BootstrapperPackage>
   15.75 +    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
   15.76 +      <Visible>False</Visible>
   15.77 +      <ProductName>.NET Framework 3.5 SP1</ProductName>
   15.78 +      <Install>true</Install>
   15.79 +    </BootstrapperPackage>
   15.80 +    <BootstrapperPackage Include="Microsoft.Office.PIARedist.2007">
   15.81 +      <Visible>False</Visible>
   15.82 +      <ProductName>Microsoft Office 2007 Primary Interop Assemblies</ProductName>
   15.83 +      <Install>true</Install>
   15.84 +    </BootstrapperPackage>
   15.85 +    <BootstrapperPackage Include="Microsoft.VSTORuntime.4.0">
   15.86 +      <Visible>False</Visible>
   15.87 +      <ProductName>Microsoft Visual Studio 2010-Tools für Office-Laufzeit %28x86 und x64%29</ProductName>
   15.88 +      <Install>true</Install>
   15.89 +    </BootstrapperPackage>
   15.90 +    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
   15.91 +      <Visible>False</Visible>
   15.92 +      <ProductName>Windows Installer 3.1</ProductName>
   15.93 +      <Install>true</Install>
   15.94 +    </BootstrapperPackage>
   15.95 +  </ItemGroup>
   15.96 +  <PropertyGroup>
   15.97 +    <!--
   15.98 +      OfficeApplication
   15.99 +        Add-in host application
  15.100 +    -->
  15.101 +    <OfficeApplication>Outlook</OfficeApplication>
  15.102 +  </PropertyGroup>
  15.103 +  <!--
  15.104 +    This section defines properties that are set when the "Debug" configuration is selected.
  15.105 +
  15.106 +    DebugSymbols
  15.107 +      If "true", create symbols (.pdb). If "false", do not create symbols.
  15.108 +    DefineConstants
  15.109 +      Constants defined for the preprocessor.
  15.110 +    EnableUnmanagedDebugging
  15.111 +      If "true", starting the debugger will attach both managed and unmanaged debuggers.
  15.112 +    Optimize
  15.113 +      If "true", optimize the build output. If "false", do not optimize.
  15.114 +    OutputPath
  15.115 +      Output path of project relative to the project file.
  15.116 +    WarningLevel
  15.117 +      Warning level for the compiler.
  15.118 +  -->
  15.119 +  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
  15.120 +    <DebugSymbols>true</DebugSymbols>
  15.121 +    <DebugType>full</DebugType>
  15.122 +    <Optimize>false</Optimize>
  15.123 +    <OutputPath>bin\Debug\</OutputPath>
  15.124 +    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
  15.125 +    <DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
  15.126 +    <WarningLevel>4</WarningLevel>
  15.127 +  </PropertyGroup>
  15.128 +  <!--
  15.129 +    This section defines properties that are set when the "Release" configuration is selected.
  15.130 +
  15.131 +    DebugSymbols
  15.132 +      If "true", create symbols (.pdb). If "false", do not create symbols.
  15.133 +    DefineConstants
  15.134 +      Constants defined for the preprocessor.
  15.135 +    EnableUnmanagedDebugging
  15.136 +      If "true", starting the debugger will attach both managed and unmanaged debuggers.
  15.137 +    Optimize
  15.138 +      If "true", optimize the build output. If "false", do not optimize.
  15.139 +    OutputPath
  15.140 +      Output path of project relative to the project file.
  15.141 +    WarningLevel
  15.142 +      Warning level for the compiler.
  15.143 +  -->
  15.144 +  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
  15.145 +    <DebugType>pdbonly</DebugType>
  15.146 +    <Optimize>true</Optimize>
  15.147 +    <OutputPath>bin\Release\</OutputPath>
  15.148 +    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
  15.149 +    <DefineConstants>$(DefineConstants);TRACE</DefineConstants>
  15.150 +    <WarningLevel>4</WarningLevel>
  15.151 +    <RegisterForComInterop>false</RegisterForComInterop>
  15.152 +    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
  15.153 +    <RunCodeAnalysis>true</RunCodeAnalysis>
  15.154 +    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
  15.155 +    <DebugSymbols>true</DebugSymbols>
  15.156 +  </PropertyGroup>
  15.157 +  <!--
  15.158 +    This section enables pre- and post-build steps. However, in VSTO use
  15.159 +    MSBuild tasks instead of these properties.       
  15.160 +  -->
  15.161 +  <PropertyGroup>
  15.162 +    <PreBuildEvent>
  15.163 +    </PreBuildEvent>
  15.164 +    <PostBuildEvent>
  15.165 +    </PostBuildEvent>
  15.166 +  </PropertyGroup>
  15.167 +  <PropertyGroup>
  15.168 +    <SignManifests>true</SignManifests>
  15.169 +  </PropertyGroup>
  15.170 +  <PropertyGroup>
  15.171 +    <ManifestKeyFile>pEp_2_TemporaryKey.pfx</ManifestKeyFile>
  15.172 +  </PropertyGroup>
  15.173 +  <PropertyGroup>
  15.174 +    <ManifestCertificateThumbprint>9E1D104B611441FBEB2745A70F98115B7BEC1156</ManifestCertificateThumbprint>
  15.175 +  </PropertyGroup>
  15.176 +  <!--
  15.177 +    This section specifies references for the project.
  15.178 +  -->
  15.179 +  <ItemGroup>
  15.180 +    <Reference Include="Accessibility" />
  15.181 +    <Reference Include="Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
  15.182 +      <EmbedInteropTypes>True</EmbedInteropTypes>
  15.183 +    </Reference>
  15.184 +    <Reference Include="Microsoft.Office.Tools, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
  15.185 +      <EmbedInteropTypes>False</EmbedInteropTypes>
  15.186 +    </Reference>
  15.187 +    <Reference Include="Microsoft.Office.Tools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
  15.188 +      <EmbedInteropTypes>False</EmbedInteropTypes>
  15.189 +    </Reference>
  15.190 +    <Reference Include="Microsoft.VisualStudio.Tools.Applications.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
  15.191 +    <Reference Include="Office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
  15.192 +      <EmbedInteropTypes>True</EmbedInteropTypes>
  15.193 +    </Reference>
  15.194 +    <Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
  15.195 +      <EmbedInteropTypes>True</EmbedInteropTypes>
  15.196 +    </Reference>
  15.197 +    <Reference Include="System" />
  15.198 +    <Reference Include="System.Data" />
  15.199 +    <Reference Include="System.Drawing" />
  15.200 +    <Reference Include="System.Windows.Forms" />
  15.201 +    <Reference Include="System.Xml" />
  15.202 +    <Reference Include="System.Core" />
  15.203 +    <Reference Include="System.Xml.Linq" />
  15.204 +    <Reference Include="System.Data.DataSetExtensions" />
  15.205 +    <Reference Include="Microsoft.CSharp" />
  15.206 +  </ItemGroup>
  15.207 +  <ItemGroup>
  15.208 +    <Reference Include="Microsoft.Office.Tools.v4.0.Framework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
  15.209 +    <Reference Include="Microsoft.Office.Tools.Outlook, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
  15.210 +  </ItemGroup>
  15.211 +  <ItemGroup>
  15.212 +    <Reference Include="Microsoft.Office.Tools.Common.v4.0.Utilities, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
  15.213 +      <Private>True</Private>
  15.214 +    </Reference>
  15.215 +    <Reference Include="Microsoft.Office.Tools.Outlook.v4.0.Utilities, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
  15.216 +      <Private>True</Private>
  15.217 +    </Reference>
  15.218 +  </ItemGroup>
  15.219 +  <!--
  15.220 +    This section defines the user source files that are part of the project.
  15.221 +     
  15.222 +    A "Compile" element specifies a source file to compile.
  15.223 +    An "EmbeddedResource" element specifies an .resx file for embedded resources.
  15.224 +    A "None" element specifies a file that is not to be passed to the compiler (for instance, 
  15.225 +    a text file or XML file).
  15.226 +    The "AppDesigner" element specifies the directory where the application properties files
  15.227 +    can be found.
  15.228 +  -->
  15.229 +  <ItemGroup>
  15.230 +    <Compile Include="EncryptionStatusPanel.cs">
  15.231 +      <SubType>UserControl</SubType>
  15.232 +    </Compile>
  15.233 +    <Compile Include="EncryptionStatusPanel.Designer.cs">
  15.234 +      <DependentUpon>EncryptionStatusPanel.cs</DependentUpon>
  15.235 +    </Compile>
  15.236 +    <Compile Include="Handshake.cs">
  15.237 +      <SubType>Form</SubType>
  15.238 +    </Compile>
  15.239 +    <Compile Include="Handshake.Designer.cs">
  15.240 +      <DependentUpon>Handshake.cs</DependentUpon>
  15.241 +    </Compile>
  15.242 +    <Compile Include="CryptableMailItem.cs" />
  15.243 +    <Compile Include="Properties\AssemblyInfo.cs">
  15.244 +      <SubType>Code</SubType>
  15.245 +    </Compile>
  15.246 +    <EmbeddedResource Include="EncryptionStatusPanel.resx">
  15.247 +      <DependentUpon>EncryptionStatusPanel.cs</DependentUpon>
  15.248 +    </EmbeddedResource>
  15.249 +    <EmbeddedResource Include="Handshake.resx">
  15.250 +      <DependentUpon>Handshake.cs</DependentUpon>
  15.251 +    </EmbeddedResource>
  15.252 +    <EmbeddedResource Include="Properties\Resources.resx">
  15.253 +      <Generator>ResXFileCodeGenerator</Generator>
  15.254 +      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
  15.255 +      <SubType>Designer</SubType>
  15.256 +    </EmbeddedResource>
  15.257 +    <Compile Include="Properties\Resources.Designer.cs">
  15.258 +      <AutoGen>True</AutoGen>
  15.259 +      <DependentUpon>Resources.resx</DependentUpon>
  15.260 +      <DesignTime>True</DesignTime>
  15.261 +    </Compile>
  15.262 +    <None Include="app.config" />
  15.263 +    <None Include="pEp_1_TemporaryKey.pfx" />
  15.264 +    <None Include="pEp_2_TemporaryKey.pfx" />
  15.265 +    <None Include="pEp_TemporaryKey.pfx" />
  15.266 +    <None Include="Properties\Settings.settings">
  15.267 +      <Generator>SettingsSingleFileGenerator</Generator>
  15.268 +      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
  15.269 +    </None>
  15.270 +    <Compile Include="Properties\Settings.Designer.cs">
  15.271 +      <AutoGen>True</AutoGen>
  15.272 +      <DependentUpon>Settings.settings</DependentUpon>
  15.273 +      <DesignTimeSharedInput>True</DesignTimeSharedInput>
  15.274 +    </Compile>
  15.275 +    <Compile Include="ThisAddIn.cs">
  15.276 +      <SubType>Code</SubType>
  15.277 +    </Compile>
  15.278 +    <None Include="ThisAddIn.Designer.xml">
  15.279 +      <DependentUpon>ThisAddIn.cs</DependentUpon>
  15.280 +    </None>
  15.281 +    <Compile Include="ThisAddIn.Designer.cs">
  15.282 +      <DependentUpon>ThisAddIn.Designer.xml</DependentUpon>
  15.283 +    </Compile>
  15.284 +    <AppDesigner Include="Properties\" />
  15.285 +  </ItemGroup>
  15.286 +  <ItemGroup>
  15.287 +    <ProjectReference Include="..\..\MIME\MIME\MIME.csproj">
  15.288 +      <Project>{634B0667-4C7D-4E0A-BA15-FEAD9DA0F44A}</Project>
  15.289 +      <Name>MIME</Name>
  15.290 +    </ProjectReference>
  15.291 +  </ItemGroup>
  15.292 +  <ItemGroup>
  15.293 +    <COMReference Include="pEpComAdapterLib">
  15.294 +      <Guid>{3EC2E1A4-40E8-48E4-A7B0-1876D34F9462}</Guid>
  15.295 +      <VersionMajor>1</VersionMajor>
  15.296 +      <VersionMinor>0</VersionMinor>
  15.297 +      <Lcid>0</Lcid>
  15.298 +      <WrapperTool>tlbimp</WrapperTool>
  15.299 +      <Isolated>False</Isolated>
  15.300 +      <EmbedInteropTypes>True</EmbedInteropTypes>
  15.301 +    </COMReference>
  15.302 +    <COMReference Include="WEFDebug">
  15.303 +      <Guid>{791D33D0-2AC2-4428-9365-305B9FF204B3}</Guid>
  15.304 +      <VersionMajor>12</VersionMajor>
  15.305 +      <VersionMinor>0</VersionMinor>
  15.306 +      <Lcid>0</Lcid>
  15.307 +      <WrapperTool>tlbimp</WrapperTool>
  15.308 +      <Isolated>False</Isolated>
  15.309 +      <EmbedInteropTypes>True</EmbedInteropTypes>
  15.310 +    </COMReference>
  15.311 +  </ItemGroup>
  15.312 +  <ItemGroup>
  15.313 +    <WCFMetadata Include="Service References\" />
  15.314 +  </ItemGroup>
  15.315 +  <!-- Include the build rules for a C# project. -->
  15.316 +  <PropertyGroup>
  15.317 +    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
  15.318 +    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
  15.319 +  </PropertyGroup>
  15.320 +  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  15.321 +  <!-- Include additional build rules for an Office application add-in. -->
  15.322 +  <Import Project="$(VSToolsPath)\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets" Condition="'$(VSToolsPath)' != ''" />
  15.323 +  <!-- This section defines VSTO properties that describe the host-changeable project properties. -->
  15.324 +  <ProjectExtensions>
  15.325 +    <VisualStudio>
  15.326 +      <FlavorProperties GUID="{BAA0C2D2-18E2-41B9-852F-F413020CAA33}">
  15.327 +        <ProjectProperties HostName="Outlook" HostPackage="{29A7B9D7-A7F1-4328-8EF0-6B2D1A56B2C1}" OfficeVersion="15.0" VstxVersion="4.0" ApplicationType="Outlook" Language="cs" TemplatesPath="VSTOTemplates" DebugInfoExeName="#Software\Microsoft\Office\15.0\Outlook\InstallRoot\Path#outlook.exe" AddItemTemplatesGuid="{A58A78EB-1C92-4DDD-80CF-E8BD872ABFC4}" />
  15.328 +        <Host Name="Outlook" GeneratedCodeNamespace="pEp" PublishedHash="69C324AB27932AA2FBF2B7EA72250886FF164DE6" IconIndex="0">
  15.329 +          <HostItem Name="ThisAddIn" Code="ThisAddIn.cs" CanonicalName="AddIn" PublishedHash="0FBE11FE0E084B3A3A2542A0D3FA7161F113BEA5" CanActivate="false" IconIndex="1" Blueprint="ThisAddIn.Designer.xml" GeneratedCode="ThisAddIn.Designer.cs" />
  15.330 +        </Host>
  15.331 +      </FlavorProperties>
  15.332 +    </VisualStudio>
  15.333 +  </ProjectExtensions>
  15.334 +</Project>
  15.335 \ No newline at end of file
    16.1 Binary file pEp_1_TemporaryKey.pfx has changed
    17.1 Binary file pEp_2_TemporaryKey.pfx has changed
    18.1 Binary file pEp_TemporaryKey.pfx has changed