Changeset 2413


Ignore:
Timestamp:
Jan 21, 2011, 9:13:59 PM (10 years ago)
Author:
kopal
Message:
  • WebDHT is now the default setting of p2p connection
  • if certificates path does not exist, p2p editor tries to create it now
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypP2P/P2PSettings.Designer.cs

    r2378 r2413  
    11//------------------------------------------------------------------------------
    22// <auto-generated>
    3 //     Dieser Code wurde von einem Tool generiert.
    4 //     Laufzeitversion:4.0.30319.1
     3//     This code was generated by a tool.
     4//     Runtime Version:4.0.30319.1
    55//
    6 //     Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
    7 //     der Code erneut generiert wird.
     6//     Changes to this file may cause incorrect behavior and will be lost if
     7//     the code is regenerated.
    88// </auto-generated>
    99//------------------------------------------------------------------------------
     
    146146        [global::System.Configuration.UserScopedSettingAttribute()]
    147147        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    148         [global::System.Configuration.DefaultSettingValueAttribute("Chord")]
     148        [global::System.Configuration.DefaultSettingValueAttribute("WebDHT")]
    149149        public global::Cryptool.Plugins.PeerToPeer.Internal.P2PArchitecture Architecture {
    150150            get {
  • trunk/CrypP2P/P2PSettings.settings

    r2378 r2413  
    3434    </Setting>
    3535    <Setting Name="Architecture" Type="Cryptool.Plugins.PeerToPeer.Internal.P2PArchitecture" Scope="User">
    36       <Value Profile="(Default)">Chord</Value>
     36      <Value Profile="(Default)">WebDHT</Value>
    3737    </Setting>
    3838    <Setting Name="ServerPort" Type="System.Int32" Scope="User">
  • trunk/CrypP2P/app.config

    r2378 r2413  
    3939            </setting>
    4040            <setting name="Architecture" serializeAs="String">
    41                 <value>Chord</value>
     41                <value>WebDHT</value>
    4242            </setting>
    4343            <setting name="ServerPort" serializeAs="String">
  • trunk/CrypPlugins/P2PEditor/GUI/Controls/ActivateEmailView.xaml.cs

    r2399 r2413  
    161161        public void CertificateReceived(object sender, CertificateReceivedEventArgs args)
    162162        {
     163
     164            String path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "PeersAtPlay" + Path.DirectorySeparatorChar + "Certificates" + Path.DirectorySeparatorChar);
     165            try
     166            {
     167                if (!Directory.Exists(path))
     168                {
     169                    Directory.CreateDirectory(path);
     170                }
     171            }
     172            catch (Exception ex)
     173            {
     174                this.MessageLabel.Content = "Cannot create default account data directory '" + path + "':\n" + ex.Message;
     175                this.MessageLabel.Visibility = Visibility.Visible;
     176                return;
     177            }
     178
    163179            try
    164180            {
  • trunk/CrypPlugins/P2PEditor/GUI/Controls/ConnectView.xaml.cs

    r2408 r2413  
    7070            EmailVerificationRequired = false;
    7171            WrongPassword = false;
     72
     73            String path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "PeersAtPlay" + Path.DirectorySeparatorChar + "Certificates" + Path.DirectorySeparatorChar);
    7274            try
    7375            {
    74                 if (CertificateServices.GetPeerCertificateByAvatar(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "PeersAtPlay" + Path.DirectorySeparatorChar + "Certificates" + Path.DirectorySeparatorChar),
     76                if (!Directory.Exists(path))
     77                {
     78                    Directory.CreateDirectory(path);
     79                }
     80            }
     81            catch (Exception ex)
     82            {
     83                this.MessageLabel.Content = "Cannot create default account data directory '" + path + "':\n" + ex.Message;
     84                this.MessageLabel.Visibility = Visibility.Visible;
     85                return;
     86            }
     87
     88            try
     89            {
     90                if (CertificateServices.GetPeerCertificateByAvatar(path,
    7591                    P2PSettings.Default.PeerName, P2PBase.DecryptString(P2PSettings.Default.Password)) == null)
    7692                {                   
  • trunk/CrypPlugins/P2PEditor/GUI/Controls/GetNewCertificateView.xaml.cs

    r2408 r2413  
    209209            try
    210210            {
     211                String path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "PeersAtPlay" + Path.DirectorySeparatorChar + "Certificates" + Path.DirectorySeparatorChar);
     212                try
     213                {
     214                    if (!Directory.Exists(path))
     215                    {
     216                        Directory.CreateDirectory(path);
     217                    }
     218                }
     219                catch (Exception ex)
     220                {
     221                    this.MessageLabel.Content = "Cannot create default account data directory '" + path + "':\n" + ex.Message;
     222                    this.MessageLabel.Visibility = Visibility.Visible;
     223                    return;
     224                }
    211225                args.Certificate.SaveCrtToAppData();
    212226                args.Certificate.SavePkcs12ToAppData(args.Certificate.Password);               
Note: See TracChangeset for help on using the changeset viewer.