Beispiel #1
0
        public void Store(AspNetAppProject project)
        {
            XspParameters xPar = project.XspParameters;

            xPar.Address            = ipAddress.Text;
            xPar.Port               = Convert.ToUInt16(portNumber.Value);
            xPar.Verbose            = verboseCheck.Active;
            xPar.SslMode            = (XspSslMode)sslMode.Active;
            xPar.SslProtocol        = (XspSslProtocol)sslProtocol.Active;
            xPar.KeyType            = (XspKeyType)keyType.Active;
            xPar.PrivateKeyFile     = keyLocation.Path;
            xPar.CertificateFile    = certLocation.Path;
            xPar.PasswordOptions    = (XspPasswordOptions)passwordOptions.Active;
            xPar.PrivateKeyPassword = passwordEntry.Text;
        }
Beispiel #2
0
        public XspOptionsPanelWidget(AspNetAppProjectFlavor project)
        {
            Build();

            XspParameters xPar = project.XspParameters;

            //index should be equivalent to XspSslMode enum
            ((ListStore)sslMode.Model).Clear();
            sslMode.AppendText(GettextCatalog.GetString("None"));
            sslMode.AppendText(GettextCatalog.GetString("Enabled"));
            sslMode.AppendText(GettextCatalog.GetString("Accept Client Certificates"));
            sslMode.AppendText(GettextCatalog.GetString("Require Client Certificates"));

            //index should be equivalent to XspSslProtocol enum
            ((ListStore)sslProtocol.Model).Clear();
            sslProtocol.AppendText(GettextCatalog.GetString("Default"));
#pragma warning disable MD0005
            sslProtocol.AppendText("TLS");
            sslProtocol.AppendText("SSL 2");
            sslProtocol.AppendText("SSL 3");
#pragma warning restore MD0005

            ((ListStore)keyType.Model).Clear();
            keyType.AppendText(GettextCatalog.GetString("None"));
#pragma warning disable MD0005
            keyType.AppendText("Pkcs12");
            keyType.AppendText("PVK");
#pragma warning restore MD0005

            ((ListStore)passwordOptions.Model).Clear();
            passwordOptions.AppendText(GettextCatalog.GetString("None"));
            passwordOptions.AppendText(GettextCatalog.GetString("Ask"));
            passwordOptions.AppendText(GettextCatalog.GetString("Store (insecure)"));

            //load all options
            ipAddress.Text         = xPar.Address;
            portNumber.Value       = xPar.Port;
            verboseCheck.Active    = xPar.Verbose;
            sslMode.Active         = (int)xPar.SslMode;
            sslProtocol.Active     = (int)xPar.SslProtocol;
            keyType.Active         = (int)xPar.KeyType;
            keyLocation.Path       = xPar.PrivateKeyFile;
            certLocation.Path      = xPar.CertificateFile;
            passwordOptions.Active = (int)xPar.PasswordOptions;
            passwordEntry.Text     = xPar.PrivateKeyPassword;
        }