コード例 #1
0
ファイル: ClassSOAP.cs プロジェクト: andreighita/SOAPe
        private void LogSSLSettings()
        {
            StringBuilder sSSL = new StringBuilder("SSL/TLS requested: ");

            // Build list of protocols that are enabled
            List <string> protocols = new List <string>();

            if ((ServicePointManager.SecurityProtocol & SecurityProtocolType.Ssl3) == SecurityProtocolType.Ssl3)
            {
                protocols.Add("SSL 3.0");
            }
            if ((ServicePointManager.SecurityProtocol & SecurityProtocolType.Tls) == SecurityProtocolType.Tls)
            {
                protocols.Add("TLS 1.0");
            }
            if ((ServicePointManager.SecurityProtocol & SecurityProtocolType.Tls11) == SecurityProtocolType.Tls11)
            {
                protocols.Add("TLS 1.1");
            }
            if ((ServicePointManager.SecurityProtocol & SecurityProtocolType.Tls12) == SecurityProtocolType.Tls12)
            {
                protocols.Add("TLS 1.2");
            }

            sSSL.Append(String.Join("; ", protocols));

            _logger.Log(sSSL.ToString(), "Connection Security");
        }
コード例 #2
0
ファイル: ClassSOAP.cs プロジェクト: David-Barrett-MS/SOAPe
 private void Log(string Details, string Description = "", string ClientRequestId = "")
 {
     try
     {
         if (_logger == null)
         {
             return;
         }
         _logger.Log(Details, Description, ClientRequestId);
     }
     catch (Exception ex)
     {
         System.Windows.Forms.MessageBox.Show(ex.Message, "Failed to log information", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
コード例 #3
0
ファイル: FormListener.cs プロジェクト: andreighita/SOAPe
 private void Log(string Details, string Description = "")
 {
     try
     {
         if (_Logger == null)
         {
             return;
         }
         _Logger.Log(Details, Description);
     }
     catch { }
 }
コード例 #4
0
ファイル: FormMain.cs プロジェクト: andreighita/SOAPe
        private void LogCredentials()
        {
            StringBuilder sCredentialInfo = new StringBuilder();

            if (radioButtonDefaultCredentials.Checked)
            {
                sCredentialInfo.AppendLine("Using default credentials");
                sCredentialInfo.Append("Username: "******"Domain: ");
                sCredentialInfo.AppendLine(Environment.UserDomainName);
            }
            else if (radioButtonCertificateAuthentication.Checked)
            {
                sCredentialInfo.AppendLine("Using certificate");
                if (_authCertificate != null)
                {
                    sCredentialInfo.Append("Subject: ");
                    sCredentialInfo.AppendLine(_authCertificate.Subject);
                }
                else
                {
                    sCredentialInfo.AppendLine("NO CERTIFICATE SPECIFIED");
                }
            }
            else
            {
                sCredentialInfo.AppendLine("Using specific credentials");
                if (checkBoxForceBasicAuth.Checked)
                {
                    sCredentialInfo.AppendLine("Forcing BASIC AUTH");
                }
                sCredentialInfo.Append("Username: "******"Domain: ");
                sCredentialInfo.AppendLine(textBoxDomain.Text);
            }
            _logger.Log(sCredentialInfo.ToString(), "Request Credentials");
        }