Changeset 1212


Ignore:
Timestamp:
Feb 27, 2010, 9:22:37 PM (12 years ago)
Author:
Arno Wacker
Message:

P2PBase:

  • Updated peers@play-DLLs (Debug/Release) to r4514

P2PPeer:

  • User name can now be chosen from settings, defaults to "CrypTool2"
  • Renamed Log2Monitor to "Use syslogging"
  • Moved "Internal state dump" to "P2P Expert Settings"

P2PCertificates

  • Added new general certificate for CrypTool, with username "CrypTool2", world-reg-ex "CrypTool2*", email anonymous@…, password "ct2" - this is now the default certificate used for peers@play (automatically installed)
  • Uncommented checking for SSL certificates (Server_CA and OPA) since they are only needed when ordering online a new certificate - a feature, which is not used as of now.
Location:
trunk/CrypPlugins
Files:
2 added
44 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/PeerToPeerBase/P2PPeer.cs

    r1144 r1212  
    216216                if (CheckAndInstallPAPCertificates())
    217217                {
    218                     this.p2pBase.Initialize(PAPCertificate.CERTIFIED_PEER_NAME, this.settings.P2PWorldName,
     218                    this.p2pBase.Initialize(this.settings.P2PPeerName, this.settings.P2PWorldName,
    219219                        (P2PLinkManagerType)this.settings.P2PLinkMngrType, (P2PBootstrapperType)this.settings.P2PBSType,
    220220                        (P2POverlayType)this.settings.P2POverlType, (P2PDHTType)this.settings.P2PDhtType);
  • trunk/CrypPlugins/PeerToPeerBase/P2PPeerSettings.cs

    r1200 r1212  
    5252
    5353        //[TaskPane("Start", "Initializes and starts Peer", null, 2, false, DisplayLevel.Beginner, ControlType.Button)]
    54         [TaskPane("Start", "Initializes and starts Peer", null, 2, true, DisplayLevel.Beginner, ControlType.Button)]
     54        [TaskPane("Start", "Connects to the P2P-system.", null, 2, true, DisplayLevel.Beginner, ControlType.Button)]
    5555        public void BtnStart()
    5656        {
     
    6363                PeerStatusChanged(PeerStatus.Error);
    6464                // can not initialize Peer, because P2PUserName and/or P2PWorldName are missing
    65                 throw (new Exception("You must set P2PPeerName and/or P2PWorldName, otherwise starting the peer isn't possible"));
     65                throw (new Exception("You must set the P2P username and worldname, otherwise starting the peer isn't possible"));
    6666            }
    6767        }
    6868
    6969        //[TaskPane("Stop", "Stops the Peer", null, 3, false, DisplayLevel.Beginner, ControlType.Button)]
    70         [TaskPane("Stop", "Stops the Peer", null, 3, true, DisplayLevel.Beginner, ControlType.Button)]
     70        [TaskPane("Stop", "Disconnects from the P2P-system", null, 3, true, DisplayLevel.Beginner, ControlType.Button)]
    7171        public void BtnStop()
    7272        {
     
    7676        }
    7777
    78         [TaskPane("Internal state dump", "Log internal state of peer", null, 4, true, DisplayLevel.Beginner, ControlType.Button)]
     78        [TaskPane("Internal state dump", "Dumps the interla state of the P2P system to syslog.", "P2P Expert Settings", 0, true, DisplayLevel.Beginner, ControlType.Button)]
    7979        public void BtnLogInternalState()
    8080        {
     
    8686        #region Setting-Fields
    8787
    88         //private string p2pPeerName;
    89         //[TaskPane("P2P Peer Name", "P2P Name of the Peer.", null, 0, false, DisplayLevel.Beginner, ControlType.TextBox)]
    90         //public string P2PPeerName
    91         //{
    92         //    get { return this.p2pPeerName; }
    93         //    set
    94         //    {
    95         //        if (value != this.p2pPeerName)
    96         //        {
    97         //            this.p2pPeerName = value;
    98         //            OnPropertyChanged("P2PPeerName");
    99         //            HasChanges = true;
    100         //        }
    101         //    }
    102         //}
     88        private string p2pPeerName = PAPCertificate.CERTIFIED_PEER_NAME;
     89        [TaskPane("P2P Username", "Your username for the peers@play-system. Note that you need to have a corresponding certificate installed on your computer. If you don't know what this means, just leave the default \"CrypTool2\"-username and everything will be taken care of.", null, 0, false, DisplayLevel.Beginner, ControlType.TextBox)]
     90        public string P2PPeerName
     91        {
     92            get { return this.p2pPeerName; }
     93            set
     94            {
     95                if (value != this.p2pPeerName)
     96                {
     97                    this.p2pPeerName = value;
     98                    OnPropertyChanged("P2PPeerName");
     99                    HasChanges = true;
     100                }
     101            }
     102        }
    103103
    104104        private string p2pWorldName;
     
    137137
    138138        private bool log2Monitor = true;
    139         [TaskPane("Log2Monitor", "Logs all p2p actions to the PeersAtPlay LogMonitor", "P2P Expert Settings", 1, false,
     139        [TaskPane("Use syslogging", "Logs all p2p actions to the to a sylog-daemon on localhost.", "P2P Expert Settings", 1, false,
    140140            DisplayLevel.Beginner, ControlType.CheckBox)]
    141141        public bool Log2Monitor
  • trunk/CrypPlugins/PeerToPeerCertificates/PAPCertificate.cs

    r1115 r1212  
    2121        /// registered with this user name.
    2222        /// </summary>
    23         public const string CERTIFIED_PEER_NAME = "pap0001"; //"CT_PAP_User";
     23        public const string CERTIFIED_PEER_NAME = "CrypTool2"; //"pap0001"; //"CT_PAP_User";
    2424        public const string CERTIFICATE_DIRECTORY = "pap_certificates";
    2525
     
    4343
    4444        //private const string CERT_USER_SUBJECT = "CN=pap0001@pap.de@pap0001@.*, O=Peers@Play, S=None, C=NA";
    45         private const string CERT_USER_FILE_NAME = "pap0001.p12"; //ct2_user_pap.cer
    46         private const string CERT_USER_PASSWORD = "test"; //CT2p@pC3rt1f1cat10n
     45        private const string CERT_USER_FILE_NAME = "CrypTool2.pfx"; //"pap0001.p12"; //ct2_user_pap.cer
     46        private const string CERT_USER_PASSWORD = "ct2"; //"test"; //CT2p@pC3rt1f1cat10n
    4747        private const string CERT_USER_ISSUER = "P@P project";
    48         private const string CERT_USER_SERIAL = "0D";
     48        private const string CERT_USER_SERIAL = "1E"; //"0D";
    4949
    5050        private const string CERT_PAP_FILE_NAME = "pap.cer";
     
    112112
    113113            /* BEGIN: Checking availablity of the three root certificates */
    114             certColl = FindCertificates(CERT_STORE_ROOT, CERT_STORE_LOCATION,
    115                 PAP_FIND_TYPE, CERT_SERVER_CA_SERIAL, true);
    116             if (certColl.Count == 0)
    117                 retLst.Add(PAP_Certificates.Server_CA);
    118 
    119             certColl = FindCertificates(CERT_STORE_ROOT, CERT_STORE_LOCATION,
    120                 PAP_FIND_TYPE, CERT_OPA_SERIAL, true);
    121             if (certColl.Count == 0)
    122                 retLst.Add(PAP_Certificates.Opa);
     114
     115            // Wacker 27.02.2010: Removed checking for Server and OPA (operator-SSL) certificates; These are only needed if
     116            // we want to get a new certificate online - a feature which is not implmented now. When this feature is
     117            // implemented, just uncommentd the following lines
     118
     119            //certColl = FindCertificates(CERT_STORE_ROOT, CERT_STORE_LOCATION,
     120            //    PAP_FIND_TYPE, CERT_SERVER_CA_SERIAL, true);
     121            //if (certColl.Count == 0)
     122            //    retLst.Add(PAP_Certificates.Server_CA);
     123
     124            //certColl = FindCertificates(CERT_STORE_ROOT, CERT_STORE_LOCATION,
     125            //    PAP_FIND_TYPE, CERT_OPA_SERIAL, true);
     126            //if (certColl.Count == 0)
     127            //    retLst.Add(PAP_Certificates.Opa);
    123128
    124129            certColl = FindCertificates(CERT_STORE_ROOT, CERT_STORE_LOCATION,
  • trunk/CrypPlugins/PeerToPeerCertificates/PeerToPeerCertificates.csproj

    r1115 r1212  
    5151  </ItemGroup>
    5252  <ItemGroup>
     53    <None Include="pap_certificates\CrypTool2.pfx" />
    5354    <None Include="pap_certificates\opa.vs.uni-due.de.cer" />
    5455    <None Include="pap_certificates\pap.cer" />
     
    7980copy "$(ProjectDir)pap_certificates\*.cer" "./pap_certificates"
    8081copy "$(ProjectDir)pap_certificates\*.p12" "./pap_certificates"
     82copy "$(ProjectDir)pap_certificates\*.pfx" "./pap_certificates"
     83)
    8184)</PostBuildEvent>
    8285  </PropertyGroup>
Note: See TracChangeset for help on using the changeset viewer.